You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Alan Moore <am...@ciphergen.com> on 2002/05/10 03:56:34 UTC

Problem Deploying Service via wsdd & AdminClient (NoSuchMethodErr or)

All,

According to earlier posts the problem I am experiencing is related to Axis
not being able to find certain classes.

For example, a previous poster was using Java 1.4.0 and the ENDORSED_DIRS
was not pointing to the Axis jars. I was using Java 1.4.0 also and tried in
vein to change setclasspath.sh in Tomcat to point to the right places but
that didn't help.

I figured that by reverting to Java 1.3.1 (temporarily) I could at least
prove that it was/wasn't the issue. And of course it doesn't appear to be
since after switching to 1.3.1 I am still experiencing the exception listed
at the bottom of this message.

Environment:

JDK 1.3.1 and JSDK 1.4.0
Tomcat 4.0.3 (standalone)
Axis Beta 2

My Axis generated skeletons/etc and application classes are located in the
webapps/axis/WEB-INF/classes directory.

I am using WSDL2Java to create the --server-side --skeletonDeploy classes.

My deploy.wsdd (axis generated) is as follows:

<deployment
    xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

  <!-- Services from dasEv WSDL service -->

  <service name="dasEvPort" provider="java:RPC">
      <parameter name="className"
value="com.ciphergen.g4.das.axis.server.DasEvBindingSkeleton"/>
      <parameter name="allowedMethods" value="*"/>

      <typeMapping
        xmlns:ns="urn:G4_namespace"
        qname="ns:ArrayOfstring"
        type="java:java.lang.String[]"
        serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
        deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      />
      <typeMapping
        xmlns:ns="urn:G4_namespace"
        qname="ns:CassetteInfo"
        type="java:com.ciphergen.g4.das.axis.server.CassetteInfo"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      />
  </service>
</deployment>

If I comment out both of the typeMappings it "deploys" fine. Commenting out
only one or the other doesn't allow the service to be registered (same
NoSuchMethodError) exception...

I suspect that axis cannot find the serializers/deserializers but I cannot
figure out why since the axis jars are in the webapps/axis/WEB-INF/lib
directory:

Contents of axis/WEB-INF/lib:
total 2204
-rwxrwxr-x    800632 Apr 29 16:29 axis.jar
-rwxrwxr-x    55754  Apr 29 16:29 commons-logging.jar
-rwxrwxr-x    44099  Apr 29 16:29 jaxrpc.jar
-rwxrwxr-x    78140  Apr 29 16:29 log4j-core.jar
-rwxrwxr-x    130773 Apr 29 16:29 tt-bytecode.jar
-rwxrwxr-x    143069 Apr 29 16:29 wsdl4j.jar
-rw-rw-r--    967350 Mar 13 11:54 xerces.jar

I also thrashed about a bit and put them anywhere axis/tomcat/classloaders
*might* look but that didn't help.

In looking at the stack it seems that the TypeMappingRegistry being used
doesn't implement the TypeMappingRegistry.register(String,TypeMapping)
method. But I looked at the code for the TypeMappingRegistryImpl class and
it does have this method... go figure.

I am stuck on what could be wrong here. Has anyone had a similar problem and
how did you get past it? Should I continue down this blind alley or is there
something else I should look at?

Thanks in advance.

alan


Java 1.4.0 stack trace:

- Processing file deploy.wsdd
- AxisFault: AxisFault
 faultCode: http://xml.apache.org/axis/:Server.userException
 faultString: java.lang.reflect.InvocationTargetException
 faultActor: null
 faultDetail:
        stackTrace: 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:324)
        at
org.apache.axis.providers.java.MsgProvider.processMessage(MsgProvider.java:1
42)
        at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:262)
        at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
71)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:154)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:121)
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:288)
        at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:576)
...snip...
        at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
        at java.lang.Thread.run(Thread.java:536)
Caused by: java.lang.NoSuchMethodError:
javax.xml.rpc.encoding.TypeMappingRegistry.register(Ljava/lang/String;Ljavax
/xml/rpc/encoding/TypeMapping;)Ljavax/xml/rpc/encoding/TypeMapping;
        at
org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.ja
va:429)
        at
org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java:549)
        at
org.apache.axis.deployment.wsdd.WSDDService.validateDescriptors(WSDDService.
java:201)
        at
org.apache.axis.deployment.wsdd.WSDDService.<init>(WSDDService.java:184)
        at
org.apache.axis.deployment.wsdd.WSDDDeployment.<init>(WSDDDeployment.java:24
1)
        at
org.apache.axis.deployment.wsdd.WSDDDocument.<init>(WSDDDocument.java:123)
        at org.apache.axis.utils.Admin.processWSDD(Admin.java:222)
        at org.apache.axis.utils.Admin.process(Admin.java:300)
        at org.apache.axis.utils.Admin.AdminService(Admin.java:176)
        ... 43 more

Java 1.3.1 stack trace:

- Processing file /home/amoore/G4/wsdl/wsdd/deploy.wsdd
- AxisFault: AxisFault
 faultCode: http://xml.apache.org/axis/:Server.userException
 faultString: java.lang.reflect.InvocationTargetException
 faultActor: null
 faultDetail:
        stackTrace: java.lang.reflect.InvocationTargetException:
java.lang.NoSuchMethodError
        at
org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.ja
va:429)
        at
org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java:549)
        at
org.apache.axis.deployment.wsdd.WSDDService.validateDescriptors(WSDDService.
java:201)
        at
org.apache.axis.deployment.wsdd.WSDDService.<init>(WSDDService.java:184)
        at
org.apache.axis.deployment.wsdd.WSDDDeployment.<init>(WSDDDeployment.java:24
1)
        at
org.apache.axis.deployment.wsdd.WSDDDocument.<init>(WSDDDocument.java:123)
        at org.apache.axis.utils.Admin.processWSDD(Admin.java:222)
        at org.apache.axis.utils.Admin.process(Admin.java:300)
        at org.apache.axis.utils.Admin.AdminService(Admin.java:176)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.apache.axis.providers.java.MsgProvider.processMessage(MsgProvider.java:1
42)
        at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:262)
        at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
71)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:154)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:121)
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:288)
        at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:576)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
...snip...
        at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1012)
        at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
        at java.lang.Thread.run(Thread.java:479)

Alan Moore - mailto:amoore@ciphergen.com
Ciphergen Biosystems - http://www.ciphergen.com