Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

I've recently had to use a different JAX-WS library for some development work on a project, which worked great by placing all the jar files into the Java Extensions directory, however when I went back to trying to compile another project I had, everything started to break, I was getting exceptions I have never seen before. After a bit of investigation, it turned out that the NetBeans JAXB libraries do no like being mixed with the JAX-WS libraries. The fix is simple, remove the 3rd party libraries from the Extensions directory.

This is the error I was getting:
CommandCore.xjc-typedef-target:
/xxx/nbproject/build-impl.xml:582: The following error occurred while executing this line:
/xxx/nbproject/build-impl.xml:1061: The following error occurred while executing this line:
/xxx/nbproject/xml_binding_build.xml:8: typedef A class needed by class com.sun.tools.xjc.XJCTask cannot be found: org/apache/tools/ant/DynamicConfigurator
using the classloader AntClassLoader[/Applications/NetBeans/NetBeans 7.1.2.app/Contents/Resources/NetBeans/ide/modules/ext/jaxb/jaxb-impl.jar:/Applications/NetBeans/NetBeans 7.1.2.app/Contents/Resources/NetBeans/ide/modules/ext/jaxb/activation.jar:/Applications/NetBeans/NetBeans 7.1.2.app/Contents/Resources/NetBeans/ide/modules/ext/jaxb/jaxb1-impl.jar:/Applications/NetBeans/NetBeans 7.1.2.app/Contents/Resources/NetBeans/ide/modules/ext/jaxb/jaxb-xjc.jar:/Applications/NetBeans/NetBeans 7.1.2.app/Contents/Resources/NetBeans/ide/modules/ext/jaxb/api/jaxb-api.jar:/Applications/NetBeans/NetBeans 7.1.2.app/Contents/Resources/NetBeans/ide/modules/ext/jaxb/api/jsr173_api.jar]
BUILD FAILED (total time: 0 seconds)


When I checked the Extensions directory of course these were the culprits:
[email protected]:/Library/Java/Extensions > ls
FastInfoset.jar jaxb-impl.jar jsr173_api.jar policy.jar streambuffer.jar
activation.jar jaxb-xjc.jar jsr181-api.jar resolver.jar woodstox.jar
gmbal-api-only.jar jaxws-api.jar jsr250-api.jar saaj-api.jar
http.jar jaxws-rt.jar management-api.jar saaj-impl.jar
jaxb-api.jar jaxws-tools.jar mimepull.jar stax-ex.jar


Simply moving these out fixed the issue.



-i


A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. Use of any information from my blog posts should be at own risk and I do not hold any liability towards any information misuse or damages caused by following any of my posts.

All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle). Use of any information contained in this blog post/article is subject to this disclaimer.
Hi! You can search my blog here ⤵
NOTE: (2022) This Blog is no longer maintained and I will not be answering any emails or comments.

I am now focusing on Atari Gamer.