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

NOTE: This article is 3 years or older so its information may no longer be relevant. Read on at your own discretion! Comments for this article have automatically been locked, refer to the FAQ for more details.
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:
/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.


Hope you found this post useful...

...so please read on! I love writing articles that provide beneficial information, tips and examples to my readers. All information on my blog is provided free of charge and I encourage you to share it as you wish. There is a small favour I ask in return however - engage in comments below, provide feedback, and if you see mistakes let me know.

If you want to show additional support and help me pay for web hosting and domain name registration, donations, no matter how small, are always welcome!

Use of any information contained in this blog post/article is subject to this disclaimer.
comments powered by Disqus
Other posts you may like...