NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Netbeans 5.5 and JAX-WS 2.1/2.0 APIs

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
waldyd



Joined: 24 Mar 2009
Posts: 8
Location: COLOMBIA

PostPosted: Wed Mar 25, 2009 10:58 pm    Post subject: Netbeans 5.5 and JAX-WS 2.1/2.0 APIs Reply with quote

Hello...

When Building a Project, the following was prompted by Netbeans 5.5:

build-impl.xml: 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>.

After googling i found something interesting: (at https://jax-ws.dev.java.net/guide/Using_JAX_WS_2_1_with_JavaSE6.html)

Quote:


2.8. Using JAX-WS 2.1 with JavaSE6

JavaSE6 ships with JAX-WS 2.0 API in rt.jar, which causes some trouble when you try to run applications that use JAX-WS 2.1 API. This document collects information about how to solve this issue.

2.8.1. Endorsed directory

One way to fix this is to copy jaxws-api.jar and jaxb-api.jar into JRE endorsed directory, which is $JAVA_HOME/lib/endorsed (or $JDK_HOME/jre/lib/endorsed)

Some application containers, such as Glassfish, modifies the location of the endorsed directory to a different place. From inside the JVM, you can check the current location by doing System.out.println(System.getProperty("java.endorsed.dirs"));

Obviously you still need other JAX-WS jars in your classpath.

Please do not put all the jars to the endorsed directory. This makes it impossible for JAX-WS RI to see other classes that it needs for its operation, such as servlet classes on the server-side, or Ant classes in the tool time. As those are not loaded by the bootstrap classloader, you'll get NoClassDefError on servlet/Ant classes.


Then after doing the quoted above and setting xendorsed="true" on <wsimport>. Netbeans 5.5 prompted the following:

build-impl.xml: java.lang.ClassNotFoundException: There's no JAX-WS 2.1 API in the classpath

Any ideas to solve this issue?
Back to top
waldyd



Joined: 24 Mar 2009
Posts: 8
Location: COLOMBIA

PostPosted: Thu Mar 26, 2009 3:07 pm    Post subject: Netbeans 5.5 & JAX-WS 2.1 API Reply with quote

Hello... Very Happy

After copying the JAX-WS 2.1 API implementation packages (jaxws-api.jar and jaxb-api.jar) into the java system endorsed folder (C:\Archivos de programa\Java\jdk1.6.0\jre\lib\endorsed) and setting xendorsed="true" on <wsimport> in build-impl.xml file and finally restarting the IDE (it may need to restart the PC also), the problem disappeared...


Best Regards,

Nestor Waldyd
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo