0 Replies Latest reply on Jun 23, 2005 1:52 PM by Sergio Ahumada N

    sharing sessions between two applications

    Sergio Ahumada N Newbie

      Hi !

      I have a question about session replication in StandardManager context.

      What I have is:

       private MySession(int sessionTimeout)
       throws LifecycleException {
       manager = new StandardManager();
       manager.setMaxInactiveInterval(sessionTimeout * 60);
       StandardContext standardContext = new StandardContext();
       standardContext.setLoader(new WebappLoader());
       manager.setContainer(standardContext);
       manager.setPathname(null);
       ((Lifecycle) manager).start();
       }
      


      When Im debugging I get an error in last line (manager.start() line):

      13:49:16,390 INFO [Engine] SingleSignOn[localhost]: Process request for '/Test2/servlet/Tester'
      13:49:16,390 INFO [Engine] SingleSignOn[localhost]: Checking for SSO cookie
      13:49:16,390 INFO [Engine] SingleSignOn[localhost]: SSO cookie is not present
      13:49:16,468 ERROR [ManagerBase] Error registering
      java.lang.NullPointerException
       at org.apache.catalina.session.ManagerBase.init(ManagerBase.java:613)
       at org.apache.catalina.session.StandardManager.start(StandardManager.java:639)
       at com.tinet.demo.sesiones.ETagSession.<init>(ETagSession.java:47)
       at com.tinet.demo.sesiones.ETagSession.getInstance(ETagSession.java:30)
       at com.tinet.demo.sesiones.ETagSession.getInstance(ETagSession.java:24)
       at com.tinet.demo.sesiones.Tester.init(Tester.java:19)
       at javax.servlet.GenericServlet.init(GenericServlet.java:211)
       at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
       at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:687)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
       at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:150)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
       at org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:80)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:54)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:139)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
       at org.jboss.web.tomcat.tc5.sso.ClusteredSingleSignOn.invoke(ClusteredSingleSignOn.java:389)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
       at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
       at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
       at java.lang.Thread.run(Thread.java:534)
      


      What the problem can be ? I was unable to get the right information to solve this :(

      Im using StandardManager to handle sessions.
      I put an context.xml file into WEB-INF:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <Context path="/Test2" reloadable="true"
       docBase="Test2.war"
       privileged="true">
       <Manager className="org.apache.catalina.session.StandardManager"
       debug="0" checkInterval="60" maxActiveSessions="-1"
       maxInactiveInterval="-1" />
       <Logger className="org.apache.catalina.logger.SystemOutLogger"
       verbosity="4" timestamp="true" />
      </Context>
      


      can anybody help me ? I will be very pleasure !

      -- SAN