Open Tomas-Kraus opened 13 years ago
@glassfishrobot Commented Reported by wargoth
@glassfishrobot Commented wargoth said: When I comment out the second field, it compiles fine
@glassfishrobot Commented snajper said: customization can be used for such cases, but will look into how to prevent this automatically
@glassfishrobot Commented Was assigned to snajper
@glassfishrobot Commented This issue was imported from java.net JIRA JAXB-827
Trace:
Exception in thread "main" java.lang.IllegalArgumentException: trying to create the same field twice: ts1EnbDirectInfoTransferTrir at com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:421) at com.sun.codemodel.JDefinedClass.field(JDefinedClass.java:392) at com.sun.tools.xjc.generator.bean.field.AbstractFieldWithVar.createField(AbstractFieldWithVar.java:77) at com.sun.tools.xjc.generator.bean.field.SingleField.(SingleField.java:94)
at com.sun.tools.xjc.generator.bean.field.SingleField.(SingleField.java:81)
at sun.reflect.GeneratedConstructorAccessor8.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.sun.tools.xjc.generator.bean.field.GenericFieldRenderer.generate(GenericFieldRenderer.java:69)
at com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(DefaultFieldRenderer.java:84)
at com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(BeanGenerator.java:764)
at com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(BeanGenerator.java:545)
at com.sun.tools.xjc.generator.bean.BeanGenerator.(BeanGenerator.java:248)
at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:166)
at com.sun.tools.xjc.model.Model.generateCode(Model.java:290)
at com.sun.tools.xjc.Driver.run(Driver.java:348)
at com.sun.tools.xjc.Driver.run(Driver.java:196)
at com.sun.tools.xjc.Driver._main(Driver.java:121)
at com.sun.tools.xjc.Driver.access$000(Driver.java:79)
at com.sun.tools.xjc.Driver$1.run(Driver.java:101)
In XML I have two fields with the same name, but the are in different cases, which is legal:
Environment
Ubuntu 10.04.2 LTS, NFS mount
Affected Versions
[2.2.3]