|
I found the bug and have attached a test case, the description of the problem, and a potential fix on the JIRA issue (http://jira.codehaus.org/browse/CASTOR-690).
- Jesse
-----Original Message-----
Hello, Prior to updating to Castor 1.0 I was encountering several issues with deriveByClass elements nested in location elements. There was a fix in version 1.0 that eliminated those particular errors, but now I am encountering "element XXX occurs more than once" errors. I have made several comments in the Bugzilla issue tracker (Bugzilla ID 1550, http://jira.codehaus.org/browse/CASTOR-690). The basics are: - The problem appears in version 1.0 (original ticket
lists version 0.9.5.3 as well) - In my situation, I am using the same element in two different places (parent elements) with deriveByName and the same location. Implementing either of the above work-arounds in either lace makes the error go away. Renaming the location in either place also works around the problem. Now, after renaming one of the location elements, I experience some quirky behavior in the unmarshaller. For example, my schema is roughly equivalent to this: <class name="Account"> In my test I did not specify a customer, so I got the following XML: <acct> But when I unmarshalled the same XML and re-marshalled it, I got this: <acct> For some reason the unmarshaller identified the first <contact> element in the <contacts> wrapper to be the customer (<cust>). Since there can be only one customer, might this be why the "element contact appears more than once" error happens? i.e. the unmarshaller does not correctly identify the element mapping when locations are used? It almost seems like it ignores the location . . . Any insight would be greatly appreciated. Thanks, - Jesse |
Title: element XXX occurs more than once
- [castor-user] element XXX occurs more than once Sweetland, Jesse
- RE: [castor-user] element XXX occurs more than once Sweetland, Jesse
- [castor-user] element xxx occurs more than once murat aydin
- Re: [castor-user] element xxx occurs more than o... Werner Guttmann
- Re: [castor-user] element xxx occurs more th... murat aydin
- Re: [castor-user] element xxx occurs mor... Werner Guttmann

