-3

I am trying to learn Apache Ignite but facing an error in the process.

  1. I downloaded apache-ignite-fabric-2.4.0
  2. Unzipped it to apache-ignite-fabric-2.4.0-bin
  3. Set the environment variable IGNITE_HOME
C:\devTools\apache-ignite-fabric-2.4.0-bin>echo %IGNITE_HOME%
C:\devTools\apache-ignite-fabric-2.4.0-bin

I then tried executing C:\devTools\apache-ignite-fabric-2.4.0-bin>sh bin/ignite.sh examples/config/example-ignite.xml and then C:\devTools\apache-ignite-fabric-2.4.0-bin>sh bin/ignite.sh, but got the same error.

C:\devTools\apache-ignite-fabric-2.4.0-bin>sh bin/ignite.sh
class org.apache.ignite.IgniteException: Failed to create Ignite component (consider adding ignite-spring module to classpath) [component=SPRING, cls=
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl]
        at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:980)
        at org.apache.ignite.Ignition.start(Ignition.java:350)
        at org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:302)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to create Ignite component (consider adding ignite-spring module to classpath) [comp
onent=SPRING, cls=org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl]
        at org.apache.ignite.internal.IgniteComponentType.componentException(IgniteComponentType.java:320)
        at org.apache.ignite.internal.IgniteComponentType.create0(IgniteComponentType.java:296)
        at org.apache.ignite.internal.IgniteComponentType.create(IgniteComponentType.java:207)
        at org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:735)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:938)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:847)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:717)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:686)
        at org.apache.ignite.Ignition.start(Ignition.java:347)
        ... 1 more
Caused by: java.lang.ClassNotFoundException: org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl
        at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:259)
        at org.apache.ignite.internal.IgniteComponentType.create0(IgniteComponentType.java:282)
        ... 8 more
Failed to start grid: Failed to create Ignite component (consider adding ignite-spring module to classpath) [component=SPRING, cls=org.apache.ignite.i
nternal.util.spring.IgniteSpringHelperImpl]
Note! You may use 'USER_LIBS' environment variable to specify your classpath.

I just followed the instructions from http://ggfabric.blogspot.com/2015/12/apache-ignite-hello-world-example.html and https://apacheignite.readme.io/docs/getting-started#launching-first-ignite-cluster

There is similar question on SO: ClassNotFoundException: org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl but it wasn't much helpful.

RDM
  • 1,136
  • 3
  • 28
  • 50
  • 1
    Looks like you are using a windows system..so try running the ignite.bat – Libin Mar 22 '18 at 22:08
  • Thanks Libin...that worked...but why would a .sh file not work. It clearly started executing the shell script but broke somewhere in between the run. – RDM Mar 22 '18 at 22:17

3 Answers3

2

There are .bat scripts for Windows, you should use them instead of .sh

Valentin Kulichenko
  • 8,365
  • 1
  • 16
  • 12
0

I used Cygwin on Windows 10 and Ignite works ok in case if you set up the USER_LIBS environment variable as next:

enter image description here

/cygdrive/c/GridGain/2.5/apache-ignite-fabric-2.5.0-bin/bin
$ ./ignite.sh
[09:55:31]    __________  ________________
[09:55:31]   /  _/ ___/ |/ /  _/_  __/ __/
[09:55:31]  _/ // (7 7    // /  / / / _/
[09:55:31] /___/\___/_/|_/___/ /_/ /___/
[09:55:31]
[09:55:31] ver. 2.5.0#20180523-sha1:86e110c7
[09:55:31] 2018 Copyright(C) Apache Software Foundation
[09:55:31]
[09:55:31] Ignite documentation: http://ignite.apache.org
-1

Try adding config as parm.

ignite.sh examples/config/example-ignite.xml

Jhon Doe
  • 11
  • 2