0

Hi All,

I'm trying to compile an xsd schema using xjc compiler following the command

java -jar jaxb-xjc.jar <schema file>.I've set the classpath of these following jar files

jaxb-api.jar

jaxb-impl.jar

jaxb1-impl.jar

jaxb-xjc.jar

sjsxp.jar

jsr173_api.jar

activation.jar

resolver.jar.
It is showing IllegalArgumentException

3
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by stultuske
0

Whole message is as following

parsing a schema...
compiling a schema...
Exception in thread "main" java.lang.IllegalArgumentException: Expected class ja
vax.xml.bind.annotation.XmlAccessType but found class javax.xml.bind.annotation.
AccessType
at com.sun.codemodel.TypedAnnotationWriter.checkType(TypedAnnotationWrit
er.java:187)
at com.sun.codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.
java:101)
at $Proxy1.value(Unknown Source)
at com.sun.tools.xjc.generator.bean.ImplStructureStrategy$1.createClasse
s(ImplStructureStrategy.java:46)
at com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassDef(BeanG
enerator.java:371)
at com.sun.tools.xjc.generator.bean.BeanGenerator.getClazz(BeanGenerator
.java:403)
at com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.j
ava:178)
at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator
.java:151)
at com.sun.tools.xjc.model.Model.generateCode(Model.java:228)
at com.sun.tools.xjc.Driver.run(Driver.java:293)
at com.sun.tools.xjc.Driver.run(Driver.java:170)
at com.sun.tools.xjc.Driver._main(Driver.java:95)
at com.sun.tools.xjc.Driver.access$000(Driver.java:53)
at com.sun.tools.xjc.Driver$1.run(Driver.java:75)

0

One more thing I'm using jdk6 where already an xjc compiler is there.I don't want to use that.

1

well ... as JamesCherrill suggested: READ the message, don't just copy paste it.

Expected class
javax.xml.bind.annotation.XmlAccessType
but found class
javax.xml.bind.annotation.AccessType

there 's your problem

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.