java - Netbeans libraries contains different jar/class than directed to -


i have been trying follow getting started jax-ws web services. had lot of trouble because jdk 6 has jax-ws 2.1 metro has jax-ws 2.2 . lot of searching found out called "endorsed" exists. try work apache , found out jax-ws clash (see ps2 hyperlink 3). have endorsed folder 2 .jar files in it: "c:\program files\java\jdk1.6.0_21\jre\lib\endorsed" containing "jaxb-api.jar" , "jaxws-api.jar". , seemed work, unfortunately 'server-application'. after lot of searching , copying different files endorsed folder , again , again... ...i started think wrong netbeans instead of me being stupid. downloaded java decompiler (see ps2 hyperlink 4), , looked in jar-files in endorsed folder. btw, errors recievin in netbeans javax.xml.ws.service not contain following constructor:

protected service(url wsdldocumentlocation, qname servicename, webservicefeature[] features) 

but following constructor:

protected service(url wsdldocumentlocation, qname servicename) 

i set in netbeans contain 2 jar files in endorsed folder, when expand them , open 'service' class, constructor 3 arguments not there. but(here comes strange part) when decompile class service in jar file "jaxws-api.jar" in endorsed file, contain constructor.

so netbeans not use jar file referenced library? or going on(and more importantly, how can fix it)?

i checked class located "service.class.getclassloader()" (pasted somewhere cant remember):

system.out.println(system.getproperty("java.endorsed.dirs")); final url location; final string classlocation = service.class.getname().replace('.', '/') + ".class"; final classloader loader = service.class.getclassloader(); if(loader == null){     system.out.println("cannot load class"); }else{     location = loader.getresource(classlocation);     system.out.println("class " + location); } 

but gives me output:"c:\program files\java\jdk1.6.0_21\jre\lib\endorsed" , on second line "cannot load class". while running, cant load class, netbeans shows in projects window in proyect->libraries when expand library containing 'endorsed jar-files' service class there. , when open no error, not file containing right constructor

to summarize: think netbeans ignores jar file tell use , gets own jar file somewhere, not show me...

ps: specs

product version: netbeans ide 7.0 (build 201104080000) java: 1.6.0_21; java hotspot(tm) 64-bit server vm 17.0-b17 system: windows 7 version 6.1 running on amd64; tests apache tomcat 7.0.11 (i don't think of use)

hope solve mystery, tjen

ps2: can post 2 hyperlinks here number 3 , 4 (include own http://):

3: weblogs.java.net/blog/ramapulavarthi/archive/2009/04/tip_for_using_j.html

4: java.decompiler.free.fr/?q=jdgui


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -