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 "Charak, Vikas" <vi...@cns-inc.com> on 2006/09/07 17:40:53 UTC

[AXIS2] Error while deploying Rampart

I downloaded Nightly (Sep-06) build of Axis2 and also Snapshot of
Rampart. 
Now I get the following error:



2006-09-07 11:37:41,541 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/axis2]
] StandardWrapper.Throwable
java.lang.NoSuchMethodError:
org.apache.axis2.description.HandlerDescription.<init>(Ljavax/xml/namesp
ace/QName;)V
	at
org.apache.rampart.handler.WSDoAllHandler.<clinit>(WSDoAllHandler.java:3
7)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:242)
	at
org.apache.axis2.deployment.util.Utils.getHandlerClass(Utils.java:203)
	at
org.apache.axis2.deployment.util.Utils.addFlowHandlers(Utils.java:63)
	at
org.apache.axis2.deployment.DeploymentEngine.addNewModule(DeploymentEngi
ne.java:311)
	at
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.j
ava:598)
	at
org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.j
ava:165)
	at
org.apache.axis2.deployment.RepositoryListener.<init>(RepositoryListener
.java:53)
	at
org.apache.axis2.deployment.DeploymentEngine.loadRepository(DeploymentEn
gine.java:100)
	at
org.apache.axis2.deployment.WarBasedAxisConfigurator.getAxisConfiguratio
n(WarBasedAxisConfigurator.java:196)
	at
org.apache.axis2.context.ConfigurationContextFactory.createConfiguration
Context(ConfigurationContextFactory.java:61)
	at
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServle
t.java:345)
	at
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:271)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
a:1105)
	at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
	at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
ava:3917)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4201
)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:759)
	at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
	at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
-----Original Message-----
From: Anne Thomas Manes [mailto:atmanes@gmail.com] 
Sent: Thursday, September 07, 2006 11:37 AM
To: axis-user@ws.apache.org
Subject: Re: Null pointer exception

The WSDL isn't valid:

You need quotes around the value of the targetNamespace attribute in
this line:

     <xsd:schema elementFormDefault="qualified"
targetNamespace=http://tempuri.org/
     xmlns:s1="http://tempuri.org/">

Anne

On 9/7/06, Doolittle, Todd <TD...@searshc.com> wrote:
>
>
>
>
> I successfully created a client for a web service that was created in
a
> non-java language using the latest nightly build of Axis 2 using
wsdl2java.
> I took the same WSDL and used wsdl2java to create a service in Axis2.
I
> deployed the service, and then pointed the known working client at it
and I
> get back an AxisFault specifying that there was a null pointer
exception on
> the service side.  The problem istit doesn't look like the null
pointer
> exception had anything to do with my code.  So I regenerated the
service
> using wsdl2java and left the skeleton as it was so it would just throw
an
> UnsupportedOperationException.  I redeployed the service, and sent a
message
> using my client and I get back the same NullPointerException.  Am I
doing
> something wrong?
>
> I'm using Java 1.4.2, Tomcat 4.1.31 and the latest nightly build. See
below
> for the WSDL and stack trace.  Any help would be appreciated.
>
> Here is the WSDL...
>
> <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
>
> <wsdl:definitions
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>
>   name="POC" targetNamespace="http://tempuri.org/"
>
>   xmlns:fjs="http://tempuri.org/"
>
>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
>   <wsdl:types>
>
>     <xsd:schema elementFormDefault="qualified"
> targetNamespace=http://tempuri.org/ xmlns:s1="http://tempuri.org/">
>
>       <xsd:element name="lookup">
>
>         <xsd:complexType>
>
>           <xsd:sequence>
>
>             <xsd:element maxOccurs="unbounded" minOccurs="0"
name="upc"
> nillable="true" type="xsd:string" />
>
>           </xsd:sequence>
>
>           <xsd:attribute name="count" type="xsd:int" use="required" />
>
>         </xsd:complexType>
>
>       </xsd:element>
>
>       <xsd:element name="GetinfoResponse">
>
>         <xsd:complexType>
>
>           <xsd:sequence>
>
>             <xsd:element name="items" nillable="true">
>
>               <xsd:complexType>
>
>                 <xsd:sequence>
>
>                   <xsd:element maxOccurs="unbounded" minOccurs="0"
> name="item" nillable="true">
>
>                     <xsd:complexType>
>
>                       <xsd:sequence>
>
>                         <xsd:element name="ksn"
>
>                           nillable="true" type="xsd:int" />
>
>                         <xsd:element name="upc"
>
>                           nillable="true" type="xsd:string" />
>
>                         <xsd:element name="maintdt" nillable="true"
> type="xsd:date" />
>
>                         <xsd:element name="dpt" nillable="true"
> type="xsd:int" />
>
>                       </xsd:sequence>
>
>                     </xsd:complexType>
>
>                   </xsd:element>
>
>                 </xsd:sequence>
>
>               </xsd:complexType>
>
>             </xsd:element>
>
>           </xsd:sequence>
>
>           <xsd:attribute name="count" type="xsd:int" use="required" />
>
>         </xsd:complexType>
>
>       </xsd:element>
>
>     </xsd:schema>
>
>   </wsdl:types>
>
>   <wsdl:message name="GetinfoIn">
>
>     <wsdl:part element="fjs:lookup" name="parameters" />
>
>   </wsdl:message>
>
>   <wsdl:message name="GetinfoOut">
>
>     <wsdl:part element="fjs:GetinfoResponse" name="parameters" />
>
>   </wsdl:message>
>
>   <wsdl:portType name="POCPortType">
>
>     <wsdl:operation name="Getinfo">
>
>       <wsdl:input message="fjs:GetinfoIn" name="lookup" />
>
>       <wsdl:output message="fjs:GetinfoOut"
>
>         name="GetinfoResponse" />
>
>     </wsdl:operation>
>
>   </wsdl:portType>
>
>   <wsdl:binding name="POCBinding" type="fjs:POCPortType">
>
>     <soap:binding
> transport="http://schemas.xmlsoap.org/soap/http" />
>
>     <wsdl:operation name="Getinfo">
>
>       <soap:operation soapAction="" style="document" />
>
>       <wsdl:input name="lookup">
>
>         <soap:body use="literal" />
>
>       </wsdl:input>
>
>       <wsdl:output name="GetinfoResponse">
>
>         <soap:body use="literal" />
>
>       </wsdl:output>
>
>     </wsdl:operation>
>
>   </wsdl:binding>
>
>   <wsdl:service name="POC">
>
>     <wsdl:port binding="fjs:POCBinding" name="POCPortType">
>
>       <soap:address
> location="http://localhost:8080/axis2/services/POC" />
>
>     </wsdl:port>
>
>   </wsdl:service>
>
> </wsdl:definitions>
>
>
> Here is the stack trace...
>
> Sep 7, 2006 7:39:26 AM org.apache.axis2.engine.AxisEngine
> receiveFault
>
> INFO: Received Error Message with id
> urn:uuid:242525EB38AC1132E811576291658151
>
> org.apache.axis2.AxisFault: java.lang.NullPointerException
>
>         at
>
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:298)
>
>         at org.tempuri.POCStub.Getinfo(POCStub.java:128)
>
>         at POCTest.main(POCTest.java:29)
>
>
> ^^^^^^^^^^^^ The portion above is just from my client.  The portion
below is
> the portion from the service side...
>
> Caused by: java.lang.Exception: org.apache.axis2.AxisFault:
> java.lang.NullPointerException; nested exception is:
>
>         java.lang.NullPointerException
>
>         at
>
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:241)
>
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:716)
>
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
>
>         at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:200)
>
>         at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:146)
>
>         at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:209)
>
>         at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:596)
>
>         at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
33)
>
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
>
>         at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:144)
>
>         at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:596)
>
>         at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
33)
>
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
>
>         at
>
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:235
8)
>
>         at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:133)
>
>         at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:596)
>
>         at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:118)
>
>         at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:594)
>
>         at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:116)
>
>         at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:594)
>
>         at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
33)
>
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
>
>         at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:127)
>
>         at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:596)
>
>         at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
33)
>
>         at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
>
>         at
>
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
>
>         at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79
9)
>
>         at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:705)
>
>         at
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57
7)
>
>         at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:683)
>
>         at java.lang.Thread.run(Thread.java:534)
>
> Caused by: java.lang.NullPointerException
>
>         at
>
org.apache.axis2.addressing.AddressingHelper.getAnonymousParameterValue(
AddressingHelper.java:78)
>
>         at
>
org.apache.axis2.handlers.addressing.AddressingWSDLValidationHandler.che
ckAnonymous(AddressingWSDLValidationHandler.java:71)
>
>         at
>
org.apache.axis2.handlers.addressing.AddressingWSDLValidationHandler.inv
oke(AddressingWSDLValidationHandler.java:43)
>
>         at
> org.apache.axis2.engine.Phase.invoke(Phase.java:377)
>
>         at
> org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:517)
>
>         at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:488)
>
>         at
>
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques
t(HTTPTransportUtils.java:309)
>
>         at
>
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:201)
>
>         ... 31 more
>
>         at org.apache.axis2.AxisFault.<init>(AxisFault.java:159)
>
>         ... 3 more
>
> Exception in thread "main" java.lang.NullPointerException
>
>         at POCTest.main(POCTest.java:39)
>
>
> ________________________________
>
>
>
>
>  This message, including any attachments, is the property of Sears
Holdings
> Corporation and/or one of its subsidiaries. It is confidential and may
> contain proprietary or legally privileged information. If you are not
the
> intended recipient, please delete it without reading the contents.
Thank
> you.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [AXIS2] Error while deploying Rampart

Posted by Ruchith Fernando <ru...@gmail.com>.
Hi,


On 9/7/06, Charak, Vikas <vi...@cns-inc.com> wrote:
> I downloaded Nightly (Sep-06) build of Axis2 and also Snapshot of
> Rampart.
> Now I get the following error:
>
>
>
> 2006-09-07 11:37:41,541 ERROR
> [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/axis2]
> ] StandardWrapper.Throwable
> java.lang.NoSuchMethodError:
> org.apache.axis2.description.HandlerDescription.<init>(Ljavax/xml/namesp
> ace/QName;)V
>         at
> org.apache.rampart.handler.WSDoAllHandler.<clinit>(WSDoAllHandler.java:3
> 7)

Seems like you are using an older rampart-SNAPSHOT.mar since in the
latest code I see that we use the proper constructor in creating the
HandlerDescription:

org.apache.rampart.handler.WSDoAllHandler: line 37:
    private static HandlerDescription EMPTY_HANDLER_METADATA =
            new HandlerDescription("deafult Handler");

Therefore the above exception cannot occur with the latest rampart-SNAPSHOT.mar

Thanks,
Ruchith

-- 
www.ruchith.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org