Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NetBeans JAX issue

 
Joseph Smithern
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using NetBean 6.7 to build client service using Tomcat 6.1.20.
Everytime I attempt to build it gives me back the message:

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>.


Can I correct this issue without downloading anymore software and how do I correct it?
I tried finding xendorsed in Tomcat and couldnt find it.

Please advise.
 
R Srini
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. You may already have found the answer. Your message
set xendorsed="true" on <wsimport>
is probably referring to this.
 
Joseph Smithern
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
R Srini wrote:Hi. You may already have found the answer. Your message
set xendorsed="true" on <wsimport>
is probably referring to this.


Thanks, I looked at that link and still cant figure out how to set xendorsed="true". What file do I edit this info?
 
R Srini
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joseph. I would say don't worry about the "xendorsed=true" thing. Based on lots of searching, it seems to be an undocumented feature anyway. But here's what I would do:

- Your error message simply says that there are newer versions of your libraries available now that need to be used with the new JDK 1.6. However, you have the option of asking the JDK to "trust" your particular library (jar file) by placing it in the endorsed directory.
- You would enter the <target name="-pre-compile">...</target> in build.xml in the project directory. This will override the corresponding target in build_impl.xml in the <project directory>/nbprojects.
- Per the earlier link, the directory seems to be <your glassfish/metro directory>/lib/endorsed.
- I haven't done this in Metro/GlassFish before, but I know about the "endorsed" mechanism. If the endorsed directory does not exist, you can simply create it.
- And put the activation.jar and webservices-api.jar that you need, i.e. the one being invoked by your code, into the endorsed directory.

Then it should all work out. Best of luck!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic