This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 119035 - Can't run ws client in J2SE application
Summary: Can't run ws client in J2SE application
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: JAX-WS (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-16 13:16 UTC by Jaroslav Pospisil
Modified: 2007-10-31 16:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Pospisil 2007-10-16 13:16:46 UTC
Build Beta2 2007101600,JDK1.6.0_03,Win Vista

Create ws client in J2SE,use this url http://www.esynaps.com/WebServices/SearchWS.asmx?WSDL for WSDL.
Call web service operation Search in Main class,enter parameter value (for example "google") and run 
J2SE app. You'll get LinkageError,even if JAX-WS2.1 library is attached. Build's successful,but no output is produced.
If you set endorsed.dirs attribute in VM options,problem is solved.I think this is regression,since this already worked
in past.

Exception in thread "main" java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this
RI (from
jar:file:/C:/Program%20Files/NetBeans%206.0%20Beta%202/java1/modules/ext/jaxws21/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class)
needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See
http://java.sun.com/j2se/1.5.0/docs/guide/standards/)
        at com.sun.xml.bind.v2.model.impl.ModelBuilder.<clinit>(ModelBuilder.java:172)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422)
        at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286)
        at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
        at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210)
        at javax.xml.bind.ContextFinder.find(ContextFinder.java:368)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
        at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:220)
        at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:218)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:217)
        at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:88)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:36)
        at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:95)
        at javax.xml.ws.spi.Provider.provider(Provider.java:76)
        at javax.xml.ws.Service.<init>(Service.java:57)
        at wsc.WebSearchWS.<init>(WebSearchWS.java:46)
        at javaapplication1.Main.main(Main.java:20)
Java Result: 1
Comment 1 Milan Kuchtiak 2007-10-16 15:28:57 UTC
java.endorsed.dirs JVM option should be added to j2se application if JDK1.6 contains JAX-WS 2.0 version.
Comment 2 Milan Kuchtiak 2007-10-17 10:13:05 UTC
Fixed in Trunk.
java.endorsed.dirs JVM option is set when WS client is added to J2SE Project:

Diff:
http://websvc.netbeans.org/source/browse/websvc/core/src/org/netbeans/modules/websvc/core/jaxws/projects/J2SEProjectJAXWSClientSupport.java?r1=1.4&r2=1.5

I'll ask for approval to merge changes to Beta2.
Comment 3 Jaroslav Pospisil 2007-10-17 14:16:22 UTC
Fix in trunk is O.K. (hudson trunk 4005) Please merge changes to Beta2 branch.
Comment 4 Roderico Cruz 2007-10-17 18:33:29 UTC
The changes look good -Rico
Comment 6 Jaroslav Pospisil 2007-10-31 16:45:42 UTC
v.