axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chathura Herath <chathu...@gmail.com>
Subject Re: [axis2 v0.93] configuration context - class cast exception
Date Thu, 08 Dec 2005 16:40:20 GMT
Done
Pls take a checkout or apply the patch at
http://issues.apache.org/jira/browse/AXIS2-325
Thanks
Chathura

On 12/8/05, Chathura Herath <chathurah@gmail.com> wrote:
> Think its bug, pls open a JIRA. This particular method in Line 147 has
> not been update after we inserted the service group context. Second
> method would work because it has been updated.
> THanks
> Chathura
>
> On 12/8/05, Diego <diegs@tiscalinet.it> wrote:
> > Hi everybody!
> >
> > I'm using axis2 v0.93.
> >
> > With the following code:
> >
> > public class AstrodasServerMessageReceiver extends
> > AbstractInOutSyncMessageReceiver {
> >
> >      public void invokeBusinessLogic(MessageContext
> > msgContext,MessageContext newMsgContext) throws AxisFault {
> >          try {
> >              OperationContext operationContext =
> > msgContext.getOperationContext(); // line 41, the one that causes the
> > ClassCastException
> >              ConfigurationContext configurationContext =
> > operationContext.getEngineContext();
> >
> > ...
> >
> >
> > I get the following exception:
> >
> >
> > java.lang.ClassCastException
> >          at
> > org.apache.axis2.context.OperationContext.getEngineContext(OperationContext.java:147)
> >          at
> > org.astrodas.ws.server.AstrodasServerMessageReceiver.invokeBusinessLogic(AstrodasServerMessageReceiver.java:41)
> >          at
> > org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:36)
> >          at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:158)
> >          at
> > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:211)
> >          at
> > org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:181)
> >          at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> >          at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >          at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> >          at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> >          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:738)
> >          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:552)
> >
> >
> > Whereas this code executes fine:
> >
> > public class AstrodasServerMessageReceiver extends
> > AbstractInOutSyncMessageReceiver {
> >
> >      public void invokeBusinessLogic(MessageContext
> > msgContext,MessageContext newMsgContext) throws AxisFault {
> >          try {
> >              OperationContext operationContext =
> > msgContext.getOperationContext();
> >              ServiceContext serviceContext =
> > operationContext.getServiceContext();
> >              ConfigurationContext configurationContext =
> > serviceContext.getConfigurationContext();
> >
> > ...
> >
> >
> > In the API specification it is written not to use the class
> > ServiceContext since "it might not live up to your expectation".
> >
> > Am I doing something wrong?
> >
> > Thanks!
> >
> > Diego
> >
>
>
> --
> Chathura Herath
> http://www.bloglines.com/blog/chathurah
>


--
Chathura Herath
http://www.bloglines.com/blog/chathurah

Mime
View raw message