Persistant Session error in catalina.out

256 visualizações
Pular para a primeira mensagem não lida

Patrick Heppler

não lida,
5 de fev. de 2015, 13:22:0305/02/2015
para lu...@googlegroups.com
Hi,
I switched from Railo to Lucee last weekend. Now I see some weird errors in catalina.out regarding persistant sessions:

Exception loading sessions from persistent storage

java.lang.ClassNotFoundException: lucee.runtime.type.scope.JSession
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:344)
        at org.apache.catalina.util.CustomObjectInputStream.resolveClass(CustomObjectInputStream.java:74)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1613)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
        at org.apache.catalina.session.StandardSession.doReadObject(StandardSession.java:1634)
        at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1099)
        at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:261)
        at org.apache.catalina.session.StandardManager.load(StandardManager.java:180)
        at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:460)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5171)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1069)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1719)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

This error only shows up in 2 of 3 Contexts. But I'm not actively using persistant sessions, maybe a wrong setting in the admin?

Colby Litnak

não lida,
6 de fev. de 2015, 13:06:1406/02/2015
para lu...@googlegroups.com
tomcat has a persistent session storage mechanism. it is on by default. Tomcat get's all bent out of shape because lucee uses a child classloader to load the lucee classes (including the JSession), and therefore can't serialize and deserialize them. The child classloader change is helpful to allow easy lucee upgrades. I have a change that I did a pull request for in railo ( back in the old days :) ) that allows you to use the tomcat classloader as an option as a configuration item in the railo servlet. Enabling the change disables easy upgrades (you have to make the .rc file a jar file and put it in the class path), but it also allows you to use some cool j2EE container features that are out there. 

I am long winded, the short answer would be to disable session persistence in tomcat. 

Mark Drew

não lida,
6 de fev. de 2015, 13:13:1306/02/2015
para lu...@googlegroups.com
Awesome that you finally got to the bottom of this. When I was doing load balancing with tomcat + apache of railo servers I kept getting the same serialisation problem with tomcat. The solution actually in Railo is to use a persistent sessions storage like MongoDB or something like that. 

I wonder if for Lucee V5 with OSGI this could work?

MD 


-- 
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/fbc72831-b885-4531-a0ce-7dd7ffdc5f4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Geoff Parkhurst

não lida,
6 de fev. de 2015, 15:09:2806/02/2015
para lu...@googlegroups.com
I have been struggling with this in the past:

https://bitbucket.org/lucee/lucee/issue/84/sessionrotate-creates-jsessionid

Would that be connected? i.e. when a CFML session is rotated, the
underlying tomcat persistent session kicks in and gives you a
jsessionid?
> https://groups.google.com/d/msgid/lucee/16387696-797D-4AC1-9808-3678D43E0A92%40gmail.com.

Michael Offner

não lida,
6 de fev. de 2015, 15:17:0606/02/2015
para lu...@googlegroups.com
Very intressting, I have to checkout what that means for Lucee 5 and OSGi. with the current version we have a custom made classloading architecture.
But with Lucee 5 we are depending on OSGi, I'm sure that topic already get discussed somewhere. 

Mucha
--
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem