Skip to main content

jaxb run-time error

1 reply [Last post]
garygu
Offline
Joined: 2010-10-17

can any point have quick answer to following exception? When i run a sample code of jaxb, it throws error at

JAXBContext context = JAXBContext.newInstance("chap11.PurchaseOrder.class");

Thanks

javax.xml.bind.JAXBException: "chap11.PurchaseOrder.class" doesnt contain ObjectFactory.class or jaxb.index
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:127)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:276)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:412)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:375)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:279)

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
garygu
Offline
Joined: 2010-10-17

sorry i meant "can anyone have ...."