We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

How do I set java endorsed standards mechanism in Netbeans 6 with Windows Vista?

sunnystar
sunnystar asked
on
Medium Priority
1,130 Views
Last Modified: 2013-12-14
I have a project using Netbeans 6.5 using web services. Build is happening with Windows Vista, on a project that had previously successfully built in Netbeans 6.1.

So on compile I get the following error message.

wsimport-client-check-WebService4ProjectServer:
wsimport-client-WebService4ProjectServer:
D:\swProjects\Back2You\Back2YouDemo\nbproject\jaxws-build.xml:24: You are running on JDK6 which comes with JAX-WS 2.0 API, but this tool requires JAX-WS 2.1 API. Use the endorsed standards override mechanism (http://java.sun.com/javase/6/docs/technotes/guides/standards/), or set xendorsed="true" on <wsimport>.

I have tried to implement the setting of java.endorsed.dirs in the project compile options as follows

-Djava.endorsed.dirs="C:/Program Files/NetBeans 6.5/java2/modules/ext/jaxws21/api/"

but this doesn't change the error message.

How do I fix this please
Comment
Watch Question

Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
try this:

java -jar <2.1 api path>/jaxb-xjc.jar my.xsd

Author

Commented:
Just to clarify, I'm trying to compile code, so will be using javac (but via netbeans).

http://java.sun.com/javase/6/docs/technotes/guides/standards/ states the java.endorsed.dirs property should be used to indicate the upgraded directory is present...but the error messsage remains the same.
Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
your problem does not appear to be during compilation.

Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
> Just to clarify, I'm trying to compile code, so will be using javac (but via netbeans).

that error is not from javac

Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
> I have tried to implement the setting of java.endorsed.dirs in the project compile options as follows

that won't help because its not javac thats failing, its xjc
you ould need to be passing it to the ant task thats perforing the work

Theres some details on the xjc ant task here, which should work for you.
https://jaxb.dev.java.net/nonav/2.1.2/docs/xjcTask.html


It looks like it failed because Netbeans 6.5 was checking the target servers installed locally for the build had endorsed directories set with the JAX-WS api's. So the local copy of Tomcat 6 that was being built too to match the target server did not have this, hence the failure. At least this has pointed to a workaround - set to Sun Application Server 9 for the initial tasks and then back to Tomcat for the final build.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.