ClassNotFoundException:org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl

ClassNotFoundException:org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl,spring,ignite,Spring,Ignite,我尝试在Windows10Professional上运行ApacheIgnore。我在ignite目录中运行了示例缓存示例,如下所示: D:\work\tools\apache ignite 1.9.0\apache-ignite-fabric-1.9.0-bin>bin\ignite.bat examples\config\example-cache.xml 我之前将IGNITE_HOME环境变量设置为 D:\work\tools\apache ignite 1.9.0\apache-

我尝试在Windows10Professional上运行ApacheIgnore。我在ignite目录中运行了示例缓存示例,如下所示:

D:\work\tools\apache ignite 1.9.0\apache-ignite-fabric-1.9.0-bin>bin\ignite.bat examples\config\example-cache.xml
我之前将IGNITE_HOME环境变量设置为

D:\work\tools\apache ignite 1.9.0\apache-ignite-fabric-1.9.0-bin
但我有一个异常堆栈:

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:946)
        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) [component=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:637)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:840)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:749)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:619)
        at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:589)
        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.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        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.internal.util.spring.IgniteSpringHelperImpl]
Note! You may use 'USER_LIBS' environment variable to specify your classpath.

我尝试将IGNITE\u HOME设置为D:\work\tools\apache IGNITE 1.9.0\apache-IGNITE-fabric-1.9.0-bin\libs,其中包含jar文件IGNITE-spring-1.9.0.jar,该文件包含org.apache.IGNITE.internal.util.spring.IGNITE-spring-HelperImpl类

尝试将IGNITE\u HOME设置为D:\work\tools\apache\apache IGNITE-fabrite 1.9.0\apache-fabric-1.9.0-bin


或者按照建议将用户库设置为D:\work\tools\apache ignite 1.9.0\apache-ignite-fabric-1.9.0-bin\LIBS。

尝试将ignite\u HOME设置为D:\work\tools\apache ignite 1.9.0\apache-ignite-fabric-1.9.0-bin


或者用户\u LIBS到D:\work\tools\apache ignite 1.9.0\apache-ignite-fabric-1.9.0-bin\LIBS,正如建议的那样。

我刚刚设置了ignite,但遇到了与ignite 2.6版完全相同的问题

我想我在调试$IGNITE_HOME/bin中的shell脚本后找到了一个简单的解决方案,特别是$IGNITE_HOME/bin/include/setenv.sh

修复方法是从setenv.sh替换此行:

IGNITE_LIBS=${IGNITE_HOME}/LIBS/*

改为使用另一行:

IGNITE_LIBS=${IGNITE_HOME}/LIBS/*${IGNITE_HOME}/libs/IGNITE spring/*

IMHO这样做的原因是IGNITE_LIBS是如何在$IGNITE_HOME/bin/IGNITE.sh中设置类路径的

CP=${IGNITE_LIBS}

$CP稍后用作Java-CP$CP调用中的类路径


由于类路径通配符不是递归的,例如,在发行版中基本上存在一个bug,因为$IGNITE_HOME/libs/*类路径永远找不到$IGNITE_HOME/libs/IGNITE spring/IGNITE-spring-2.6.0.jar,这是您需要的jar,我相信。

我刚刚设置了Ignite,但遇到了与Ignite 2.6版完全相同的问题

我想我在调试$IGNITE_HOME/bin中的shell脚本后找到了一个简单的解决方案,特别是$IGNITE_HOME/bin/include/setenv.sh

修复方法是从setenv.sh替换此行:

IGNITE_LIBS=${IGNITE_HOME}/LIBS/*

改为使用另一行:

IGNITE_LIBS=${IGNITE_HOME}/LIBS/*${IGNITE_HOME}/libs/IGNITE spring/*

IMHO这样做的原因是IGNITE_LIBS是如何在$IGNITE_HOME/bin/IGNITE.sh中设置类路径的

CP=${IGNITE_LIBS}

$CP稍后用作Java-CP$CP调用中的类路径


由于类路径通配符不是递归的,例如,在发行版中基本上存在一个bug,因为$IGNITE_HOME/libs/*类路径永远找不到$IGNITE_HOME/libs/IGNITE spring/IGNITE-spring-2.6.0.jar,我相信这就是您需要的jar。

尝试取消IGNITE_HOME,即设置为空字符串。我还将尝试删除名称中带有空格的目录。这可能会引起麻烦。我星期二上班的时候会试试。Thanksry取消设置IGNITE_HOME,即设置为空字符串。我还将尝试删除名称中带有空格的目录。这可能会引起麻烦。我星期二上班的时候会试试。谢谢