[ 
https://issues.apache.org/jira/browse/AXIS2-2825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Deepal Jayasinghe resolved AXIS2-2825.
--------------------------------------

    Resolution: Fixed

If you deploy the service in transport session scope everything will work fine, 
please try with Axis2 1.3 RC2 and see whether it is working.

Thanks
Deepal

> SessionContext.getProperty is null!!!???
> ----------------------------------------
>
>                 Key: AXIS2-2825
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2825
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>         Environment: axis2-1.2,eclipse3.2, WinXP; java1.5,Tomcat5.5......
>            Reporter: haha
>            Assignee: Deepal Jayasinghe
>
> hallo everybody. I have the following code: 
> ----------------------------------------------------
> ...............
> private SessionContext session(){
>    MessageContext mctx = MessageContext.getCurrentMessageContext();
>    TransportListener listener = mctx.getTransportIn().getReceiver();
>    SessionContext session = listener.getSessionContext(mctx);
>     return session;
>    }
>  ... ...
>   public Customer getCustomer() throws AxisFault
>    {
>      int custId = 
> ((Integer)session().getProperty(Const.SESSIONCUSTOMER)).intValue();    
> //getProperty is null!
>       CustomerInfoServer customerServer = 
> CustomerInfoServer.getCustomerServer();
>       Customer al = (Customer)customerServer.getCustomer(custId);
>       System.out.println("Found customer:" + al.getName());  
>       return (Customer)customerServer.getCustomer(custId); 
>     }
> ----------------------------------------------------------
> and i got the erorrs:
> ---------------------------------------------------------
> 20.06.2007 10:34:21 org.apache.axis2.rpc.receivers.RPCMessageReceiver 
> invokeBusinessLogic
> SCHWERWIEGEND: Exception occurred while trying to invoke service method 
> getCustomer
> 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:585)
>       at 
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:91)
>       at 
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:39)
>       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
>       at 
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:279)
>       at 
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:116)
>       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:213)
>       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:856)
>       at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
>       at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>       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:595)
> Caused by: java.lang.NullPointerException
>       at com.bala.getCustomer(SolverCustomerService.java:153)
>       ... 25 more
> ---------------------------------------------------
> can anyone tell me, how can i write my "session()" function, so that i get 
> the "none-null" property of the session?
> Thanks a lot!!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to