tomcat集群求教
描述:
公司之前的架构是jsf + hibernate+ spring 一个apache后面跟了5个tomcat。使用的是非粘性session,如今要改成粘性session即 session共享。 一直包错如下面这写信息,我在想这个和事务管理器有什么关系呢? 关键是我将能序列化的都序列化了啊!!!
求大神回复 不甚感激!
下面是错误信息:
[org.apache.catalina.ha.session.DeltaManager] - <Unable to serialize delta request for sessionid [59C455014A1C6AB2B6C43798D334AD67.tomcat1]>
java.io.NotSerializableException: org.springframework.orm.hibernate3.HibernateTransactionManager
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at org.apache.catalina.ha.session.DeltaRequest$AttributeInfo.writeExternal(DeltaRequest.java:374)
at org.apache.catalina.ha.session.DeltaRequest.writeExternal(DeltaRequest.java:272)
at org.apache.catalina.ha.session.DeltaRequest.serialize(DeltaRequest.java:287)
at org.apache.catalina.ha.session.DeltaManager.serializeDeltaRequest(DeltaManager.java:640)
at org.apache.catalina.ha.session.DeltaManager.requestCompleted(DeltaManager.java:1139)
at org.apache.catalina.ha.session.DeltaSession.expire(DeltaSession.java:406)
at org.apache.catalina.ha.session.DeltaSession.expire(DeltaSession.java:394)
at org.apache.catalina.ha.session.DeltaSession.isValid(DeltaSession.java:358)
at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:698)
at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:683)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1316)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:595)
[解决办法]
启动报错还是访问报错?session共享是否正常?
[解决办法]
那个错是需要序列化
[解决办法]
都用apache+ tomcat啊,有没有用 Terracotta 的啊?
[解决办法]
在session里放什么东西造成的吧,debug调试下定位报错位置,没遇到这情况,猜不到的。
[解决办法]
楼主参考一下http://kzpkzp.blog.163.com/blog/static/16869581820105132580272/