[CARBON-4835] ClassCastException occurs when getting ?wsdl of a jaxws service deployed on WSAS/Weblogic Created: 03/Jul/09  Updated: 16/Oct/13  Resolved: 26/Aug/09

Status: Resolved
Project: ZZZ-WSO2 Carbon
Component/s: None
Affects Version/s: 2.0 RC5
Fix Version/s: None

Type: Bug Priority: Highest
Reporter: Charitha Kankanamge Assignee: Afkham Azeez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

winxp, WebLogic10.3, jdk16


Severity: Critical
Estimated Complexity: Moderate

 Description   

ClassCastException occurs when getting ?wsdl of a JAXWS service when WSAS is deployed on WebLogic.

Steps to reproduce:
===============
1. Deploy WSAS on weblogic
2. Deploy a jaxws service (Before that make sure to copy jaxws-rt and jaxws-tools jars to repository/components/extensions)
3. Click on wsdl1.1 link of the jaxws service

javax.xml.ws.WebServiceException: Error occurred generating WSDL file for Web service implementation class

{org.test.JaxwsServiceImpl}

:

{java.lang.reflect.InvocationTargetException}

at org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.generateWsdl(JAXWSRIWSDLGenerator.java:195)
at org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.initialize(JAXWSRIWSDLGenerator.java:379)
at org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.getWSDL(JAXWSRIWSDLGenerator.java:372)
at org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1315)
at org.wso2.carbon.core.transports.util.Wsdl11Processor$1.printWSDL(Wsdl11Processor.java:43)
at org.wso2.carbon.core.transports.util.AbstractWsdlProcessor.printWSDL(AbstractWsdlProcessor.java:51)
at org.wso2.carbon.core.transports.util.Wsdl11Processor.process(Wsdl11Processor.java:57)
at org.wso2.carbon.core.transports.CarbonServlet.doGet(CarbonServlet.java:131)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.lang.reflect.InvocationTargetException
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 org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.generateWsdl(JAXWSRIWSDLGenerator.java:181)
... 27 more
Caused by: com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtension: Provider weblogic.wsee.jaxws.framework.policy.WSDLGeneratorExtension is specified in jar:file:/C:/bea/wlserver_10.3/server/lib/weblogic.jar!/META-INF/services/com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtensionbut could not be instantiated: java.lang.ClassCastException
at com.sun.xml.ws.util.ServiceFinder.fail(ServiceFinder.java:233)
at com.sun.xml.ws.util.ServiceFinder.access$300(ServiceFinder.java:141)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:379)
at com.sun.xml.ws.util.ServiceFinder.toArray(ServiceFinder.java:225)
at com.sun.tools.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:223)
at com.sun.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:119)
at com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsgen(WSToolsObjectFactoryImpl.java:61)
at com.sun.tools.ws.spi.WSToolsObjectFactory.wsgen(WSToolsObjectFactory.java:107)
... 32 more
Caused by: java.lang.ClassCastException
at java.lang.Class.cast(Class.java:2990)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.next(ServiceFinder.java:374)



 Comments   
Comment by Charitha Kankanamge [ 24/Aug/09 ]

Increased the priority since this blocks further testing on jaxws with weblogic

Comment by Afkham Azeez [ 26/Aug/09 ]

The weblogic.jar needs to be edited

Remove weblogic.jar/META-INF/services/com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtension & restart Carbon

Generated at Tue Jan 28 02:15:12 PST 2020 using JIRA 7.2.2#72004-sha1:9d5132893cc8c728a3601a9034a1f8547ef5c7be.