Issue Details (XML | Word | Printable)

Key: JAXB-951
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Iaroslav Savytskyi
Reporter: kuoweiwang
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
jaxb

JAXB error when unmarshalling, Exception in thread "main" javax.xml.bind.UnmarshalException:

Created: 14/Mar/13 08:49 PM   Updated: 15/Mar/13 06:42 AM
Component/s: xjc
Affects Version/s: 2.1.10
Fix Version/s: None

Time Tracking:
Not Specified

Environment:

Linux x64 redhat 5


Tags: jaxb-xjc
Participants: Iaroslav Savytskyi, kuoweiwang and laune


 Description  « Hide

I have a really wierd problem here.
Setup:

package jaxb_conainer_class;
package loader_class;

Main.java imports both loader_class and jaxb_conainer_class In the loader_class:

JAXBContext context = JAXBContext.newInstance("jaxb_conainer_class");
Unmarshaller u = context.createUnmarshaller();
MClass mClass = (MClass) u.unmarshal(file);

The problem i see is if I compile the packages above separately, everything works. i.e "javac axb_conainer_class; javac Main.java", everything works. However, If I remove all the .class files and do "javac Main.java" only then I got the error. Exception in thread "main" javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"M.class"). Expected elements are (none)



laune added a comment - 15/Mar/13 04:49 AM

Please don't use the JIRA bug tracking system to ask for help. Restate your problem on the JAXB user mailing list, making sure to use correct terms and statements. (The description of your problem contains several very implausible statements. For instance, compiling just Main.java will not let you run it as it depends on other classes.)


kuoweiwang added a comment - 15/Mar/13 06:42 AM

got it .thanks