• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1068
  • Last Modified:

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

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
0
sunnystar
Asked:
sunnystar
  • 4
  • 2
1 Solution
 
objectsCommented:
try this:

java -jar <2.1 api path>/jaxb-xjc.jar my.xsd
0
 
sunnystarAuthor 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.
0
 
objectsCommented:
your problem does not appear to be during compilation.

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

that error is not from javac

0
 
objectsCommented:
> 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


0
 
sunnystarAuthor Commented:
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.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now