What is IGNITE_HOME for and is it required?

classic Classic list List threaded Threaded
6 messages Options
kevin kevin
Reply | Threaded
Open this post in threaded view
|

What is IGNITE_HOME for and is it required?

This post has NOT been accepted by the mailing list yet.
I am running my program with Ignite as a Maven dependency. If I package my program in a jar and try to run it, Ignite will throw an error when it tries to start up.

Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
        at java.io.File.<init>(Unknown Source)
        at org.apache.ignite.internal.util.IgniteUtils.resolveProjectHome(IgniteUtils.java:3136)

I've never set IGNITE_HOME, but when I ran it from the IDE, it seems that Ignite will just try to resolve IGNITE_HOME, and continue on happily if it can't find it.

I tried setting IGNITE_HOME to a "random" location just to get the jar running, but I noticed Ignite started writing stuff to that folder (such as a work folder and a marshaller folder).

Is it possible to run Ignite from a jar without setting IGNITE_HOME? Where does Ignite write the files that would've gone under IGNITE_HOME if it cannot be resolved?
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: What is IGNITE_HOME for and is it required?

kevin wrote
I am running my program with Ignite as a Maven dependency. If I package my program in a jar and try to run it, Ignite will throw an error when it tries to start up.

Caused by: java.lang.IllegalArgumentException: URI is not hierarchical
        at java.io.File.<init>(Unknown Source)
        at org.apache.ignite.internal.util.IgniteUtils.resolveProjectHome(IgniteUtils.java:3136)

I've never set IGNITE_HOME, but when I ran it from the IDE, it seems that Ignite will just try to resolve IGNITE_HOME, and continue on happily if it can't find it.

I tried setting IGNITE_HOME to a "random" location just to get the jar running, but I noticed Ignite started writing stuff to that folder (such as a work folder and a marshaller folder).

Is it possible to run Ignite from a jar without setting IGNITE_HOME? Where does Ignite write the files that would've gone under IGNITE_HOME if it cannot be resolved?
Hi Kevin,

IGNITE_HOME is not required and I can't figure out why it fails in your case. What OS are you running on? Can you provide the absolute path to the ignite-core.jar file in your .m2 repository?

If project home can't be resolved, Ignite will create work folder in your OS temp directory. You can customize this by setting IgniteConfiguration.setWorkDirectory() property.

-Val
kevin kevin
Reply | Threaded
Open this post in threaded view
|

Re: What is IGNITE_HOME for and is it required?

This post has NOT been accepted by the mailing list yet.
Hi Val,

I am running on Windows. This is the URI it is trying to get a File from:
jar:file:/C:/...MyJar.jar!/lib/ignite-core-1.3.0-incubating.jar!/

This path doesn't specify a real file in the file system, so the error is sound.
It would be nice if Ignite catches this exception and returns null for the home instead causing the grid to not start.
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: What is IGNITE_HOME for and is it required?

kevin wrote
This path doesn't specify a real file in the file system, so the error is sound.
It would be nice if Ignite catches this exception and returns null for the home instead causing the grid to not start.
Kevin,

I just noticed that it's already fixed in master. Can you try with the latest nightly build? You can take it here: https://builds.apache.org/view/H-L/view/Ignite/job/Ignite-nightly/lastSuccessfulBuild/

-Val
kevin kevin
Reply | Threaded
Open this post in threaded view
|

Re: What is IGNITE_HOME for and is it required?

This post has NOT been accepted by the mailing list yet.
Yes I just tested that it works with the latest build. Thanks!

Which should be the next release version that has the fix?
yakov yakov
Reply | Threaded
Open this post in threaded view
|

Re: What is IGNITE_HOME for and is it required?

kevin wrote
Yes I just tested that it works with the latest build. Thanks!

Which should be the next release version that has the fix?
This will be 1.4