org.apache.ignite.IgniteCheckedException

Failed to instantiate Spring XML application context (make sure all classes used in Spring configuration are present at CLASSPATH) [springUrl=file:/C:/temp/apache-ignite-fabric-1.7.0-bin/examples/config/example-ignite.xml]

Samebug tips8

A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web120

  • via Stack Overflow by caccini
    , 9 months ago
    Failed to instantiate Spring XML application context (make sure all classes used in Spring configuration are present at CLASSPATH) [springUrl=file:/C:/temp/apache-ignite-fabric-1.7.0-bin/examples/config/example-ignite.xml]
  • Failed to instantiate Spring XML application context (make sure all classes used in Spring configuration are present at CLASSPATH) [springUrl=file:~/config/cassandra-ignite-config.xml]
  • Failed to instantiate Spring XML application context [springUrl=file:/apache-ignite-fabric-1.9.0-bin/config/default-config.xml, err=Error creating bean with name 'grid.cfg' defined in URL [file:/apache-ignite-fabric-1.9.0-bin/config/default
  • Stack trace

    • org.apache.ignite.IgniteCheckedException: Failed to instantiate Spring XML application context (make sure all classes used in Spring configuration are present at CLASSPATH) [springUrl=file:/C:/temp/apache-ignite-fabric-1.7.0-bin/examples/config/example-ignite.xml] at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:370) at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:87) at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:81) at org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:596) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:774) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:705) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:576) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:546) at org.apache.ignite.Ignition.start(Ignition.java:346) Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.h2.jdbcx.JdbcDataSource] for bean with name 'h2-example-db' defined in URL [file:/C:/temp/apache-ignite-fabric-1.7.0-bin/examples/config/example-default.xml]; nested exception is java.lang.ClassNotFoundException: org.h2.jdbcx.JdbcDataSource at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1325) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:623) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:592) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1394) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:957) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:705) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.applicationContext(IgniteSpringHelperImpl.java:364) ... 9 more Caused by: java.lang.ClassNotFoundException: org.h2.jdbcx.JdbcDataSource 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 org.springframework.util.ClassUtils.forName(ClassUtils.java:246) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:395) at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1346) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1317) ... 18 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    26 times, 4 months ago
    25 times, 5 months ago
    Unknown user
    Once, 5 months ago
    Unknown user
    Once, 1 year ago
    2 times, 7 months ago
    2420 more bugmates