java.lang.NoClassDefFoundError: javax/ws/rs/Path

SpringSource Issue Tracker | Martin Lippert | 3 years ago
  1. 0

    I am using the latest restbucks example app from Oliver and I came across this exception: {noformat} Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter cannot be found by org.springframework.data.core_1.7.0.20140120-CI at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 59 more {noformat} followed by another one: {noformat} java.lang.NoClassDefFoundError: javax/ws/rs/Path at org.springframework.hateoas.config.LinkBuilderBeanDefinitionRegistrar$JaxRsEntityControllerBuilderDefinitionBuilder.getBeanDefinition(LinkBuilderBeanDefinitionRegistrar.java:99) at org.springframework.hateoas.config.LinkBuilderBeanDefinitionRegistrar.registerBeanDefinitions(LinkBuilderBeanDefinitionRegistrar.java:74) at org.springframework.hateoas.config.HypermediaSupportBeanDefinitionRegistrar.registerBeanDefinitions(HypermediaSupportBeanDefinitionRegistrar.java:96) at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:319) {noformat} All this happens because of classloader confusion in Spring IDE, where the classloader that is being used for reading the JavaConfig is using a parent classloader from Spring IDE (org.springframework.ide.eclipse.core) that is itself having a DynamicImport-Package: * on its manifest. This opens the door to various issues around loading classes from the IDE instead of the project classpath.

    SpringSource Issue Tracker | 3 years ago | Martin Lippert (c)
    java.lang.NoClassDefFoundError: javax/ws/rs/Path
  2. 0

    I am using the latest restbucks example app from Oliver and I came across this exception: {noformat} Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter cannot be found by org.springframework.data.core_1.7.0.20140120-CI at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 59 more {noformat} followed by another one: {noformat} java.lang.NoClassDefFoundError: javax/ws/rs/Path at org.springframework.hateoas.config.LinkBuilderBeanDefinitionRegistrar$JaxRsEntityControllerBuilderDefinitionBuilder.getBeanDefinition(LinkBuilderBeanDefinitionRegistrar.java:99) at org.springframework.hateoas.config.LinkBuilderBeanDefinitionRegistrar.registerBeanDefinitions(LinkBuilderBeanDefinitionRegistrar.java:74) at org.springframework.hateoas.config.HypermediaSupportBeanDefinitionRegistrar.registerBeanDefinitions(HypermediaSupportBeanDefinitionRegistrar.java:96) at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:319) {noformat} All this happens because of classloader confusion in Spring IDE, where the classloader that is being used for reading the JavaConfig is using a parent classloader from Spring IDE (org.springframework.ide.eclipse.core) that is itself having a DynamicImport-Package: * on its manifest. This opens the door to various issues around loading classes from the IDE instead of the project classpath.

    SpringSource Issue Tracker | 3 years ago | Martin Lippert
    java.lang.NoClassDefFoundError: javax/ws/rs/Path
  3. 0

    NoClassDefFoundError if @EnableHypermediaSupport is used without adding spring-plugin dependency

    GitHub | 4 years ago | azagorneanu
    java.lang.NoClassDefFoundError: org/springframework/plugin/core/support/PluginRegistryFactoryBean
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error starting pentaho BI Server in websphere 8.5 server: javax.ws.rs.Produces Class Not Found - Stack Overflow

    coderissues.com | 1 year ago
    org.pentaho.platform.engine.core.system.PentahoSystem: org.pentaho.platform.api.engine.PentahoSystemException: PentahoSystem.ERROR_0014 - Error mientras se intentaba ejecutar la secuencia de arranque por org.pentaho.platform.plugin.services.pluginmgr.PluginAdapter org.pentaho.platform.api.engine.PentahoSystemException: org.pentaho.platform.api.engine.PentahoSystemException: PentahoSystem.ERROR_0014 - Error mientras se intentaba ejecutar la secuencia de arranque por org.pentaho.platform.plugin.services.pluginmgr.PluginAdapter

    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.NoClassDefFoundError

      javax/ws/rs/Path

      at org.springframework.hateoas.config.LinkBuilderBeanDefinitionRegistrar$JaxRsEntityControllerBuilderDefinitionBuilder.getBeanDefinition()
    2. Spring Hateoas
      HypermediaSupportBeanDefinitionRegistrar.registerBeanDefinitions
      1. org.springframework.hateoas.config.LinkBuilderBeanDefinitionRegistrar$JaxRsEntityControllerBuilderDefinitionBuilder.getBeanDefinition(LinkBuilderBeanDefinitionRegistrar.java:99)
      2. org.springframework.hateoas.config.LinkBuilderBeanDefinitionRegistrar.registerBeanDefinitions(LinkBuilderBeanDefinitionRegistrar.java:74)
      3. org.springframework.hateoas.config.HypermediaSupportBeanDefinitionRegistrar.registerBeanDefinitions(HypermediaSupportBeanDefinitionRegistrar.java:96)
      3 frames
    3. Spring Context
      ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars
      1. org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:319)
      1 frame