The WSDD file is processed without error. The problem appears when viewing the AxisServlet: Exception - org.apache.axis.ConfigurationException: java.lang.ClassCastException java.lang.ClassCastException
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:338)
My handler class: package gs.psource.handlers; // imports public class CDDBHandler extends BasicHandler { public void invoke(MessageContext mc) throws AxisFault { } }
Yes, it is empty - it is in a jar file placed in tomcat's shared/lib directory. The handler is included in my WSDD file:
<requestFlow>
<handler name="CDDBHandler" type="java:gs.psource.handlers.CDDBHandler"/>
</requestFlow>
I know the handler is to blame, because when I comment out this part of the WSDD file, AxisServlet works correctly. However, I have also been able to deploy other, identical, custom handlers from different packages.
Using: tomcat-5.54-compat axis-1.1 j2sdk-1.4.2 (Full WSDD file and stacktrace below)
This has beaten me - has anyone got any ideas? James
---- deploy.wsdd -----------------------------------------------
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<!-- Services from PrimarySourceService WSDL service -->
<service name="PrimarySource" provider="java:RPC" style="rpc" use="literal">
<parameter name="wsdlTargetNamespace" value="http://localhost:8080/axis/services/PrimarySource"/>
<parameter name="wsdlServiceElement" value="PrimarySourceService"/>
<parameter name="wsdlServicePort" value="PrimarySource"/>
<parameter name="className" value="gs.psource.PrimarySourceSoapBindingImpl"/>
<parameter name="wsdlPortType" value="PrimarySourcePortType"/>
<operation name="doQuery" qname="doQuery" returnQName="retNS:PrimaryResult" xmlns:retNS="http://localhost:8080/ns/PrimarySource" returnType="rtns:primaryResultType" xmlns:rtns="http://localhost:8080/ns/PrimarySource" >
<parameter qname="pns:PrimaryRequest" xmlns:pns="http://localhost:8080/ns/PrimarySource" type="tns:primaryRequestType" xmlns:tns="http://localhost:8080/ns/PrimarySource"/>
<fault name="doQueryFault" qname="fns:NotFound" xmlns:fns="http://localhost:8080/ns/PrimarySource" class="gs.psource.NotFoundType" type="tns:NotFoundType" xmlns:tns="http://localhost:8080/ns/PrimarySource"/>
</operation>
<parameter name="allowedMethods" value="doQuery"/>
<requestFlow>
<handler name="CDDBHandler" type="java:gs.psource.handlers.CDDBHandler"/>
<handler name="TestHandler" type="java:spikes.TestHandler"/>
</requestFlow>
<typeMapping xmlns:ns="http://localhost:8080/ns/PrimarySource" qname="ns:primaryResultType" type="java:gs.psource.PrimaryResultType" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" /> <typeMapping xmlns:ns="http://localhost:8080/ns/PrimarySource" qname="ns:primaryResultType>metadata" type="java:gs.psource.PrimaryResultType_metadata" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" /> <typeMapping xmlns:ns="http://localhost:8080/ns/PrimarySource" qname="ns:primaryResultType>primaryResult>track" type="java:gs.psource.PrimaryResultType_primaryResult_track" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" /> <typeMapping xmlns:ns="http://localhost:8080/ns/PrimarySource" qname="ns:primaryResultType>primaryResult" type="java:gs.psource.PrimaryResultType_primaryResult" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" /> <typeMapping xmlns:ns="http://localhost:8080/ns/PrimarySource" qname="ns:primaryRequestType" type="java:gs.psource.PrimaryRequestType" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" /> <typeMapping xmlns:ns="http://localhost:8080/ns/PrimarySource" qname="ns:NotFoundType" type="java:gs.psource.NotFoundType" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" /> </service> </deployment>
---- stacktrace ------------------------------------------------------ 2004-12-11 15:47:16,984 [http-8080-Processor24] INFO org.apache.axis.EXCEPTIONS - Exception: org.apache.axis.ConfigurationException: java.lang.ClassCastException java.lang.ClassCastException
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:338)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:310)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:296)
at org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:164)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:310)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:296)
at org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:439)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getDeployedServices(WSDDDeployment.java:559)
at org.apache.axis.configuration.FileProvider.getDeployedServices(FileProvider.java:321)
at org.apache.axis.transport.http.AxisServlet.reportAvailableServices(AxisServlet.java:681)
at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:262)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
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:825)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:731)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)