{"action":"created","issue":{"url":"https://api.github.com/repos/jpmorganchase/cakeshop/issues/71","repository_url":"https://api.github.com/repos/jpmorganchase/cakeshop","labels_url":"https://api.github.com/repos/jpmorganchase/cakeshop/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/jpmorganchase/cakeshop/issues/71/comments","events_url":"https://api.github.com/repos/jpmorganchase/cakeshop/issues/71/events","html_url":"https://github.com/jpmorganchase/cakeshop/issues/71","id":328907238,"node_id":"MDU6SXNzdWUzMjg5MDcyMzg=","number":71,"title":"I got \"java.lang.IndexOutOfBoundsException: Index: 0, Size: 0\" when trying to run in attach mode","user":{"login":"spksoft","id":1377991,"node_id":"MDQ6VXNlcjEzNzc5OTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1377991?v=4","gravatar_id":"","url":"https://api.github.com/users/spksoft","html_url":"https://github.com/spksoft","followers_url":"https://api.github.com/users/spksoft/followers","following_url":"https://api.github.com/users/spksoft/following{/other_user}","gists_url":"https://api.github.com/users/spksoft/gists{/gist_id}","starred_url":"https://api.github.com/users/spksoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spksoft/subscriptions","organizations_url":"https://api.github.com/users/spksoft/orgs","repos_url":"https://api.github.com/users/spksoft/repos","events_url":"https://api.github.com/users/spksoft/events{/privacy}","received_events_url":"https://api.github.com/users/spksoft/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-04T04:49:40Z","updated_at":"2018-08-15T19:17:49Z","closed_at":"2018-06-05T23:09:45Z","author_association":"NONE","body":"#### Description of problem\r\nI got \"java.lang.IndexOutOfBoundsException: Index: 0, Size: 0\" when trying to run in attach mode for quorum private network\r\n\r\n#### Expected behavior\r\nI should run correctly without any error\r\n\r\n#### Actual behavior\r\n```\r\nroot@quorum-node-02:~# java -jar cakeshop.war\r\nDefaulting to spring profile: local\r\nExtracting geth to /root/data/geth\r\n INFO 2018-06-04 04:40:58,587 [main] (StartupInfoLogger.java:48 ) Starting SpringBootApplication on quorum-node-02 with PID 13786 (started by root in /root)\r\n INFO 2018-06-04 04:40:58,595 [main] (SpringApplication.java:670) The following profiles are active: container,spring-boot,local\r\n INFO 2018-06-04 04:41:05,334 [main] (AppConfig.java:113) eth.config.dir=/root/data/local\r\n INFO 2018-06-04 04:41:05,347 [main] (AppConfig.java:144) Loading config from /root/data/local/application.properties\r\n\r\n\r\n********************************************************************************\r\nRunning pre-flight checks...\r\n\r\nTesting ethereum data dir path\r\n/root/.ethereum\r\nOK\r\n\r\nTesting db path\r\n/root/data/local/db\r\nOK\r\n\r\nTesting geth server binary\r\nOK\r\n\r\nTesting solc compiler binary\r\nOK\r\n\r\nALL TESTS PASSED!\r\n********************************************************************************\r\n\r\n INFO 2018-06-04 04:41:29,738 [main] (BlockchainInitializerTask.java:120) Contract registry address not found\r\n INFO 2018-06-04 04:41:29,744 [main] (BlockchainInitializerTask.java:149) ContractRegistry not found on chain\r\n INFO 2018-06-04 04:41:29,752 [main] (BlockchainInitializerTask.java:154) Deploying ContractRegistry to chain\r\nERROR 2018-06-04 04:41:32,314 [main] (SpringApplication.java:827) Application startup failed\r\njava.lang.IndexOutOfBoundsException: Index: 0, Size: 0\r\n\tat java.util.ArrayList.rangeCheck(ArrayList.java:657)\r\n\tat java.util.ArrayList.get(ArrayList.java:433)\r\n\tat com.jpmorgan.cakeshop.service.impl.ContractServiceImpl.getAddress(ContractServiceImpl.java:326)\r\n\tat com.jpmorgan.cakeshop.service.impl.ContractServiceImpl.create(ContractServiceImpl.java:189)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)\r\n\tat org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)\r\n\tat com.sun.proxy.$Proxy98.create(Unknown Source)\r\n\tat com.jpmorgan.cakeshop.service.impl.ContractRegistryServiceImpl.deploy(ContractRegistryServiceImpl.java:66)\r\n\tat com.jpmorgan.cakeshop.service.task.BlockchainInitializerTask.deployContractRegistry(BlockchainInitializerTask.java:155)\r\n\tat com.jpmorgan.cakeshop.service.task.BlockchainInitializerTask.run(BlockchainInitializerTask.java:76)\r\n\tat com.jpmorgan.cakeshop.service.impl.GethHttpServiceImpl.runPostStartupTasks(GethHttpServiceImpl.java:376)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)\r\n\tat org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)\r\n\tat com.sun.proxy.$Proxy86.runPostStartupTasks(Unknown Source)\r\n\tat com.jpmorgan.cakeshop.config.AppStartup.onApplicationEvent(AppStartup.java:118)\r\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163)\r\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136)\r\n\tat org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:381)\r\n\tat org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:335)\r\n\tat org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:855)\r\n\tat org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:140)\r\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)\r\n\tat org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)\r\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)\r\n\tat org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:307)\r\n\tat org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134)\r\n\tat com.jpmorgan.cakeshop.config.SpringBootApplication.main(SpringBootApplication.java:68)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\nException in thread \"main\" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException\r\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:62)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\nCaused by: java.lang.reflect.InvocationTargetException\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)\r\n\t... 1 more\r\nCaused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0\r\n\tat java.util.ArrayList.rangeCheck(ArrayList.java:657)\r\n\tat java.util.ArrayList.get(ArrayList.java:433)\r\n\tat com.jpmorgan.cakeshop.service.impl.ContractServiceImpl.getAddress(ContractServiceImpl.java:326)\r\n\tat com.jpmorgan.cakeshop.service.impl.ContractServiceImpl.create(ContractServiceImpl.java:189)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)\r\n\tat org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)\r\n\tat com.sun.proxy.$Proxy98.create(Unknown Source)\r\n\tat com.jpmorgan.cakeshop.service.impl.ContractRegistryServiceImpl.deploy(ContractRegistryServiceImpl.java:66)\r\n\tat com.jpmorgan.cakeshop.service.task.BlockchainInitializerTask.deployContractRegistry(BlockchainInitializerTask.java:155)\r\n\tat com.jpmorgan.cakeshop.service.task.BlockchainInitializerTask.run(BlockchainInitializerTask.java:76)\r\n\tat com.jpmorgan.cakeshop.service.impl.GethHttpServiceImpl.runPostStartupTasks(GethHttpServiceImpl.java:376)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)\r\n\tat org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)\r\n\tat com.sun.proxy.$Proxy86.runPostStartupTasks(Unknown Source)\r\n\tat com.jpmorgan.cakeshop.config.AppStartup.onApplicationEvent(AppStartup.java:118)\r\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:163)\r\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:136)\r\n\tat org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:381)\r\n\tat org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:335)\r\n\tat org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:855)\r\n\tat org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:140)\r\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)\r\n\tat org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)\r\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)\r\n\tat org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:307)\r\n\tat org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134)\r\n\tat com.jpmorgan.cakeshop.config.SpringBootApplication.main(SpringBootApplication.java:68)\r\n\t... 6 mor\r\n```\r\n\r\n#### Steps to reproduce the behavior\r\nI start geth by following this command\r\n```\r\nnohup geth --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum --emitcheckpoints --rpcport 22000 --port 21000 --bootnodes enode://8d6f9303aae8743cb8e2555004215302abd92df51f603580acb5b377cfc472d1241ca91634b164cc1ca7b2e574ba473570115de166d5a9ec70f1199ebd5077fa@127.0.0.1:30301 > geth.log &\r\n```\r\nMy genesus.json file\r\n```json\r\n{\r\n  \"alloc\": {},\r\n  \"coinbase\": \"0x0000000000000000000000000000000000000000\",\r\n  \"config\": {\r\n    \"homesteadBlock\": 0\r\n  },\r\n  \"difficulty\": \"0x0\",\r\n  \"extraData\": \"0x\",\r\n  \"gasLimit\": \"0x2FEFD800\",\r\n  \"mixhash\": \"0x00000000000000000000000000000000000000647572616c65787365646c6578\",\r\n  \"nonce\": \"0x0\",\r\n  \"parentHash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\r\n  \"timestamp\": \"0x00\"\r\n}\r\n```\r\nMy application.properties files\r\n```\r\n#Mon Jun 04 04:41:29 UTC 2018\r\ncakeshop.database.vendor=hsqldb\r\ncakeshop.hibernate.hbm2ddl.auto=update\r\ncakeshop.hibernate.jdbc.batch_size=20\r\ncakeshop.jdbc.pass=sdk\r\ncakeshop.jdbc.user=sdk\r\ncakeshop.mvc.async.pool.queue.max=2000\r\ncakeshop.mvc.async.pool.threads.core=250\r\ncakeshop.mvc.async.pool.threads.max=1000\r\ncontract.poll.delay.millis=5000\r\ncontract.registry.addr=\r\nendpoints.actuator.enabled=true\r\ngeth.auto.start=false\r\ngeth.auto.stop=false\r\ngeth.cors.enabled=false\r\ngeth.cors.url=\r\ngeth.datadir=/root/.ethereum\r\ngeth.db.enabled=true\r\ngeth.identity=root\r\ngeth.log=/logs\r\ngeth.mining=true\r\ngeth.networkid=1006\r\ngeth.node.port=30303\r\ngeth.params.extra=\r\ngeth.rpcapi.list=admin,db,eth,debug,miner,net,shh,txpool,personal,web3\r\ngeth.url=http\\://localhost\\:22000\r\ngeth.verbosity=\r\nmanagement.context-path=/manage\r\nserver.compression.enabled=true\r\nserver.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain\r\nspring.main.banner-mode=off\r\nspring.mvc.view.prefix=/WEB-INF/jsp/\r\nspring.mvc.view.suffix=.jsp\r\n```\r\n\r\n#### System information\r\n\r\nCakeshop version or commit hash: cakeshop-0.9.1-x86_64-linux\r\n\r\nCakeshop runtime configuration: attach mode\r\n\r\nGeth/Quorum version testing against: \r\n```\r\nGeth\r\nVersion: 1.7.2-stable\r\nGit Commit: df4267a25637a5497a3db9fbde4603a3dcd6aa14\r\nQuorum Version: 2.0.1\r\nArchitecture: amd64\r\nNetwork Id: 1\r\nGo Version: go1.9.3\r\nOperating System: linux\r\nGOPATH=\r\nGOROOT=/usr/local/go\r\n```\r\n\r\nCakeshop OS & Version: Linux\r\n\r\nBrowser OS & Version: OSX\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jpmorganchase/cakeshop/issues/comments/413305406","html_url":"https://github.com/jpmorganchase/cakeshop/issues/71#issuecomment-413305406","issue_url":"https://api.github.com/repos/jpmorganchase/cakeshop/issues/71","id":413305406,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzMwNTQwNg==","user":{"login":"cvkonduru","id":27721208,"node_id":"MDQ6VXNlcjI3NzIxMjA4","avatar_url":"https://avatars1.githubusercontent.com/u/27721208?v=4","gravatar_id":"","url":"https://api.github.com/users/cvkonduru","html_url":"https://github.com/cvkonduru","followers_url":"https://api.github.com/users/cvkonduru/followers","following_url":"https://api.github.com/users/cvkonduru/following{/other_user}","gists_url":"https://api.github.com/users/cvkonduru/gists{/gist_id}","starred_url":"https://api.github.com/users/cvkonduru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvkonduru/subscriptions","organizations_url":"https://api.github.com/users/cvkonduru/orgs","repos_url":"https://api.github.com/users/cvkonduru/repos","events_url":"https://api.github.com/users/cvkonduru/events{/privacy}","received_events_url":"https://api.github.com/users/cvkonduru/received_events","type":"User","site_admin":false},"created_at":"2018-08-15T19:17:49Z","updated_at":"2018-08-15T19:17:49Z","author_association":"NONE","body":"@fixanoid  Is the Cakeshop working now for Quorum V2.x any updates?"}}
{"actor":{"display_login":"cvkonduru"}}