File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes JAXB Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "JAXB Error" Watch "JAXB Error" New topic

JAXB Error

Amit G Piplani
Ranch Hand

Joined: Jul 21, 2004
Posts: 83
I am trying to use JAXB for converting my xsd into a java objects. These Objects can be used for Building XML doucment,which can be further used for sending through output stream.
I am getting following error when i ran xjx.bat file:

C:\eChase_Components_1\WSTest\WSTest\test>D:\Sun\jwsdp-1.5\jaxb\bin\xjc -p test rsi.xsd
parsing a schema...
[ERROR] A class/interface with the same name "test.AccountType" is already in u
e. Use a class customization to resolve this conflict.
line 3846 of rsi.xsd

Any advice\help will be highly appreciated


chinna sankar

Joined: Mar 06, 2005
Posts: 22
It seems u already having test package in your application.Mention Work location directory explicitly(other than ur Apllication).

xjc -p test rsi.xsd <worklocationdir>

Still u are getting the error just check with the JDK version and Schema.
Fabrice PIERRE - SALTO Consulting

Joined: Mar 27, 2005
Posts: 1

This error could appear when you create in your xsd file :
1�/ 'XXX' xsd class
2�/ 'XXXType' xsd class.

When trying to compile the xsd file :
1�/ For your 'XXX' xsd class, a '' file will be created, and also a ''.
2�/ For your 'XXXType' xsd class, the '' file will could not be created. Already created on the first step.

Replace XXX by 'Account'.
I hope this could help.

SALTO Consulting
[ March 31, 2005: Message edited by: Fabrice PIERRE - SALTO Consulting ]

ffpierre at yahoo dot fr
I agree. Here's the link:
subject: JAXB Error
It's not a secret anymore!