• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JAXB processing XJC compilation errors

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic