JAXB Binding Exception

前端 未结 2 1964
小蘑菇
小蘑菇 2021-01-15 16:25

I got the folowing error while parsing the XSD to Java Object

Exception in thread \"main\" java.lang.IllegalArgumentException: Expected class ja

相关标签:
2条回答
  • 2021-01-15 16:41

    if you are running XJC under java6, consider this page: http://download.oracle.com/javase/6/docs/technotes/tools/share/xjc.html

    Actually, xjc has been embedeed in jdk6 so you have to use 'xjc command' present in your JAVA_HOME/bin dir.

    0 讨论(0)
  • 2021-01-15 17:01

    I would guess that you're running XJC under Java6, and have the jaxb-api.jar on your classpath. The classes from the Java6 runtime are clashing with the classes in jaxb-api.jar.

    Remove the JAR from the classpath, that should fix it (if that's that's what the problem is).

    0 讨论(0)
提交回复
热议问题