java.lang.NoClassDefFoundError: javax/jms/JMSContext

Spring JIRA | Andy Wilkinson | 2 months ago
  1. 0

    Using {{SingleConnectionFactory}} with JMS 1.1 results in a {{NoClassDefFoundError}}: {noformat} java.lang.NoClassDefFoundError: javax/jms/JMSContext at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_102] at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[na:1.8.0_102] at java.lang.Class.getDeclaredMethods(Class.java:1975) ~[na:1.8.0_102] at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:628) ~[spring-core-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:505) ~[spring-core-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.buildLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:205) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.findLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:186) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(InitDestroyAnnotationBeanPostProcessor.java:124) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:295) ~[spring-context-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:940) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:741) ~[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861) ~[spring-context-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) ~[spring-context-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:736) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1161) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1150) [spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT] at com.example.Application.main(Application.java:13) [classes/:na] Caused by: java.lang.ClassNotFoundException: javax.jms.JMSContext at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_102] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_102] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_102] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_102] ... 25 common frames omitted {noformat} I believe it's happening when introspecting the various overloaded {{createContext}} methods.

    Spring JIRA | 2 months ago | Andy Wilkinson
    java.lang.NoClassDefFoundError: javax/jms/JMSContext
  2. 0

    Hypermedia-related auto-configuration doesn't back off in the absence of Jackson

    GitHub | 2 weeks ago | wilkinsona
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'halObjectMapperConfigurer' defined in class path resource [org/springframework/boot/autoconfigure/hateoas/HypermediaAutoConfiguration$HypermediaConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/ObjectMapper
  3. 0

    GuavaCacheStatisticsProvider may throw NCD on GuavaCache

    GitHub | 1 year ago | snicoll
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'guavaCacheStatisticsProvider' defined in class path resource [org/springframework/boot/actuate/autoconfigure/CacheStatisticsAutoConfiguration$GuavaCacheStatisticsConfiguration.class]: Post-processing failed of bean type [class org.springframework.boot.actuate.cache.GuavaCacheStatisticsProvider] failed; nested exception is java.lang.IllegalStateException: Failed to introspect bean class [org.springframework.boot.actuate.cache.GuavaCacheStatisticsProvider] for persistence metadata: could not find class that it depends on
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The problem of OpenStack Nova

    Google Groups | 5 years ago | machi...@163.com
    java.lang.NoClassDefFoundError: com/google/ common/cache/LoadingCache
  6. 0

    Spring cloud consul class not found RestTemplateCustomizer

    Stack Overflow | 1 year ago | iamiddy
    java.lang.IllegalStateException: Could not evaluate condition on org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration#loadBalancerClient 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 2 weeks 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

    javax.jms.JMSContext

    at java.net.URLClassLoader.findClass()
  2. Java RT
    Class.getDeclaredMethods
    1. java.net.URLClassLoader.findClass(URLClassLoader.java:381)[na:1.8.0_102]
    2. java.lang.ClassLoader.loadClass(ClassLoader.java:424)[na:1.8.0_102]
    3. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)[na:1.8.0_102]
    4. java.lang.ClassLoader.loadClass(ClassLoader.java:357)[na:1.8.0_102]
    5. java.lang.Class.getDeclaredMethods0(Native Method)[na:1.8.0_102]
    6. java.lang.Class.privateGetDeclaredMethods(Class.java:2701)[na:1.8.0_102]
    7. java.lang.Class.getDeclaredMethods(Class.java:1975)[na:1.8.0_102]
    7 frames
  3. Spring Core
    ReflectionUtils.doWithLocalMethods
    1. org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:628)[spring-core-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    2. org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:505)[spring-core-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    2 frames
  4. Spring Beans
    InitDestroyAnnotationBeanPostProcessor.postProcessMergedBeanDefinition
    1. org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.buildLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:205)[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    2. org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.findLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:186)[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    3. org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(InitDestroyAnnotationBeanPostProcessor.java:124)[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    3 frames
  5. Spring Context
    CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition
    1. org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:295)[spring-context-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    1 frame
  6. Spring Beans
    DefaultListableBeanFactory.preInstantiateSingletons
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:940)[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    4. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    5. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    6. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    7. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    8. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:741)[spring-beans-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    8 frames
  7. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)[spring-context-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)[spring-context-5.0.0.BUILD-SNAPSHOT.jar:5.0.0.BUILD-SNAPSHOT]
    2 frames
  8. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:736)[spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    2. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)[spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    3. org.springframework.boot.SpringApplication.run(SpringApplication.java:313)[spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:1161)[spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1150)[spring-boot-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    5 frames
  9. com.example
    Application.main
    1. com.example.Application.main(Application.java:13)[classes/:na]
    1 frame