org.springframework.beans.factory.BeanCreationException

Error creating bean with name 'neo4jTemplate' defined in class org.springframework.data.neo4j.config.Neo4jConfiguration: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.data.neo4j.support.Neo4jTemplate org.springframework.data.neo4j.config.Neo4jConfiguration.neo4jTemplate() throws java.lang.Exception] threw exception; nested exception is java.lang.NoClassDefFoundError: org/neo4j/index/impl/lucene/QueryNotPossibleException

Samebug tips9

Check if you didn't forget to instantiate your topic in the kafka broker.

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.

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

Solutions on the web19473

  • via Spring JIRA by Jonathan Crosmer, 1 year ago
    Error creating bean with name 'neo4jTemplate' defined in class org.springframework.data.neo4j.config.Neo4jConfiguration: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method
  • via Spring JIRA by Jonathan Crosmer, 1 year ago
    Error creating bean with name 'neo4jTemplate' defined in class org.springframework.data.neo4j.config.Neo4jConfiguration: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method
  • via howtobuildsoftware.com by Unknown author, 1 year ago
    Error creating bean with name 'neo4jTemplate' defined in class org.springframework.data.neo4j.config.Neo4jConfiguration: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method
  • Stack trace

    • org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'neo4jTemplate' defined in class org.springframework.data.neo4j.config.Neo4jConfiguration: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.data.neo4j.support.Neo4jTemplate org.springframework.data.neo4j.config.Neo4jConfiguration.neo4jTemplate() throws java.lang.Exception] threw exception; nested exception is java.lang.NoClassDefFoundError: org
    • eo4j/index/impl/lucene/QueryNotPossibleException at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:597)[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1095)[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:990)[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706)[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)[spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)[spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.context.support.GenericXmlApplicationContext.<init>(GenericXmlApplicationContext.java:70)[spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE] at com.e2sd.main.Main$$anonfun$makeApplicationContext$2.apply(Main.scala:123)[classes/:na] at com.e2sd.main.Main$$anonfun$makeApplicationContext$2.apply(Main.scala:120)[classes/:na] at scala.util.Try$.apply(Try.scala:161)[scala-library-2.10.5.jar:na] at com.e2sd.main.Main$.makeApplicationContext(Main.scala:120)[classes/:na] at com.e2sd.main.Main$$anonfun$makeApplicationContext$1.applyOrElse(Main.scala:131)[classes/:na] at com.e2sd.main.Main$$anonfun$makeApplicationContext$1.applyOrElse(Main.scala:126)[classes/:na] at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33)[scala-library-2.10.5.jar:na] at scala.util.Failure$$anonfun$recover$1.apply(Try.scala:185)[scala-library-2.10.5.jar:na] at scala.util.Try$.apply(Try.scala:161)[scala-library-2.10.5.jar:na] at scala.util.Failure.recover(Try.scala:185)[scala-library-2.10.5.jar:na] at com.e2sd.main.Main$.makeApplicationContext(Main.scala:126)[classes/:na] at com.e2sd.main.Main$$anonfun$main$2.apply$mcV$sp(Main.scala:43)[classes/:na] at com.e2sd.main.Main$$anonfun$main$2.apply(Main.scala:34)[classes/:na] at com.e2sd.main.Main$$anonfun$main$2.apply(Main.scala:34)[classes/:na] at scala.util.Try$.apply(Try.scala:161)[scala-library-2.10.5.jar:na] at com.e2sd.main.Main$.main(Main.scala:34)[classes/:na] at com.e2sd.main.Main.main(Main.scala)[classes/:na] Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.data.neo4j.support.Neo4jTemplate org.springframework.data.neo4j.config.Neo4jConfiguration.neo4jTemplate() throws java.lang.Exception] threw exception; nested exception is java.lang.NoClassDefFoundError: org
    • eo4j/index/impl/lucene/QueryNotPossibleException at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:188)[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:586)[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] ... 29 more Caused by: java.lang.NoClassDefFoundError: org
    • eo4j/index/impl/lucene/QueryNotPossibleException at org.springframework.data.neo4j.support.Neo4jTemplate.<init>(Neo4jTemplate.java:452)[spring-data-neo4j-3.3.1.RELEASE.jar:na] at org.springframework.data.neo4j.config.Neo4jConfiguration.neo4jTemplate(Neo4jConfiguration.java:136)[spring-data-neo4j-3.3.1.RELEASE.jar:na] at org.springframework.data.neo4j.config.Neo4jConfiguration$$EnhancerBySpringCGLIB$$8216a265.CGLIB$neo4jTemplate$0(<generated>)[spring-core-4.0.9.RELEASE.jar:na] at org.springframework.data.neo4j.config.Neo4jConfiguration$$EnhancerBySpringCGLIB$$8216a265$$FastClassBySpringCGLIB$$6d0438f1.invoke(<generated>)[spring-core-4.0.9.RELEASE.jar:na] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)[spring-core-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:311)[spring-context-4.0.9.RELEASE.jar:4.0.9.RELEASE] at org.springframework.data.neo4j.config.Neo4jConfiguration$$EnhancerBySpringCGLIB$$8216a265.neo4jTemplate(<generated>)[spring-core-4.0.9.RELEASE.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.7.0_55] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[na:1.7.0_55] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.7.0_55] at java.lang.reflect.Method.invoke(Method.java:606)[na:1.7.0_55] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:166)[spring-beans-4.0.9.RELEASE.jar:4.0.9.RELEASE] ... 30 more Caused by: java.lang.ClassNotFoundException: org.neo4j.index.impl.lucene.QueryNotPossibleException at java.net.URLClassLoader$1.run(URLClassLoader.java:366)[na:1.7.0_55] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)[na:1.7.0_55] at java.security.AccessController.doPrivileged(Native Method)[na:1.7.0_55] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)[na:1.7.0_55] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)[na:1.7.0_55] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)[na:1.7.0_55] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[na:1.7.0_55] ... 42 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

    Unknown user
    Once, 1 year ago
    4 times, 1 month ago
    Once, 1 month ago
    Unknown user
    2 times, 3 months ago
    Unknown user
    Once, 5 months ago
    2363 more bugmates