java.lang.NoClassDefFoundError: javax.xml.bind.annotation.XmlRootElement

Spring JIRA | Roy Clarkson | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    LinkedIntTemplate cannot work on Android because of dependency on javax.xml.bind library. It is not available in any version of Android. java.lang.NoClassDefFoundError: javax.xml.bind.annotation.XmlRootElement at java.lang.Class.getDeclaredAnnotations(Native Method) at org.codehaus.jackson.map.introspect.AnnotatedClass.resolveClassAnnotations(AnnotatedClass.java:292) at org.codehaus.jackson.map.introspect.AnnotatedClass.construct(AnnotatedClass.java:139) at org.codehaus.jackson.map.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.java:149) at org.codehaus.jackson.map.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.java:16) at org.codehaus.jackson.map.DeserializationConfig.introspect(DeserializationConfig.java:787) at org.codehaus.jackson.map.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:303) at org.codehaus.jackson.map.deser.StdDeserializerProvider._createDeserializer(StdDeserializerProvider.java:364) at org.codehaus.jackson.map.deser.StdDeserializerProvider._createAndCache2(StdDeserializerProvider.java:286) at org.codehaus.jackson.map.deser.StdDeserializerProvider._createAndCacheValueDeserializer(StdDeserializerProvider.java:266) at org.codehaus.jackson.map.deser.StdDeserializerProvider.hasValueDeserializerFor(StdDeserializerProvider.java:196) at org.codehaus.jackson.map.ObjectMapper.canDeserialize(ObjectMapper.java:1333) at org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.canRead(MappingJacksonHttpMessageConverter.java:94) at org.springframework.web.client.RestTemplate$AcceptHeaderRequestCallback.doWithRequest(RestTemplate.java:518) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:449) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:414) at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:212) at org.springframework.social.linkedin.api.impl.LinkedInTemplate.getConnections(LinkedInTemplate.java:63) at org.springframework.social.linkedin.api.impl.LinkedInTemplateTest.testGetConnections(LinkedInTemplateTest.java:93) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154) at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:529) at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlRootElement in loader dalvik.system.PathClassLoader[/system/framework/android.test.runner.jar:/data/app/org.springframework.android.auth.test-1.apk:/data/app/org.springframework.android.auth.test-1.apk] at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240) at java.lang.ClassLoader.loadClass(ClassLoader.java:551) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) ... 31 more

    Spring JIRA | 6 years ago | Roy Clarkson
    java.lang.NoClassDefFoundError: javax.xml.bind.annotation.XmlRootElement
  2. 0

    LinkedIntTemplate cannot work on Android because of dependency on javax.xml.bind library. It is not available in any version of Android. java.lang.NoClassDefFoundError: javax.xml.bind.annotation.XmlRootElement at java.lang.Class.getDeclaredAnnotations(Native Method) at org.codehaus.jackson.map.introspect.AnnotatedClass.resolveClassAnnotations(AnnotatedClass.java:292) at org.codehaus.jackson.map.introspect.AnnotatedClass.construct(AnnotatedClass.java:139) at org.codehaus.jackson.map.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.java:149) at org.codehaus.jackson.map.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.java:16) at org.codehaus.jackson.map.DeserializationConfig.introspect(DeserializationConfig.java:787) at org.codehaus.jackson.map.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:303) at org.codehaus.jackson.map.deser.StdDeserializerProvider._createDeserializer(StdDeserializerProvider.java:364) at org.codehaus.jackson.map.deser.StdDeserializerProvider._createAndCache2(StdDeserializerProvider.java:286) at org.codehaus.jackson.map.deser.StdDeserializerProvider._createAndCacheValueDeserializer(StdDeserializerProvider.java:266) at org.codehaus.jackson.map.deser.StdDeserializerProvider.hasValueDeserializerFor(StdDeserializerProvider.java:196) at org.codehaus.jackson.map.ObjectMapper.canDeserialize(ObjectMapper.java:1333) at org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.canRead(MappingJacksonHttpMessageConverter.java:94) at org.springframework.web.client.RestTemplate$AcceptHeaderRequestCallback.doWithRequest(RestTemplate.java:518) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:449) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:414) at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:212) at org.springframework.social.linkedin.api.impl.LinkedInTemplate.getConnections(LinkedInTemplate.java:63) at org.springframework.social.linkedin.api.impl.LinkedInTemplateTest.testGetConnections(LinkedInTemplateTest.java:93) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169) at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154) at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:529) at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlRootElement in loader dalvik.system.PathClassLoader[/system/framework/android.test.runner.jar:/data/app/org.springframework.android.auth.test-1.apk:/data/app/org.springframework.android.auth.test-1.apk] at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240) at java.lang.ClassLoader.loadClass(ClassLoader.java:551) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) ... 31 more

    Spring JIRA | 6 years ago | Roy Clarkson
    java.lang.NoClassDefFoundError: javax.xml.bind.annotation.XmlRootElement
  3. 0

    GoogleMaps V2 on api 10

    Stack Overflow | 8 months ago | hackingforgirls
    android.view.InflateException: Binary XML file line #106: Error inflating class fragment
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Ругается на MapView

    GitHub | 4 years ago | IlyaZh
    java.lang.RuntimeException: Unable to start activity ComponentInfo{ru.mapkittest/ru.mapkittest.path.MapPathActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class ru.yandex.yandexmapkit.MapView
  6. 0

    Test fail.I create a test project and test the main project. The error occur.

    GitHub | 4 years ago | John4github
    java.lang.RuntimeException: Unable to instantiate application com.gohouse.android.android.app.GohouseApplication_: java.lang.ClassNotFoundException: com.gohouse.android.android.app.GohouseApplication_ in loader dalvik.system.PathClassLoader[/system/framework/android.test.runner.jar:/data/app/com.gohouse.android.broker.test-2.apk:/data/app/com.gohouse.android.broker-2.apk]

  1. bayukresno 3 times, last 10 months ago
7 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.xml.bind.annotation.XmlRootElement in loader dalvik.system.PathClassLoader[/system/framework/android.test.runner.jar:/data/app/org.springframework.android.auth.test-1.apk:/data/app/org.springframework.android.auth.test-1.apk]

    at dalvik.system.PathClassLoader.findClass()
  2. Android Platform
    PathClassLoader.findClass
    1. dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
    1 frame
  3. Java RT
    Class.getDeclaredAnnotations
    1. java.lang.ClassLoader.loadClass(ClassLoader.java:551)
    2. java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    3. java.lang.Class.getDeclaredAnnotations(Native Method)
    3 frames
  4. Data Mapper for Jackson
    ObjectMapper.canDeserialize
    1. org.codehaus.jackson.map.introspect.AnnotatedClass.resolveClassAnnotations(AnnotatedClass.java:292)
    2. org.codehaus.jackson.map.introspect.AnnotatedClass.construct(AnnotatedClass.java:139)
    3. org.codehaus.jackson.map.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.java:149)
    4. org.codehaus.jackson.map.introspect.BasicClassIntrospector.forDeserialization(BasicClassIntrospector.java:16)
    5. org.codehaus.jackson.map.DeserializationConfig.introspect(DeserializationConfig.java:787)
    6. org.codehaus.jackson.map.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:303)
    7. org.codehaus.jackson.map.deser.StdDeserializerProvider._createDeserializer(StdDeserializerProvider.java:364)
    8. org.codehaus.jackson.map.deser.StdDeserializerProvider._createAndCache2(StdDeserializerProvider.java:286)
    9. org.codehaus.jackson.map.deser.StdDeserializerProvider._createAndCacheValueDeserializer(StdDeserializerProvider.java:266)
    10. org.codehaus.jackson.map.deser.StdDeserializerProvider.hasValueDeserializerFor(StdDeserializerProvider.java:196)
    11. org.codehaus.jackson.map.ObjectMapper.canDeserialize(ObjectMapper.java:1333)
    11 frames
  5. Spring
    RestTemplate.getForObject
    1. org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.canRead(MappingJacksonHttpMessageConverter.java:94)
    2. org.springframework.web.client.RestTemplate$AcceptHeaderRequestCallback.doWithRequest(RestTemplate.java:518)
    3. org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:449)
    4. org.springframework.web.client.RestTemplate.execute(RestTemplate.java:414)
    5. org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:212)
    5 frames
  6. LinkedIn API
    LinkedInTemplateTest.testGetConnections
    1. org.springframework.social.linkedin.api.impl.LinkedInTemplate.getConnections(LinkedInTemplate.java:63)
    2. org.springframework.social.linkedin.api.impl.LinkedInTemplateTest.testGetConnections(LinkedInTemplateTest.java:93)
    2 frames
  7. Java RT
    Method.invokeNative
    1. java.lang.reflect.Method.invokeNative(Native Method)
    1 frame
  8. Android Platform
    Instrumentation$InstrumentationThread.run
    1. android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
    2. android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
    3. android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:529)
    4. android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)
    4 frames