I am trying to run my application which contain JAX WS (2.1) Webservice using JDeveloper 11g R2(11.1.2.3.0) in JDK 1.6.0_31-b05. The error is coming from @WebService annotation present on the class.
When I am running the application, I am getting below error,
java.lang.IllegalArgumentException: Argument(s) "type" can't be null. at com.sun.xml.bind.api.TypeReference.<init>(TypeReference.java:89) at com.sun.xml.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:758) at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:678) at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:428) at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:277) at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:363) at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:202) at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:496) at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:539) at weblogic.wsee.jaxws.JAXWSDeployedServlet.getEndpoint(JAXWSDeployedServlet.java:183)
It seems that embedded Web Logic is using the internal libraries instead of provided one from JDK. The classes RuntimeModeler
or TypeReference
are present in JDK rt.jar starts with package com.sun.xml.ws.internal. Weblogic is picking these classes from glassfish.jaxb_1.0.0.0_2-1-12.jar & glassfish.jaxws.rt_1.2.0.0_2-1-5.jar, but these jars are not part of my application.
I have already used weblogic.xml with below tag,
<prefer-web-inf-classes>true</prefer-web-inf-classes>
I tried adding jaxws-api.jar & jws-api.jar in DefaultDomain/lib directory, but that didn't work
Any clue how to resolve this exception or how to force weblogic to use jdk runtime classes? The same application work properly on stand alone weblogic.