3 Replies Latest reply on Sep 8, 2006 4:03 AM by Marco

    jbossws / problem in generating client. NoSuchMethod

    Marco Novice

      hi all,
      i m trying to generate a client using jbossws wstools ant task (within maven2)..
      here's my task

      <tasks>
       <taskdef name="wstools" classname="org.jboss.ws.tools.ant.wstools">
       <classpath refid="maven.dependency.classpath"/>
       <classpath>
       <fileset dir="${jboss.libdir}\client">
       <include name="activation.jar"/>
       <include name="javassist.jar"/>
       <include name="jbossall-client.jar"/>
       <include name="jbossretro-rt.jar"/>
       <include name="jboss-backport-concurrent.jar"/>
       <include name="jbossws-client.jar"/>
       <include name="jboss-xml-binding.jar"/>
       <include name="jbossws14-client.jar"/>
       <include name="log4j.jar"/>
       <include name="mail.jar"/>
       <include name="wsdl4j.jar"/>
       </fileset>
       <fileset dir="${jboss.libdir}\lib\endorsed">
       <include name="*.jar"/>
       </fileset>
       </classpath>
       </taskdef>
       <echo message="********** Running jboss ws **************"/>
       <mkdir dir="dd/ws" />
       <wstools dest="${project.build.outputDirectory}/META-INF"
       config="${workspace.dir}/middleware/ngenMiddleware/jboss/wstools-messenger-config.xml"/>
      
       <wstools dest="${project.build.outputDirectory}/META-INF"
       config="${workspace.dir}/middleware/ngenMiddleware/jboss/wstools-translation-config.xml"/>
      
       <wstools dest="client"
       config="${workspace.dir}/middleware/ngenMiddleware/client/wstools-messenger-client-config.xml"/>
      
      


      the first two (generation of wsdl ) worked fine, the latter not..

      and here's the exception



      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] com.ibm.wsdl.xml.WSDLReaderImpl.setEntityResolver(Lorg/xml/sax/EntityReso
      lver;)V
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.NoSuchMethodError: com.ibm.wsdl.xml.WSDLReaderImpl.setEntityResolver(L
      org/xml/sax/EntityResolver;)V
       at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitio
      nsFactory.java:142)
       at org.jboss.ws.tools.WSDLToJava.convertWSDL2Java(WSDLToJava.java:121)
       at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(Too
      lsHelper.java:324)
       at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
       at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
       at org.jboss.ws.tools.ant.wstools.execute(wstools.java:103)
       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
       at org.apache.tools.ant.Task.perform(Task.java:364)
       at org.apache.tools.ant.Target.execute(Target.java:341)
       at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractA
      ntMojo.java:99)
       at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:82)
      
       at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
      nManager.java:412)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
      ultLifecycleExecutor.java:534)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
      fecycle(DefaultLifecycleExecutor.java:475)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
      ltLifecycleExecutor.java:454)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
      dleFailures(DefaultLifecycleExecutor.java:306)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
      ts(DefaultLifecycleExecutor.java:273)
       at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
      fecycleExecutor.java:140)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
       at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      



      i followed what has been described here
      http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3968854

      but still i am getting same exception........

      can anyone help? thanx and regards
      marco


        • 1. Re: jbossws / problem in generating client. NoSuchMethod
          Marco Novice

          Hi all,
          i think i m having a clash between wsdl4j and jbossall-client.jar, in the sense that evenif i download (like i hav edone) wsdl4j.jar and replace jar in jboss, i still have an old copy of jbossall-client.jar which contains same classes (i installed jboss at end of july)

          i try to get hte latest and see what happens....

          thanx
          marco

          • 2. Re: jbossws / problem in generating client. NoSuchMethod
            Marco Novice

            nope.. i aml ost!
            even using onlyneeded jar files, plus the updated wsdlj4 from this link

            http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3968854

            doesnot work

            and that sounds more strange... i have done a javap on the missing class's method, and the method shows just fine

            Compiled from "WSDLReaderImpl.java"
            public class com.ibm.wsdl.xml.WSDLReaderImpl extends java.lang.Object implements javax.wsdl.xml.WSDLReader{
             protected boolean verbose;
             protected boolean importDocuments;
             protected javax.wsdl.extensions.ExtensionRegistry extReg;
             protected java.lang.String factoryImplName;
             protected javax.wsdl.xml.WSDLLocator loc;
             protected javax.wsdl.factory.WSDLFactory factory;
             protected org.xml.sax.EntityResolver entityResolver;
             protected java.util.Map allSchemas;
             static java.lang.Class class$javax$wsdl$Definition;
             static java.lang.Class class$javax$wsdl$Types;
             static java.lang.Class class$javax$wsdl$Import;
             static java.lang.Class class$javax$wsdl$Binding;
             static java.lang.Class class$javax$wsdl$BindingOperation;
             static java.lang.Class class$javax$wsdl$BindingInput;
             static java.lang.Class class$javax$wsdl$BindingOutput;
             static java.lang.Class class$javax$wsdl$BindingFault;
             static java.lang.Class class$javax$wsdl$Message;
             static java.lang.Class class$javax$wsdl$Part;
             static java.lang.Class class$javax$wsdl$PortType;
             static java.lang.Class class$javax$wsdl$Operation;
             static java.lang.Class class$javax$wsdl$Service;
             static java.lang.Class class$javax$wsdl$Port;
             static java.lang.Class class$javax$wsdl$Input;
             static java.lang.Class class$javax$wsdl$Output;
             static java.lang.Class class$javax$wsdl$Fault;
             public com.ibm.wsdl.xml.WSDLReaderImpl();
             public void setFeature(java.lang.String, boolean) throws java.lang.IllegalArgumentException;
             public boolean getFeature(java.lang.String) throws java.lang.IllegalArgumentException;
             public void setExtensionRegistry(javax.wsdl.extensions.ExtensionRegistry);
             public javax.wsdl.extensions.ExtensionRegistry getExtensionRegistry();
             protected javax.wsdl.factory.WSDLFactory getWSDLFactory() throws javax.wsdl.WSDLException;
             public void setFactoryImplName(java.lang.String) throws java.lang.UnsupportedOperationException;
             public java.lang.String getFactoryImplName();
             protected javax.wsdl.Definition parseDefinitions(java.lang.String, org.w3c.dom.Element, java.util.Map) throws javax.wsdl.WSDLException;
             protected javax.wsdl.Import parseImport(org.w3c.dom.Element, javax.wsdl.Definition, java.util.Map) throws javax.wsdl.WSDLException;
             protected javax.wsdl.Types parseTypes(org.w3c.dom.Element, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.extensions.ExtensibilityElement parseSchema(java.lang.Class, org.w3c.dom.Element, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.extensions.ExtensibilityElement parseSchema(java.lang.Class, org.w3c.dom.Element, javax.wsdl.Definition, javax.wsdl.extensions.ExtensionRegistry) throws javax.wsdl.WSDLException;
             protected javax.wsdl.Binding parseBinding(org.w3c.dom.Element, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.BindingOperation parseBindingOperation(org.w3c.dom.Element, javax.wsdl.PortType, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.BindingInput parseBindingInput(org.w3c.dom.Element, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.BindingOutput parseBindingOutput(org.w3c.dom.Element, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.BindingFault parseBindingFault(org.w3c.dom.Element, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.Message parseMessage(org.w3c.dom.Element, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.Part parsePart(org.w3c.dom.Element, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected void parseExtensibilityAttributes(org.w3c.dom.Element, java.lang.Class, javax.wsdl.extensions.AttributeExtensible, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected java.lang.Object parseExtensibilityAttribute(org.w3c.dom.Element, int, java.lang.String, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.PortType parsePortType(org.w3c.dom.Element, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.Operation parseOperation(org.w3c.dom.Element, javax.wsdl.PortType, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.Service parseService(org.w3c.dom.Element, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.Port parsePort(org.w3c.dom.Element, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.extensions.ExtensibilityElement parseExtensibilityElement(java.lang.Class, org.w3c.dom.Element, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.Input parseInput(org.w3c.dom.Element, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.Output parseOutput(org.w3c.dom.Element, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             protected javax.wsdl.Fault parseFault(org.w3c.dom.Element, javax.wsdl.Definition) throws javax.wsdl.WSDLException;
             public javax.wsdl.Definition readWSDL(java.lang.String) throws javax.wsdl.WSDLException;
             public javax.wsdl.Definition readWSDL(java.lang.String, java.lang.String) throws javax.wsdl.WSDLException;
             public javax.wsdl.Definition readWSDL(java.lang.String, org.w3c.dom.Element) throws javax.wsdl.WSDLException;
             protected javax.wsdl.Definition readWSDL(java.lang.String, org.w3c.dom.Element, java.util.Map) throws javax.wsdl.WSDLException;
             public javax.wsdl.Definition readWSDL(java.lang.String, org.w3c.dom.Document) throws javax.wsdl.WSDLException;
             public javax.wsdl.Definition readWSDL(java.lang.String, org.xml.sax.InputSource) throws javax.wsdl.WSDLException;
             public javax.wsdl.Definition readWSDL(javax.wsdl.xml.WSDLLocator) throws javax.wsdl.WSDLException;
             public org.xml.sax.EntityResolver getEntityResolver();
             public void setEntityResolver(org.xml.sax.EntityResolver);
             static java.lang.Class class$(java.lang.String);
             static {};
            }
            
            


            what am i still doing wrong?

            regards
            marco

            • 3. Re: jbossws / problem in generating client. NoSuchMethod
              Marco Novice

              hello all,
              it is definitively a classpath problem in my build script
              runnign wstools.bat on its own fixes the problem

              sorry for messing around

              regards
              marco