• 1 reply
  • Latest Post - ‏2012-08-22T13:36:24Z by Kevan
2233 Posts

Pinned topic WASCE JAXB XJCTask Generates Incorrect JAXB code with no error or warning f

‏2012-08-21T18:33:05Z |
Hi there,

We are using WebSphere Application Server Community Edition We are using the JAXB runtimes shipped with WASCE to compile new schema files into Java JAXB code. In particular, we are using

  • geronimo-jaxb_2.2_spec-1.0.1.jar
  • jaxb-impl-2.2.3-1_W20110706.jar
  • jaxb-xjc-2.2.3-1.jar
  • sxc-jaxb-0.7.3_1.jar

We are using the Ant task defined in the jaxb-xjc-2.2.3-1.jar to do our schema compilations into Java.

We ran into a particularly nasty problem, in which the XJCTask ran without error or warning, but it generated code into the ObjectFactory that, while it compiled OK, caused a runtime error when we tried to create a JAXBContext.

The root cause of the problem is that a schema file held a <complexType> which held a <sequence>, and in the sequence one of our developers had duplicated two of the entries. The duplicated entries cause the silent failure. We removed the entries and things worked. I will attach a (slightly modified) version of the failing XML Schema file.

Question: who maintains this XJCTask and the corresponding JAXB code?

Question: how do we get this defect addressed?


John Cook
Updated on 2012-08-22T13:36:24Z at 2012-08-22T13:36:24Z by Kevan
  • Kevan
    121 Posts

    Re: WASCE JAXB XJCTask Generates Incorrect JAXB code with no error or warning f

    Question 2: WAS CE customers should open a PMR.

    Question 1: In general, JAXB is developed at There are later versions than jaxb-xjc-2.2.3-1.jar (downloads from or via maven).