2 Replies Latest reply on Apr 20, 2007 6:23 AM by thomas.diesler

    NoClassDefFoundError: RuntimeWSDLParser.createReader

    electren

      Hi all.

      I want to consume a webservice with a dynamic Stub generated by Jax-WS-Api.

      The WSDL-Parser is throwing following exception:

      java.lang.NoClassDefFoundError
       at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:786)
       at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:236)
       at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:107)
       at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:226)
       at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:189)
       at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:159)
       at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:81)
       at javax.xml.ws.Service.<init>(Service.java:56)
       at javax.xml.ws.Service.create(Service.java:680)
       at de.xxx.fm.app.web.bl.services.WSLogin.pruefeLogin(WSLogin.java:52)
       at de.xxx.fm.app.web.bl.facade.BusinessFacade.verifieLogin(BusinessFacade.java:63)
       at de.xxx.fm.app.web.gui.serviceworker.CommandDispatcher.bearbeiteLogin(CommandDispatcher.java:168)
       at de.xxx.fm.app.web.gui.serviceworker.CommandDispatcher.dispatch(CommandDispatcher.java:63)
       at de.xxx.fm.app.web.gui.servlet.FrontController.doService(FrontController.java:86)
       at de.xxx.fm.app.web.gui.servlet.FrontController.doPost(FrontController.java:58)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)


      Has anybody get this exception before?
      The Class is in jaxws-rt.jar, which is include in the Jboss lib-dir...
      I'm using the newest version of the api's...

      Has anybody a solution for the problem?

      Thanks for every kind of help..

      greetings
      Ben


        • 1. Re: NoClassDefFoundError: RuntimeWSDLParser.createReader
          electren

          In according to the problem above:

          To get nearer to the solution, i had wrote a main-Methode which calls the Webservice....

          Here i got another Exception.
          First the main-Methode:

          File wsdl = new File("D:/workspace/app-webservice-connector/src/main/resources/META-INF/Cow.wsdl");
           URL wsdlUrl = null;
           try {
           wsdlUrl = new URL("http://localhost:8080/app-cs-api/services/Cow?wsdl");
           // wsdlUrl = wsdl.toURL();
           } catch (MalformedURLException e1) {
           // TODO Auto-generated catch block
           e1.printStackTrace();
           }
           QName serviceName = new QName("http://cow.service.app.fm.business.de", "Cow");
          
           Service service = Service.create(wsdlUrl, serviceName);
           /*
           * DEBUG!!!
           */
           System.out.println(service.getServiceName().getLocalPart());
           System.out.println(service.getServiceName().getNamespaceURI());
           System.out.println(service.getWSDLDocumentLocation().getPath());
          
           //Cow_Service service = (Cow_Service) Cow_Service.createCall(serviceName, wsdlUrl);
          
           Cow_PortType port = (Cow_PortType) service.getPort(Cow_PortType.class);
          
           try {
           boolean response = port.pruefeLogin("user", "x");
           } catch (RemoteException e) {
           // TODO Auto-generated catch block
           e.printStackTrace();
           }
          


          The exception:

          Exception in thread "main" com.sun.xml.ws.model.RuntimeModelerException: A WebService annotation is not present on class: de.business.fm.app.service.cow.Cow_PortType
           at com.sun.xml.ws.model.RuntimeModeler.getPortTypeName(RuntimeModeler.java:1252)
           at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:296)
           at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:306)
           at javax.xml.ws.Service.getPort(Service.java:161)
           at WSLogin.main(WSLogin.java:48)
          


          The Interface generated by wstools:
          /*
           * JBossWS WS-Tools Generated Source
           *
           * Generation Date: Tue Apr 17 19:06:34 CEST 2007
           *
           * This generated source code represents a derivative work of the input to
           * the generator that produced it. Consult the input for the copyright and
           * terms of use that apply to this source code.
           */
          package de.business.fm.app.service.cow;
          public interface Cow_PortType extends java.rmi.Remote
          {
          
           public boolean pruefeLogin(java.lang.String anmeldenamen, java.lang.String kennwort) throws java.rmi.RemoteException;
          }
          


          How i have to place some annotation in this interface?
          Is it possible that wstools generated not correctly??


          • 2. Re: NoClassDefFoundError: RuntimeWSDLParser.createReader
            thomas.diesler

             

            The Class is in jaxws-rt.jar, which is include in the Jboss lib-dir


            Really? We don't ship with the Sun RI