gridgain / gridgain-old

268 stars 85 forks source link

IllegalArgumentException: URI is not hierarchical when creating GridSpringBean in Spring #71

Closed longnguyenTM closed 10 years ago

longnguyenTM commented 10 years ago

So I'm using Spring 4 + Spring Boot + Gridgain 6.0.1 to create a web app and I wanted to run the app as an executable jar, but then I ran into an issue of java.lang.IllegalArgumentException: URI is not hierarchical. I did some research and looks like this is a general issue when running an executable jar. I'm wondering is this a bug in GridGain? Here is part of the stacktrace: Caused by: java.lang.IllegalArgumentException: URI is not hierarchical at java.io.File.(File.java:418) ~[na:1.8.0] at org.gridgain.grid.util.GridUtils.resolveProjectHome(GridUtils.java:2250) ~[gridgain-platform-6.0.1.jar!/:na] at org.gridgain.grid.util.GridUtils.getGridGainHome(GridUtils.java:2291) ~[gridgain-platform-6.0.1.jar!/:na] at org.gridgain.grid.GridGain$GridNamedInstance.start0(GridGain.java:1326) ~[gridgain-platform-6.0.1.jar!/:na] at org.gridgain.grid.GridGain$GridNamedInstance.start(GridGain.java:1291) ~[gridgain-platform-6.0.1.jar!/:na] at org.gridgain.grid.GridGain.start0(GridGain.java:850) ~[gridgain-platform-6.0.1.jar!/:na] at org.gridgain.grid.GridGain.start(GridGain.java:530) ~[gridgain-platform-6.0.1.jar!/:na] at org.gridgain.grid.GridSpringBean.afterPropertiesSet(GridSpringBean.java:127) ~[gridgain-platform-6.0.1.jar!/:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612) ~[spring-beans-4.0.5.RELEASE.jar!/:4.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549) ~[spring-beans-4.0.5.RELEASE.jar!/:4.0.5.RELEASE] ... 21 common frames omitted

dsetrakyan commented 10 years ago

This question is better asked at StackOverflow.

What is the value of your GRIDGAIN_HOME variable?

longnguyenTM commented 10 years ago

Sure, I could move it to StackOverflow. Anyway, i run GridGain as an embedded so I did not set a GRIDGAIN_HOME. If I run it inside my IDE or as an executable file (used gradle 'application' plugin to create a .tar), it works fine.

dsetrakyan commented 10 years ago

Try setting GRIDGAIN_HOME regardless, even if you run it in embedded mode. Let me know if you still continue to have this issue.

longnguyenTM commented 10 years ago

Yup, that solves the problem. Thank you.