Bert, can I ask you to create a new Jira ticket at
http://jira.codehaus.org/browse/CASTOR and attach all relevant (albeit simplified) files related to this problem. I honestly would like to be be able to replay this problem. Regards Werner Bert Verhees wrote: > Werner Guttmann schreef: >> Hi Bert, >> >> what does the exact property definition look like, and how are you >> trying to map this with Castor XML ? >> > It is a very simple POJO class, I copy it below. This class however is > the type of property/element in another class, so Mappingtool tries to > map it impliciet while mapping that other class. > > First the source of the class which triggers the error (the property > "identifiers"). Forget about the annotations, they serve a complete > other purpose > The super-class PartyProxy also is not the cause. Because of the > complexity of the project, it is not possible to show you all related > classes, and it saves you time also. The exception really occurs when > the mappingtool tries to create a mapping for "identifiers". > > It is part of a complex of mainly related POJO-classes, that is why I > want to use the mapping-tool, so it creates a good base mapping, which I > can then modify by hand. > > Anyway, here is the sourcecode from that one class. > > Thanks, Bert > > public class PartyIdentified extends PartyProxy { > List<DvIdentifier> identifiers; > String name; > > @FullConstructor > public PartyIdentified( > @Attribute(name = "externalRef")PartyRef > externalRef, > @Attribute(name = "name")String name, > @Attribute(name = > "identifiers")List<DvIdentifier> identifiers) { > super(externalRef); > if(externalRef == null && name == null && identifiers == > null) { > > throw new IllegalArgumentException("externalRef, > name, identifiers all empty"); > } > if(name != null && StringUtils.isEmpty(name)) { > throw new IllegalArgumentException("empty name"); > } > if(identifiers != null && identifiers.size() == 0) { > throw new IllegalArgumentException("empty > identifiers"); > > } > this.name = name; > this.identifiers = identifiers; > } > > //POJO start > public PartyIdentified() { > super(); > } > > public List<DvIdentifier> getIdentifiers() { > return identifiers; > } > > public String getName() { > return name; > } > > public void setIdentifiers(List<DvIdentifier> identifiers) { > assertMutable(); > this.identifiers = identifiers; > } > > public void setName(String name) { > assertMutable(); > this.name = name; > } > } > > >> Regards >> Werner >> >> Bert Verhees wrote: >> >>> On vrijdag 17 april 2009 22:49:33 Werner Guttmann wrote: >>> >>>> Bert, >>>> >>>> if you checked out the source code yourself, please execute a >>>> >>>> >>>>> mvn compile >>>>> >>>> from the root directory, and you'll soon thereafter see those classes >>>> being added. >>>> >>> Thanks, Werner, that did the trick, I have the source files. >>> >>> Now is clear what I expected. The original problem is that "list" is >>> not in the members-hashtable in FieldMappingCollectionType.java >>> >>> Now, what shall I do now? >>> >>> Is it because the CollectionHandlers-class should not return "list", >>> but "arraylist" instead? >>> >>> Or should list be added to the member-hashtable? >>> >>> Or should it be added to Jira as an error? >>> >>> It definitely seems an error to me that "list" (java.util.List) is >>> not recognized as a valid type. >>> >>> What is in your opinion best to do? >>> >>> Bert >>> >>> . >>> >>>> Regards >>>> Werner >>>> >>>> Bert Verhees wrote: >>>> >>>>> On vrijdag 17 april 2009 20:24:27 Werner Guttmann wrote: >>>>> >>>>>> HI Ralf, Hi Bert, >>>>>> >>>>>> I assume we are looking at 1.3 here. Somehow I am getting the >>>>>> impression >>>>>> the source JARs do not include the sourced generated from the XML >>>>>> schemas such as e.g. mapping.xsd. But let's wait for a reply first. >>>>>> >>>>> Hi Ralf, Werner >>>>> >>>>> Thanks for your reply. It is indeed 1.3 and indeed some sourcefiles >>>>> seem >>>>> to be missing. >>>>> I did a svn co from the trunk, and in there is mapping.xsd. But the >>>>> other >>>>> files, I mentioned are not there . >>>>> org.exolab.castor.mapping.xml.types.FieldMappingCollectionType.java >>>>> or >>>>> org.exolab.castor.mapping.xml.FieldMapping.java >>>>> >>>>> That is strange, but it wouldn't be a problem if I did not have that >>>>> exception which I cannot explain, and which is my original problem >>>>> >>>>> regards >>>>> Bert >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe from this list, please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe from this list, please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> >> > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

