Archive for September 19th, 2008


Check JAXB Version in JDK Bundle

There is a very simple and interesting JAXB guide (here) by Jennie Hall, I encounter a problem while running the sample provided. The error is on the Event class on the @XmlTransient annotation.

After some research, the problem is identified as the JAXB version prior to 2.1 will have the error reporting in Netbean as not applicable. However I do not know how to identify the version as it is bundled in the my JDK  6 U2. The solution to this problem is very easy. Just run the JAXB compiler like :

promp:>xjc -version

xjc version “JAXB 2.0 in JDK 1.6″
JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build JAXB
2.0 in JDK 1.6)

I just updated my JDK to 1.6 U10, and the problem is solved. Another happy day :D