Uploaded image for project: 'ZZZ-WSO2 Carbon'
  1. ZZZ-WSO2 Carbon
  2. CARBON-4835

ClassCastException occurs when getting ?wsdl of a jaxws service deployed on WSAS/Weblogic

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Highest
    • Resolution: Fixed
    • Affects Version/s: 2.0 RC5
    • Fix Version/s: None
    • Labels:
      None
    • 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)

        Attachments

          Activity

            People

            • Assignee:
              azeez@wso2.com Afkham Azeez
              Reporter:
              charitha@wso2.com Charitha Kankanamge
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: