Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

doesnt contain ObjectFactory.class or jaxb.index when building by BuildDesk

810221Nov 3 2010 — edited Nov 8 2010
When I built my Java application that uses JAXB in it, javax.xml.bind.JAXBException: "com.xxx.model.configuration" doesnt contain ObjectFactory.class or jaxb.index occurs.
The source code runs well in eclipse or netbeans, but when I build a setup file by using BuildDesk, this exception occurs. I am using the following source code to generate the JAXBContext:
Line: -----
@SuppressWarnings("unchecked")
public static <T> T unmarshal(String packageInfo, InputStream is) {
try {
JAXBContext jc = JAXBContext.newInstance(packageInfo);
Unmarshaller unmarshaller = jc.createUnmarshaller();

JAXBElement<T> je = (JAXBElement<T>) unmarshaller.unmarshal(is);
return je.getValue();
} catch (JAXBException e) {
e.printStackTrace();
}
return null;
}
Line: -----
Exceptions are as follows:
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] javax.xml.bind.JAXBException: "com.xxxxx.model.configuration" doesnt contain ObjectFactory.class or jaxb.index
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at com.sun.xml.internal.bind.v2.ContextFactory.createContext(ContextFactory.java:186)
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at java.lang.reflect.Method.invoke(Method.java:597)
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:128)
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at javax.xml.bind.ContextFinder.find(ContextFinder.java:290)
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at t.a(SourceFile:85)
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at t.a(SourceFile:67)
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at bs.c(SourceFile:42)
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at bs.b(SourceFile:47)
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at cl.<init>(SourceFile:35)
02/11/2010 16:59:54 [0x0-0xe50e5].com.xxxxx.gui.XxxxGUI[1475] at com.xxxxx.gui.XxxxGUI.<init>(SourceFile:32)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 6 2010
Added on Nov 3 2010
4 comments
17,679 views