This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JAXB processing XJC compilation errors  RSS feed

 
Srikar Kummamuri
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to compile with XJC.bat and getting the following errors. Even after following the procedure according to Kohsuke procedure(
http://weblogs.java.net/blog/kohsuke/archive/2006/03/simple_and_bett.html)

Pleae help.

C:\jaxb_ri\bin>xjc.bat -extension simpleMode.xsd -p org.wwre.schemagencls C:\schemas_2 -d C:\NEWDX\jaxbprj
parsing a schema...
[ERROR] 'ElectronicGameBatteryInformationType' is already defined
line 37 of file:/C:/schemas_2/ean.ucc/align/entertainment/electronic_games/ElectronicGameBatteryInformation.xsd

[ERROR] (related to above error) the first definition appears here
line 27 of file:/C:/schemas_2/ean.ucc/align/entertainment/ElectronicGameBatteryInformation.xsd

[ERROR] 'AbstractDescriptionType' is already defined
line 28 of file:/C:/schemas_2/ean.ucc/common/AbstractDescriptionOLD.xsd

[ERROR] (related to above error) the first definition appears here
line 22 of file:/C:/schemas_2/ean.ucc/common/AbstractDescription.xsd
 
Tim LeMaster
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I bet you have an element and a complex type with the same name probably besides capitalization.

You have an element named - electronicGameBatteryInformationType
and a complex type named - ElectronicGameBatteryInformationType

If this is the issue you can solve it by customizing the namespace bindings. Take a look at elementName and suffix.

http://java.sun.com/javaee/5/docs/tutorial/doc/JAXB9.html
 
Srikar Kummamuri
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim. Now i am in the next error stage, where it is compligining about the same Class generation since i gote have several instances where the types are named the same but belong to two different namespaces. The error now is
compiling a schema...

[ERROR] A class/interface with the same name "org.wwre.schemagencls.BarCodeTypeListType" is already in use. Use a class

customization to resolve this conflict.

line 21 of file:/C:/schemas_sri/ean.ucc/gdsn/BarCodeTypeList.xsd



[ERROR] (Relevant to above error) another "BarCodeTypeListType" is generated from here.

line 24 of file:/C:/schemas_sri/ean.ucc/align/BarCodeTypeList.xsd

Thanks for your help.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!