File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

JAXB Error

Amit G Piplani
Ranch Hand

Joined: Jul 21, 2004
Posts: 83
Hi,
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

Thanks,
Amit


SCJP,SCWCD,SCBCD,SCDJWS1.4, SCDJWS1.5
chinna sankar
Greenhorn

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
Greenhorn

Joined: Mar 27, 2005
Posts: 1
Hi.

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 'XXX.java' file will be created, and also a 'XXXType.java'.
2�/ For your 'XXXType' xsd class, the 'XXXType.java' file will could not be created. Already created on the first step.

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

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

ffpierre at yahoo dot fr
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAXB Error
 
Similar Threads
JAXB XJC compiling Issue
How can I bind JSF forms directly to JAXB objects
my package doesnt contain ObjectFactory.class or jaxb.index
JAXB compatible woth java1.4 ?
Generalized Parsing for SOAP Response