java.lang.ClassFormatError when creating JAXBContext object



Hi,
I am trying to marshal an XML document using JAXB 2.0. At runtime,
when my web application tries to create a JAXBContext object, I get
the following exception:

type Exception report

message

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception

org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:
125)

root cause

java.lang.ClassFormatError: Illegal class modifiers in class com/
innatedb/xml/mi/package-info: 0x1600
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
124)

org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:
1815)

org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:
869)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1322)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1201)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:242)
java.lang.Package.getPackageInfo(Package.java:350)
java.lang.Package.getAnnotation(Package.java:361)

com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.getPackageAnnotation(RuntimeInlineAnnotationReader.java:
85)

com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.getPackageAnnotation(RuntimeInlineAnnotationReader.java:
17)

com.sun.xml.bind.v2.model.impl.TypeInfoImpl.parseElementName(TypeInfoImpl.java:
86)

com.sun.xml.bind.v2.model.impl.ClassInfoImpl.<init>(ClassInfoImpl.java:
126)

com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.<init>(RuntimeClassInfoImpl.java:
50)

com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createClassInfo(RuntimeModelBuilder.java:
59)

com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createClassInfo(RuntimeModelBuilder.java:
41)

com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:
123)

com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:
49)

com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:
41)

com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:
189)

com.sun.xml.bind.v2.model.impl.RegistryInfoImpl.<init>(RegistryInfoImpl.java:
63)

com.sun.xml.bind.v2.model.impl.ModelBuilder.addRegistry(ModelBuilder.java:
232)

com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:
201)
com.sun.xml.bind.v2.runtime.JAXBContextImpl
$3.run(JAXBContextImpl.java:352)
com.sun.xml.bind.v2.runtime.JAXBContextImpl
$3.run(JAXBContextImpl.java:350)
java.security.AccessController.doPrivileged(Native Method)

com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:
349)

com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:
215)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
76)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
55)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
124)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
java.lang.reflect.Method.invoke(Method.java:585)
javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:132)
javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)

com.innatedb.search.interaction.DownloadPsiMiXmlAction.execute(DownloadPsiMiXmlAction.java:
155)

org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:
431)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
236)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:
1196)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:
125)



Here is the line of code which throws the exception:
JAXBContext jc = JAXBContext.newInstance("com.innatedb.xml.mi");

I am using JDK1.6.0
I have no problem creating XML objects from classes based on the xml
schema and I used the xjc compiler belonging to the JKD1.6.0. In
addition, the java class containing the above snippet of code compiles
without any problems.
Is there anything obvious that I am overlooking? Thanks for any
suggestions you can offer.
Geoff

.



Relevant Pages

  • Re: problem with XML DOM load command
    ... with invalid XML and I'm getting suspicious that something in a QFE ... has busted MSXML and its exception processing. ... © 2003 Microsoft Corporation. ... >> So this exception is on your main thread where you're doing the load. ...
    (microsoft.public.windowsce.embedded.vc)
  • XML Verarbeitung
    ... Ich möchte eine XML Datei in ein DataSet einlesen und in einem DataGrid ... An unhandled exception occurred during the execution of the ... Please review the stack trace for more information about ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: writeXML(fullFilePath) DOESNT Write
    ... I also wonder if you get an exception on attempt to load saved file... ... > The following hardware and drivers are not supported in the Emulator: ... > File system drivers, which include file allocation table, compact ... XML into the dataset from the path noted in the code I've provided (using ...
    (microsoft.public.dotnet.framework.compactframework)
  • Client Error When Consuming Web Method
    ... write directly to the XMLDocument. ... (Originally the XML was passed as a string. ... Server was unable to read ... First, is this actually a server side exception, or will the proxy code ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Can I change to field type in an XML schema automatically?
    ... You should catch this exception and print out error messages from error ... >>>I have built an XML file using the DataSet.writeXML method and it creates ... >>> Now the issue I have is getting the Double into a sqlce database. ...
    (microsoft.public.dotnet.framework.compactframework)