java.lang.NoClassDefFoundError: com/mysema/query/types/EntityPath

Spring JIRA | Phil Webb | 1 year ago
  1. 0

    Commit {{8d2933f1091230cf22aef9ce41aa7851be49607d}} caused the Spring Boot to fail with the following exception: {noformat} java.lang.NoClassDefFoundError: com/mysema/query/types/EntityPath at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2688) at java.lang.Class.getDeclaredMethods(Class.java:1962) at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:606) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:518) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:504) at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:564) at org.springframework.context.event.EventListenerMethodProcessor.processBean(EventListenerMethodProcessor.java:106) at org.springframework.context.event.EventListenerMethodProcessor.afterSingletonsInstantiated(EventListenerMethodProcessor.java:92) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:792) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) at org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfigurationTests.load(RepositoryRestMvcAutoConfigurationTests.java:120) at org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfigurationTests.testDefaultRepositoryConfiguration(RepositoryRestMvcAutoConfigurationTests.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: java.lang.ClassNotFoundException: com.mysema.query.types.EntityPath 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) ... 38 more {noformat} The root cause seems to be that {{SpringDataWebConfiguration}} now always registers a {{querydslBindingsFactory}} bean. This bean is scanned by Spring 4.2's {{EventListenerMethodProcessor}} which triggers the exception. One possible fix would be to only register QueryDSL beans if it is on the classpath (perhaps by using an {{ImportBeanDefinitionRegistrar}}). A fix could also go into Spring but this won't be ready before we want to release Spring Boot 1.3.M3

    Spring JIRA | 1 year ago | Phil Webb
    java.lang.NoClassDefFoundError: com/mysema/query/types/EntityPath
  2. 0

    Commit {{8d2933f1091230cf22aef9ce41aa7851be49607d}} caused the Spring Boot to fail with the following exception: {noformat} java.lang.NoClassDefFoundError: com/mysema/query/types/EntityPath at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2688) at java.lang.Class.getDeclaredMethods(Class.java:1962) at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:606) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:518) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:504) at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:564) at org.springframework.context.event.EventListenerMethodProcessor.processBean(EventListenerMethodProcessor.java:106) at org.springframework.context.event.EventListenerMethodProcessor.afterSingletonsInstantiated(EventListenerMethodProcessor.java:92) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:792) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) at org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfigurationTests.load(RepositoryRestMvcAutoConfigurationTests.java:120) at org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfigurationTests.testDefaultRepositoryConfiguration(RepositoryRestMvcAutoConfigurationTests.java:67) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: java.lang.ClassNotFoundException: com.mysema.query.types.EntityPath 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) ... 38 more {noformat} The root cause seems to be that {{SpringDataWebConfiguration}} now always registers a {{querydslBindingsFactory}} bean. This bean is scanned by Spring 4.2's {{EventListenerMethodProcessor}} which triggers the exception. One possible fix would be to only register QueryDSL beans if it is on the classpath (perhaps by using an {{ImportBeanDefinitionRegistrar}}). A fix could also go into Spring but this won't be ready before we want to release Spring Boot 1.3.M3

    Spring JIRA | 1 year ago | Phil Webb
    java.lang.NoClassDefFoundError: com/mysema/query/types/EntityPath
  3. 0

    NoClassDefFoundError: org/apache/spark/SparkContext when starting Jetty

    GitHub | 2 years ago | kulkeez
    java.lang.NoClassDefFoundError: org/apache/spark/SparkContext
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Condition evaluation failure when Spring Security except spring-security-web is on the classpath

    GitHub | 2 years ago | wilkinsona
    java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.security.SpringBootWebSecurityConfiguration#ignoredPathsWebSecurityConfigurerAdapter due to internal class not found. This can happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
  6. 0

    Spring Boot Gradle Dependency Conflict when using Mongo DB starter

    Stack Overflow | 2 years ago
    java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration#mbeanExporter due to internal class not found. This can happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)

  1. Andreas Häber 3 times, last 1 week ago
  2. linxiaolong 6 times, last 2 months ago
  3. poroszd 2 times, last 3 months ago
  4. aldrinleal 2 times, last 4 months ago
  5. davidvanlaatum 15 times, last 6 months ago
1 more registered users
84 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    com.mysema.query.types.EntityPath

    at java.net.URLClassLoader$1.run()
  2. Java RT
    Class.getDeclaredMethods
    1. java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    2. java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    3. java.security.AccessController.doPrivileged(Native Method)
    4. java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    5. java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    6. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    7. java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    8. java.lang.Class.getDeclaredMethods0(Native Method)
    9. java.lang.Class.privateGetDeclaredMethods(Class.java:2688)
    10. java.lang.Class.getDeclaredMethods(Class.java:1962)
    10 frames
  3. Spring Core
    ReflectionUtils.getUniqueDeclaredMethods
    1. org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:606)
    2. org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:518)
    3. org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:504)
    4. org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:564)
    4 frames
  4. Spring Context
    EventListenerMethodProcessor.afterSingletonsInstantiated
    1. org.springframework.context.event.EventListenerMethodProcessor.processBean(EventListenerMethodProcessor.java:106)
    2. org.springframework.context.event.EventListenerMethodProcessor.afterSingletonsInstantiated(EventListenerMethodProcessor.java:92)
    2 frames
  5. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:792)
    1 frame
  6. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
    2 frames
  7. Spring Boot AutoConfigure
    RepositoryRestMvcAutoConfigurationTests.testDefaultRepositoryConfiguration
    1. org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfigurationTests.load(RepositoryRestMvcAutoConfigurationTests.java:120)
    2. org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfigurationTests.testDefaultRepositoryConfiguration(RepositoryRestMvcAutoConfigurationTests.java:67)
    2 frames
  8. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:483)
    4 frames
  9. JUnit
    ParentRunner.run
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    5. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    6. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    7. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    8. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    9. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    10. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    11. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    12. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    13. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    14. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    14 frames
  10. JUnit4 Runner
    JUnit4TestReference.run
    1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    1 frame
  11. JUnit3 Runner
    RemoteTestRunner.main
    1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
    4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
    5 frames