Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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.
 
"How many licks ..." - I think all of this dog's research starts with these words. Tasty tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic