• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JAXBContext - IncompatibleClassChangeError

 
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello:

Please help! What could be the problem?

I got the running time error for the following code:
JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );

ERROR:
java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)
at com.evermind.naming.ContextClassLoader.defineClass(ContextClassLoader.java:993)
at com.evermind.naming.ContextClassLoader.findClass(ContextClassLoader.java:257)
at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at com.evermind.server.ApplicationContextClassLoader.findClass(ApplicationContextClassLoader.java:19)
at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at com.sun.xml.bind.ContextFactory_1_0_1.createContext(ContextFactory_1_0_1.java:45)
at java.lang.reflect.Method.invoke(Native Method)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:96)
at javax.xml.bind.ContextFinder.searchcontextPath(ContextFinder.java:229)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:149)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:281)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:238)

...
 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IncompatibleClassChangeError javadoc

Seems like you compiled your program using a different version of the library than the one you're using when you run the program. Check the build classpath and compare it to the run classpath.
 
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic