I use Jpetstore to test memcache session manager. the serialization
strategy is kryo


the jpetstore cannot work normally as it use default tomcat session manager

here is the jpetstore source code:
http://sourceforge.net/projects/ibatisjpetstore/

Is there any limitation to an application when it use memcached session
manager? cause jpetstore use struts tablib to manage its session.


here is exception trace stack

could you please give me some hint about why this happened?

Jun 27, 2012 9:10:04 AM de.javakaffee.web.msm.MemcachedSessionService
loadFromMemcached
WARNING: Could not load session with id FB00CEB8D400BD69C5C656C33DA8B1AB
from memcached.
com.esotericsoftware.kryo.SerializationException: Unable to deserialize
object of type: java.util.concurrent.ConcurrentHashMap
at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
at com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
at
de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
at
de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
at
de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
at
de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
at
de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
at
de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
at org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
at org.apache.catalina.connector.Request.getSession(Request.java:2120)
at
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
at
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
at
org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
deserialize object of type: com.ibatis.jpetstore.presentation.CatalogBean
at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
at
com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
at com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
... 31 more
Caused by: com.esotericsoftware.kryo.SerializationException: Serialization
trace:
productList (com.ibatis.jpetstore.presentation.CatalogBean)
at
com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
at
com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
... 34 more
Caused by: java.lang.NullPointerException
at
com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
at
com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
at
com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)

Search Discussions

  • Martin Grotzke at Jun 27, 2012 at 10:27 am

    On 06/27/2012 11:33 AM, 田晓亮 wrote:
    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat session manager

    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/

    Is there any limitation to an application when it use memcached session
    manager? cause jpetstore use struts tablib to manage its session.
    As you see in the stacktrace there's an NPE in ibatis' PaginatedDataList
    (source code:
    http://code.google.com/searchframe#03dlVvywzts/trunk/src/test/java/com/ibatis/sqlmap/engine/mapping/statement/PaginatedDataList.java).
    This class is handled by kryo's CollectionSerializer which causes the
    issues.

    A solution to this would be to let kryo's FieldSerializer handle this
    (or even better the one from kryo-serializers that supports creation of
    objects without default constructor).

    To achieve this you can create a class like this:

    public class IBatisPaginatedDataListRegistration implements
    KryoCustomization {

    @Override
    public void customize( final Kryo kryo ) {
    Serializer serializer = new
    ReferenceFieldSerializerReflectionFactorySupport( _kryo,
    PaginatedDataList.class );
    kryo.register( PaginatedDataList.class, serializer );
    }

    }

    You can have a look at msm-kryo-serializers for similar stuff:
    https://github.com/magro/memcached-session-manager/tree/master/kryo-serializer

    This class has to be available in the classpatch of your webapp.

    Then you can register it in msm as customConverter, see
    http://code.google.com/p/memcached-session-manager/wiki/SetupAndConfiguration#Overview_over_memcached-session-manager_configuration_attributes
    for customConverter details.

    Once you have it in place and working you submit a pull request with
    this class for msm :-)

    Cheers,
    Martin



    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM de.javakaffee.web.msm.MemcachedSessionService
    loadFromMemcached
    WARNING: Could not load session with id FB00CEB8D400BD69C5C656C33DA8B1AB
    from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to deserialize
    object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: com.ibatis.jpetstore.presentation.CatalogBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException:
    Serialization trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    --
    inoio gmbh - http://inoio.de
    Breitenfelder Str. 13c, 20251 Hamburg
    Amtsgericht Hamburg, HRB 123031
    Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn
  • 田晓亮 at Jun 28, 2012 at 2:44 am
    Thank you for your reply,I have done what you said,the same exception
    didn't happen anymore,but..another exception goes out

    com.esotericsoftware.kryo.SerializationException: Unable to deserialize
    object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: com.ibatis.jpetstore.presentation.CartBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException: Serialization
    trace:
    itemList (com.ibatis.jpetstore.domain.Cart)
    cart (com.ibatis.jpetstore.presentation.CartBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.common.util.PaginatedArrayList.add(PaginatedArrayList.java:121)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    ... 38 more

    maybe another serialize problem, how should I know what kind
    of serializer this class need

    在 2012年6月27日星期三UTC+8下午6时26分59秒,Martin Grotzke写道:
    On 06/27/2012 11:33 AM, 田晓亮 wrote:
    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat session manager
    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/

    Is there any limitation to an application when it use memcached session
    manager? cause jpetstore use struts tablib to manage its session.
    As you see in the stacktrace there's an NPE in ibatis' PaginatedDataList
    (source code:

    http://code.google.com/searchframe#03dlVvywzts/trunk/src/test/java/com/ibatis/sqlmap/engine/mapping/statement/PaginatedDataList.java).

    This class is handled by kryo's CollectionSerializer which causes the
    issues.

    A solution to this would be to let kryo's FieldSerializer handle this
    (or even better the one from kryo-serializers that supports creation of
    objects without default constructor).

    To achieve this you can create a class like this:

    public class IBatisPaginatedDataListRegistration implements
    KryoCustomization {

    @Override
    public void customize( final Kryo kryo ) {
    Serializer serializer = new
    ReferenceFieldSerializerReflectionFactorySupport( _kryo,
    PaginatedDataList.class );
    kryo.register( PaginatedDataList.class, serializer );
    }

    }

    You can have a look at msm-kryo-serializers for similar stuff:

    https://github.com/magro/memcached-session-manager/tree/master/kryo-serializer

    This class has to be available in the classpatch of your webapp.

    Then you can register it in msm as customConverter, see

    http://code.google.com/p/memcached-session-manager/wiki/SetupAndConfiguration#Overview_over_memcached-session-manager_configuration_attributes
    for customConverter details.

    Once you have it in place and working you submit a pull request with
    this class for msm :-)

    Cheers,
    Martin



    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM de.javakaffee.web.msm.MemcachedSessionService
    loadFromMemcached
    WARNING: Could not load session with id FB00CEB8D400BD69C5C656C33DA8B1AB
    from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to deserialize
    object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at
    com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type:
    com.ibatis.jpetstore.presentation.CatalogBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException:
    Serialization trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)


    --
    inoio gmbh - http://inoio.de
    Breitenfelder Str. 13c, 20251 Hamburg
    Amtsgericht Hamburg, HRB 123031
    Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn


  • Martin Grotzke at Jun 28, 2012 at 8:35 am

    Checkout the root cause of the stacktrace:

    Caused by: java.lang.NullPointerException
    at
    com.ibatis.common.util.PaginatedArrayList.add(PaginatedArrayList.java:121)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    ... 38 more

    maybe another serialize problem, how should I know what kind
    of serializer this class need
    Here you see that PaginatedArrayList is handled by CollectionSerializer.
    So I'd say you should do the same for PaginatedArrayList.

    Cheers,
    Martin

    在 2012年6月27日星期三UTC+8下午6时26分59秒,Martin Grotzke写道:
    On 06/27/2012 11:33 AM, 田晓亮 wrote:
    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat
    session manager
    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/
    <http://sourceforge.net/projects/ibatisjpetstore/>
    Is there any limitation to an application when it use memcached session
    manager? cause jpetstore use struts tablib to manage its session.
    As you see in the stacktrace there's an NPE in ibatis'
    PaginatedDataList
    (source code:
    http://code.google.com/searchframe#03dlVvywzts/trunk/src/test/java/com/ibatis/sqlmap/engine/mapping/statement/PaginatedDataList.java
    <http://code.google.com/searchframe#03dlVvywzts/trunk/src/test/java/com/ibatis/sqlmap/engine/mapping/statement/PaginatedDataList.java>).

    This class is handled by kryo's CollectionSerializer which causes the
    issues.

    A solution to this would be to let kryo's FieldSerializer handle this
    (or even better the one from kryo-serializers that supports creation of
    objects without default constructor).

    To achieve this you can create a class like this:

    public class IBatisPaginatedDataListRegistration implements
    KryoCustomization {

    @Override
    public void customize( final Kryo kryo ) {
    Serializer serializer = new
    ReferenceFieldSerializerReflectionFactorySupport( _kryo,
    PaginatedDataList.class );
    kryo.register( PaginatedDataList.class, serializer );
    }

    }

    You can have a look at msm-kryo-serializers for similar stuff:
    https://github.com/magro/memcached-session-manager/tree/master/kryo-serializer
    <https://github.com/magro/memcached-session-manager/tree/master/kryo-serializer>


    This class has to be available in the classpatch of your webapp.

    Then you can register it in msm as customConverter, see
    http://code.google.com/p/memcached-session-manager/wiki/SetupAndConfiguration#Overview_over_memcached-session-manager_configuration_attributes
    <http://code.google.com/p/memcached-session-manager/wiki/SetupAndConfiguration#Overview_over_memcached-session-manager_configuration_attributes>

    for customConverter details.

    Once you have it in place and working you submit a pull request with
    this class for msm :-)

    Cheers,
    Martin



    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM de.javakaffee.web.msm.MemcachedSessionService
    loadFromMemcached
    WARNING: Could not load session with id
    FB00CEB8D400BD69C5C656C33DA8B1AB
    from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize
    object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at
    com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at
    org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at
    org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type:
    com.ibatis.jpetstore.presentation.CatalogBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at
    com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException:
    Serialization trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)


    --
    inoio gmbh - http://inoio.de
    Breitenfelder Str. 13c, 20251 Hamburg
    Amtsgericht Hamburg, HRB 123031
    Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn

    --
    inoio gmbh - http://inoio.de
    Breitenfelder Str. 13c, 20251 Hamburg
    Amtsgericht Hamburg, HRB 123031
    Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn
  • 田晓亮 at Jun 28, 2012 at 8:39 am
    Thank you martin

    2012/6/28 Martin Grotzke <martin.grotzke@googlemail.com>
    Checkout the root cause of the stacktrace:
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.common.util.PaginatedArrayList.add(PaginatedArrayList.java:121)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    ... 38 more

    maybe another serialize problem, how should I know what kind
    of serializer this class need
    Here you see that PaginatedArrayList is handled by CollectionSerializer.
    So I'd say you should do the same for PaginatedArrayList.

    Cheers,
    Martin

    在 2012年6月27日星期三UTC+8下午6时26分59秒,Martin Grotzke写道:
    On 06/27/2012 11:33 AM, 田晓亮 wrote:
    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat
    session manager
    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/
    <http://sourceforge.net/projects/ibatisjpetstore/>
    Is there any limitation to an application when it use memcached session
    manager? cause jpetstore use struts tablib to manage its session.
    As you see in the stacktrace there's an NPE in ibatis'
    PaginatedDataList
    (source code:
    http://code.google.com/searchframe#03dlVvywzts/trunk/src/test/java/com/ibatis/sqlmap/engine/mapping/statement/PaginatedDataList.java
    <
    http://code.google.com/searchframe#03dlVvywzts/trunk/src/test/java/com/ibatis/sqlmap/engine/mapping/statement/PaginatedDataList.java
    ).

    This class is handled by kryo's CollectionSerializer which causes the
    issues.

    A solution to this would be to let kryo's FieldSerializer handle this
    (or even better the one from kryo-serializers that supports creation of
    objects without default constructor).

    To achieve this you can create a class like this:

    public class IBatisPaginatedDataListRegistration implements
    KryoCustomization {

    @Override
    public void customize( final Kryo kryo ) {
    Serializer serializer = new
    ReferenceFieldSerializerReflectionFactorySupport( _kryo,
    PaginatedDataList.class );
    kryo.register( PaginatedDataList.class, serializer );
    }

    }

    You can have a look at msm-kryo-serializers for similar stuff:
    https://github.com/magro/memcached-session-manager/tree/master/kryo-serializer
    <
    https://github.com/magro/memcached-session-manager/tree/master/kryo-serializer


    This class has to be available in the classpatch of your webapp.

    Then you can register it in msm as customConverter, see
    http://code.google.com/p/memcached-session-manager/wiki/SetupAndConfiguration#Overview_over_memcached-session-manager_configuration_attributes
    <
    http://code.google.com/p/memcached-session-manager/wiki/SetupAndConfiguration#Overview_over_memcached-session-manager_configuration_attributes

    for customConverter details.

    Once you have it in place and working you submit a pull request with
    this class for msm :-)

    Cheers,
    Martin



    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM
    de.javakaffee.web.msm.MemcachedSessionService
    loadFromMemcached
    WARNING: Could not load session with id
    FB00CEB8D400BD69C5C656C33DA8B1AB
    from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize
    object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at
    com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at
    org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at
    org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type:
    com.ibatis.jpetstore.presentation.CatalogBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at
    com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException:
    Serialization trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)

    --
    inoio gmbh - http://inoio.de
    Breitenfelder Str. 13c, 20251 Hamburg
    Amtsgericht Hamburg, HRB 123031
    Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn

    --
    inoio gmbh - http://inoio.de
    Breitenfelder Str. 13c, 20251 Hamburg
    Amtsgericht Hamburg, HRB 123031
    Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn


  • Groovy at Oct 5, 2012 at 3:15 pm
    I do get this error ! How can I configure Vector to use *
    CollectionSerializer?*
    Caused by: java.lang.NullPointerException
    at java.util.Vector.ensureCapacityHelper(*Vector*.java:218)
    at java.util.Vector.add(Vector.java:728)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(*
    CollectionSerializer*.java:113)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)

    On Wednesday, June 27, 2012 5:33:21 AM UTC-4, 田晓亮 wrote:

    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat session manager

    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/

    Is there any limitation to an application when it use memcached session
    manager? cause jpetstore use struts tablib to manage its session.


    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM de.javakaffee.web.msm.MemcachedSessionService
    loadFromMemcached
    WARNING: Could not load session with id FB00CEB8D400BD69C5C656C33DA8B1AB
    from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to deserialize
    object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: com.ibatis.jpetstore.presentation.CatalogBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException: Serialization
    trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
  • Martin Grotzke at Oct 5, 2012 at 3:29 pm
    Hi,

    I described the necessary steps in a previous message of this thread
    (here's the link:
    https://groups.google.com/d/msg/memcached-session-manager/Bti-DQxKJ_c/2Ay95S99p6kJ
    ). Which of the steps are not clear?

    Cheers,
    Martin

    On 10/05/2012 04:49 PM, groovy wrote:
    I do get this error ! How can I configure Vector to use
    *CollectionSerializer?*
    Caused by: java.lang.NullPointerException
    at java.util.Vector.ensureCapacityHelper(*Vector*.java:218)
    at java.util.Vector.add(Vector.java:728)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(*CollectionSerializer*.java:113)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)


    On Wednesday, June 27, 2012 5:33:21 AM UTC-4, 田晓亮 wrote:

    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat session
    manager

    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/
    <http://sourceforge.net/projects/ibatisjpetstore/>

    Is there any limitation to an application when it use memcached
    session manager? cause jpetstore use struts tablib to manage its
    session.


    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM
    de.javakaffee.web.msm.MemcachedSessionService loadFromMemcached
    WARNING: Could not load session with id
    FB00CEB8D400BD69C5C656C33DA8B1AB from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at
    com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable
    to deserialize object of type:
    com.ibatis.jpetstore.presentation.CatalogBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException:
    Serialization trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    --
    inoio gmbh - http://inoio.de
    Breitenfelder Str. 13c, 20251 Hamburg
    Amtsgericht Hamburg, HRB 123031
    Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn
  • Groovy at Oct 5, 2012 at 7:13 pm
    Thanks Again Martin!
    I placed *Vector *in place of *PaginatedDataList *,added jar and updated
    context.xml with CustomConverter* *! following error disappears but ,
    memcached *session replication* is *not working!
    *
    Error:> Caused by: java.lang.NullPointerException
    at java.util.Vector.
    ensureCapacityHelper(*Vector*.java:218)
    at java.util.Vector.add(*Vector*.java:728)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(*CollectionSerializer*.java:113)



    public class *IBatisPaginatedDataListRegistr*
    ation implements
    KryoCustomization {

    @Override
    public void customize( final Kryo kryo ) {
    Serializer serializer = new
    ReferenceFieldSerializerReflectionFactorySupport( _kryo,
    *PaginatedDataList*.class );
    kryo.register( *PaginatedDataList*.class, serializer );
    }

    }

    On Wednesday, June 27, 2012 5:33:21 AM UTC-4, 田晓亮 wrote:

    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat session manager

    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/

    Is there any limitation to an application when it use memcached session
    manager? cause jpetstore use struts tablib to manage its session.


    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM de.javakaffee.web.msm.MemcachedSessionService
    loadFromMemcached
    WARNING: Could not load session with id FB00CEB8D400BD69C5C656C33DA8B1AB
    from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to deserialize
    object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: com.ibatis.jpetstore.presentation.CatalogBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException: Serialization
    trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
  • Martin Grotzke at Oct 5, 2012 at 10:57 pm
    I'm a little bit confused. The error disappears but msm is not working?
    So what's the issue now?

    Please provide enough details that allow me to help you.

    Cheers,
    Martin

    On 10/05/2012 09:05 PM, groovy wrote:
    Thanks Again Martin!
    I placed *Vector *in place of *PaginatedDataList *,added jar and updated
    context.xml with CustomConverter**! following error disappears but ,
    memcached *session replication* is *not working!
    *
    Error:> Caused by: java.lang.NullPointerException
    at java.util.Vector.
    ensureCapacityHelper(*Vector*.java:218)
    at java.util.Vector.add(*Vector*.java:728)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(*CollectionSerializer*.java:113)



    public class *IBatisPaginatedDataListRegistr*
    ation implements
    KryoCustomization {

    @Override
    public void customize( final Kryo kryo ) {
    Serializer serializer = new
    ReferenceFieldSerializerReflectionFactorySupport( _kryo,
    *PaginatedDataList*.class );
    kryo.register( *PaginatedDataList*.class, serializer );
    }

    }


    On Wednesday, June 27, 2012 5:33:21 AM UTC-4, 田晓亮 wrote:

    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat session
    manager

    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/
    <http://sourceforge.net/projects/ibatisjpetstore/>

    Is there any limitation to an application when it use memcached
    session manager? cause jpetstore use struts tablib to manage its
    session.


    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM
    de.javakaffee.web.msm.MemcachedSessionService loadFromMemcached
    WARNING: Could not load session with id
    FB00CEB8D400BD69C5C656C33DA8B1AB from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at
    com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable
    to deserialize object of type:
    com.ibatis.jpetstore.presentation.CatalogBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException:
    Serialization trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    --
    inoio gmbh - http://inoio.de
    Breitenfelder Str. 13c, 20251 Hamburg
    Amtsgericht Hamburg, HRB 123031
    Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn
  • Groovy at Oct 5, 2012 at 8:09 pm
    Sorry the Issue still exists!

    Is this the correct code

    @Override
    public void customize(final Kryo kryo) {
    Serializer serializer = new
    ReferenceFieldSerializerReflectionFactorySupport(kryo, *Vector*.class);
    kryo.register(*Vector*.class, serializer);
    }


    for the following Error??


    Caused by: java.lang.NullPointerException
    at java.util.Vector.
    ensureCapacityHelper(*Vector*.java:218)
    at java.util.Vector.add(*Vector*.java:728)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(*
    CollectionSerializer*.java:113)
    On Wednesday, June 27, 2012 5:33:21 AM UTC-4, 田晓亮 wrote:

    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat session manager

    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/

    Is there any limitation to an application when it use memcached session
    manager? cause jpetstore use struts tablib to manage its session.


    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM de.javakaffee.web.msm.MemcachedSessionService
    loadFromMemcached
    WARNING: Could not load session with id FB00CEB8D400BD69C5C656C33DA8B1AB
    from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to deserialize
    object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: com.ibatis.jpetstore.presentation.CatalogBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException: Serialization
    trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
  • Groovy at Oct 8, 2012 at 2:12 pm
    Thanks Martin! The following *error still exists*

    Caused by: java.lang.*NullPointerException*
    at java.util.Vector.ensureCapacityHelper(*Vector*.java:218)
    at java.util.Vector.add(*Vector*.java:728)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(*
    CollectionSerializer*.java:113)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)

    Even after having ...

    public class *CustomConverterTest *implements KryoCustomization {

    @Override
    public void customize(final Kryo kryo) {
    Serializer serializer = new
    ReferenceFieldSerializerReflectionFactorySupport(kryo, *Vector*.class);
    kryo.register(*Vector*.class, serializer);
    }

    }

    *CustomConverterTest *in a test.jar file under TOMCAT/lib/*test.jar*

    *Context.xml*

    <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
    memcachedNodes="n1:127.0.0.1:11211,n2:127.0.0.1:11212"
    failoverNodes="n1"
    requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"

    transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"
    customConverter="net.laureate.core.util.*CustomConverterTest*"/>

    On Wednesday, June 27, 2012 5:33:21 AM UTC-4, 田晓亮 wrote:

    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat session manager

    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/

    Is there any limitation to an application when it use memcached session
    manager? cause jpetstore use struts tablib to manage its session.


    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM de.javakaffee.web.msm.MemcachedSessionService
    loadFromMemcached
    WARNING: Could not load session with id FB00CEB8D400BD69C5C656C33DA8B1AB
    from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to deserialize
    object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: com.ibatis.jpetstore.presentation.CatalogBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException: Serialization
    trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
  • Martin Grotzke at Oct 8, 2012 at 4:44 pm
    Weird, I don't see why you get this error. The collection serializer is
    still used, but this should also be no problem. I'd start investigating why
    collection serializer fails. Can you provide a simple test that allows me
    to reproduce this (if possible just using kryo / kryo-serializers stuff)?

    Cheers,
    Martin
    Am 08.10.2012 16:06 schrieb "groovy" <groovygrails1@gmail.com>:
    Thanks Martin! The following *error still exists*

    Caused by: java.lang.*NullPointerException*
    at java.util.Vector.ensureCapacityHelper(*Vector*.java:218)
    at java.util.Vector.add(*Vector*.java:728)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(*
    CollectionSerializer*.java:113)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)

    Even after having ...

    public class *CustomConverterTest *implements KryoCustomization {

    @Override
    public void customize(final Kryo kryo) {
    Serializer serializer = new
    ReferenceFieldSerializerReflectionFactorySupport(kryo, *Vector*.class);
    kryo.register(*Vector*.class, serializer);
    }

    }

    *CustomConverterTest *in a test.jar file under TOMCAT/lib/*test.jar*

    *Context.xml*

    <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
    memcachedNodes="n1:127.0.0.1:11211,n2:127.0.0.1:11212"
    failoverNodes="n1"
    requestUriIgnorePattern=".*\.(ico|png|gif|jpg|css|js)$"

    transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"
    customConverter="net.laureate.core.util.*CustomConverterTest*"/>

    On Wednesday, June 27, 2012 5:33:21 AM UTC-4, 田晓亮 wrote:

    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat session
    manager

    here is the jpetstore source code:
    http://sourceforge.net/**projects/ibatisjpetstore/<http://sourceforge.net/projects/ibatisjpetstore/>

    Is there any limitation to an application when it use memcached session
    manager? cause jpetstore use struts tablib to manage its session.


    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM de.javakaffee.web.msm.**MemcachedSessionService
    loadFromMemcached
    WARNING: Could not load session with id FB00CEB8D400BD69C5C656C33DA8B1**AB
    from memcached.
    com.esotericsoftware.kryo.**SerializationException: Unable to
    deserialize object of type: java.util.concurrent.**ConcurrentHashMap
    at com.esotericsoftware.kryo.**Kryo.readObject(Kryo.java:584)
    at com.esotericsoftware.kryo.**ObjectBuffer.readObject(**
    ObjectBuffer.java:209)
    at de.javakaffee.web.msm.**serializer.kryo.**KryoTranscoder.**
    deserializeAttributes(**KryoTranscoder.java:256)
    at de.javakaffee.web.msm.**TranscoderService.**deserializeAttributes(**
    TranscoderService.java:159)
    at de.javakaffee.web.msm.**TranscoderService.deserialize(**
    TranscoderService.java:116)
    at de.javakaffee.web.msm.**MemcachedSessionService.**loadFromMemcached(**
    MemcachedSessionService.java:**1027)
    at de.javakaffee.web.msm.**MemcachedSessionService.**findSession(**
    MemcachedSessionService.java:**578)
    at de.javakaffee.web.msm.**MemcachedBackupSessionManager.**findSession(**
    MemcachedBackupSessionManager.**java:215)
    at org.apache.catalina.connector.**Request.doGetSession(Request.**
    java:2382)
    at org.apache.catalina.connector.**Request.getSession(Request.**
    java:2120)
    at org.apache.catalina.connector.**RequestFacade.getSession(**
    RequestFacade.java:833)
    at org.apache.catalina.connector.**RequestFacade.getSession(**
    RequestFacade.java:844)
    at org.apache.struts.action.**RequestProcessor.**processLocale(**
    RequestProcessor.java:631)
    at org.apache.struts.action.**RequestProcessor.process(**
    RequestProcessor.java:230)
    at org.apache.struts.action.**ActionServlet.process(**
    ActionServlet.java:1482)
    at org.apache.struts.action.**ActionServlet.doGet(**
    ActionServlet.java:507)
    at javax.servlet.http.**HttpServlet.service(**HttpServlet.java:617)
    at javax.servlet.http.**HttpServlet.service(**HttpServlet.java:717)
    at org.apache.catalina.core.**ApplicationFilterChain.**internalDoFilter(*
    *ApplicationFilterChain.java:**290)
    at org.apache.catalina.core.**ApplicationFilterChain.**doFilter(**
    ApplicationFilterChain.java:**206)
    at org.apache.catalina.core.**StandardWrapperValve.invoke(**
    StandardWrapperValve.java:233)
    at org.apache.catalina.core.**StandardContextValve.invoke(**
    StandardContextValve.java:191)
    at de.javakaffee.web.msm.**SessionTrackerValve.invoke(**
    SessionTrackerValve.java:126)
    at org.apache.catalina.**authenticator.**AuthenticatorBase.invoke(**
    AuthenticatorBase.java:470)
    at org.apache.catalina.core.**StandardHostValve.invoke(**
    StandardHostValve.java:127)
    at org.apache.catalina.valves.**ErrorReportValve.invoke(**
    ErrorReportValve.java:102)
    at org.apache.catalina.core.**StandardEngineValve.invoke(**
    StandardEngineValve.java:109)
    at org.apache.catalina.connector.**CoyoteAdapter.service(**
    CoyoteAdapter.java:298)
    at org.apache.coyote.http11.**Http11Processor.process(**
    Http11Processor.java:859)
    at org.apache.coyote.http11.**Http11Protocol$**Http11ConnectionHandler.**
    process(Http11Protocol.java:**588)
    at org.apache.tomcat.util.net.**JIoEndpoint$Worker.run(**
    JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.**java:662)
    Caused by: com.esotericsoftware.kryo.**SerializationException: Unable to
    deserialize object of type: com.ibatis.jpetstore.**
    presentation.CatalogBean
    at com.esotericsoftware.kryo.**Kryo.readClassAndObject(Kryo.**java:562)
    at com.esotericsoftware.kryo.**serialize.MapSerializer.**
    readObjectData(MapSerializer.**java:129)
    at com.esotericsoftware.kryo.**Serializer.readObject(**
    Serializer.java:61)
    at com.esotericsoftware.kryo.**Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.**SerializationException:
    Serialization trace:
    productList (com.ibatis.jpetstore.**presentation.CatalogBean)
    at com.esotericsoftware.kryo.**serialize.FieldSerializer.**
    readObjectData(**FieldSerializer.java:230)
    at com.esotericsoftware.kryo.**serialize.**ReferenceFieldSerializer.**
    readObjectData(**ReferenceFieldSerializer.java:**81)
    at com.esotericsoftware.kryo.**Kryo.readClassAndObject(Kryo.**java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at com.ibatis.sqlmap.engine.**mapping.statement.**PaginatedDataList.add(*
    *PaginatedDataList.java:233)
    at com.esotericsoftware.kryo.**serialize.**CollectionSerializer.**
    readObjectData(**CollectionSerializer.java:113)
    at com.esotericsoftware.kryo.**serialize.FieldSerializer.**
    readObjectData(**FieldSerializer.java:212)
  • Groovy at Oct 8, 2012 at 5:13 pm
    I am not sure how to reproduce this problem , I *get this error* when I am *trying
    to work with Real application*(no issues with simple web app)! Here is the *complete
    stacktrace *of this error.

    *Oct 8, 2012 12:55:38 PM de.javakaffee.web.msm.MemcachedSessionService
    loadFromMemcached
    WARNING: Could not load session with id 765D2EFFAA36C1CF0767ED9C8025B129-n2
    from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to deserialize
    object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at
    com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:169)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:126)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1119)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:597)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:196)
    at
    org.apache.catalina.connector.Request.doGetSession(Request.java:2851)
    at
    org.apache.catalina.connector.Request.getSessionInternal(Request.java:2507)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:427)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
    at
    org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1770)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: ZYX
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at
    com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 28 more
    Caused by: com.esotericsoftware.kryo.SerializationException: Serialization
    trace:
    ht (org.apache.log4j.Hierarchy)
    repository (org.apache.log4j.spi.RootLogger)
    parent (org.apache.log4j.Logger)
    parent (org.apache.log4j.Logger)
    logger (LoginService)
    loginService (XYZ)
    XYZ (ABC)
    data (ZYX)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 31 more
    Caused by: java.lang.NullPointerException
    at java.util.Vector.ensureCapacityHelper(Vector.java:218)
    at java.util.Vector.add(Vector.java:728)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    ... 47 more
    Oct 8, 2012 12:55:39 PM de.javakaffee.web.msm.MemcachedSessionService
    loadFromMemcached
    WARNING: Could not load session with id 765D2EFFAA36C1CF0767ED9C8025B129-n2
    from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to deserialize
    object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at
    com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:169)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:126)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1119)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:597)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:196)
    at
    org.apache.catalina.connector.Request.doGetSession(Request.java:2851)
    at
    org.apache.catalina.connector.Request.getSession(Request.java:2307)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:898)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:910)
    at SessionInterceptor.preHandle(SessionInterceptor.java:78)
    at
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:781)
    at
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    at
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    at
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at
    de.javakaffee.web.msm.RequestTrackingContextValve.invoke(RequestTrackingContextValve.java:99)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
    at
    org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1770)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: ZYX
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at
    com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 42 more
    Caused by: com.esotericsoftware.kryo.SerializationException: Serialization
    trace:
    ht (org.apache.log4j.Hierarchy)
    repository (org.apache.log4j.spi.RootLogger)
    parent (org.apache.log4j.Logger)
    parent (org.apache.log4j.Logger)
    logger (LoginService)
    loginService (XYZ)
    XYZ (ABC)
    data (ZYX)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 45 more
    Caused by: java.lang.NullPointerException
    at java.util.Vector.ensureCapacityHelper(Vector.java:218)
    at java.util.Vector.add(Vector.java:728)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    ... 61 more
    AP.get()
    *

    On Wednesday, June 27, 2012 5:33:21 AM UTC-4, 田晓亮 wrote:

    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat session manager

    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/

    Is there any limitation to an application when it use memcached session
    manager? cause jpetstore use struts tablib to manage its session.


    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM de.javakaffee.web.msm.MemcachedSessionService
    loadFromMemcached
    WARNING: Could not load session with id FB00CEB8D400BD69C5C656C33DA8B1AB
    from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to deserialize
    object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: com.ibatis.jpetstore.presentation.CatalogBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException: Serialization
    trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
  • Martin Grotzke at Oct 8, 2012 at 8:35 pm
    There are some thinks noticeable:

    1) Several (7) invocations of
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    which seems as if RequestTrackingHostValve was registered multiple
    times. I don't think that it has s.th. to do with the issue, but this is
    not how it should be. Still, for now I'd not look further into this.

    2) Recurring ReferenceFieldSerializer.readObjectData ->
    FieldSerializer.readObjectData invocations

    3) The NPE in Vector.ensureCapacityHelper: in my oracle jdk 1.6.0_33
    line 218 maps to "int oldCapacity = elementData.length;", thus the NPE
    means that elementData is null. This should not happen, as the
    CollectionSerializer creates collection instances via type.newInstance
    which invokes the default constructor which in turn initializes elementData.

    4) What is "AP.get()" at the end of the logs? :-)

    I think the most interesting part now is this ZYX type. Can you share
    it's structure, or try to reproduce the issue by creating some variant
    of this class?

    Btw, does this happen only occasionally, or always with your app?

    Cheers,
    Martin


    On 10/08/2012 07:13 PM, groovy wrote:
    I am not sure how to reproduce this problem , I *get this error* when I
    am *trying to work with Real application*(no issues with simple web
    app)! Here is the *complete stacktrace *of this error.

    *Oct 8, 2012 12:55:38 PM de.javakaffee.web.msm.MemcachedSessionService
    loadFromMemcached
    WARNING: Could not load session with id
    765D2EFFAA36C1CF0767ED9C8025B129-n2 from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to deserialize
    object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at
    com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:169)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:126)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1119)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:597)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:196)
    at
    org.apache.catalina.connector.Request.doGetSession(Request.java:2851)
    at
    org.apache.catalina.connector.Request.getSessionInternal(Request.java:2507)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:427)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
    at
    org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1770)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: ZYX
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at
    com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 28 more
    Caused by: com.esotericsoftware.kryo.SerializationException:
    Serialization trace:
    ht (org.apache.log4j.Hierarchy)
    repository (org.apache.log4j.spi.RootLogger)
    parent (org.apache.log4j.Logger)
    parent (org.apache.log4j.Logger)
    logger (LoginService)
    loginService (XYZ)
    XYZ (ABC)
    data (ZYX)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 31 more
    Caused by: java.lang.NullPointerException
    at java.util.Vector.ensureCapacityHelper(Vector.java:218)
    at java.util.Vector.add(Vector.java:728)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    ... 47 more
    Oct 8, 2012 12:55:39 PM de.javakaffee.web.msm.MemcachedSessionService
    loadFromMemcached
    WARNING: Could not load session with id
    765D2EFFAA36C1CF0767ED9C8025B129-n2 from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to deserialize
    object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at
    com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:169)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:126)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1119)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:597)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:196)
    at
    org.apache.catalina.connector.Request.doGetSession(Request.java:2851)
    at
    org.apache.catalina.connector.Request.getSession(Request.java:2307)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:898)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:910)
    at SessionInterceptor.preHandle(SessionInterceptor.java:78)
    at
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:781)
    at
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    at
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    at
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at
    de.javakaffee.web.msm.RequestTrackingContextValve.invoke(RequestTrackingContextValve.java:99)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:151)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at
    org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at
    org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
    at
    org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1770)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: ZYX
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at
    com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 42 more
    Caused by: com.esotericsoftware.kryo.SerializationException:
    Serialization trace:
    ht (org.apache.log4j.Hierarchy)
    repository (org.apache.log4j.spi.RootLogger)
    parent (org.apache.log4j.Logger)
    parent (org.apache.log4j.Logger)
    logger (LoginService)
    loginService (XYZ)
    XYZ (ABC)
    data (ZYX)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 45 more
    Caused by: java.lang.NullPointerException
    at java.util.Vector.ensureCapacityHelper(Vector.java:218)
    at java.util.Vector.add(Vector.java:728)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    ... 61 more
    AP.get()
    *


    On Wednesday, June 27, 2012 5:33:21 AM UTC-4, 田晓亮 wrote:

    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat session
    manager

    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/
    <http://sourceforge.net/projects/ibatisjpetstore/>

    Is there any limitation to an application when it use memcached
    session manager? cause jpetstore use struts tablib to manage its
    session.


    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM
    de.javakaffee.web.msm.MemcachedSessionService loadFromMemcached
    WARNING: Could not load session with id
    FB00CEB8D400BD69C5C656C33DA8B1AB from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at
    com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable
    to deserialize object of type:
    com.ibatis.jpetstore.presentation.CatalogBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException:
    Serialization trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    --
    inoio gmbh - http://inoio.de
    Breitenfelder Str. 13c, 20251 Hamburg
    Amtsgericht Hamburg, HRB 123031
    Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn
  • Groovy at Oct 8, 2012 at 8:51 pm
    Thank Martin!

    This issue happens *all the time , it's never worked!*

    AP.get() is application logs,* nothing to do with this issue*

    *ZYX.java *looks like this with its getters/setters

    private *ABC *data= null;

    private String uid = null;

    private String userID = null;

    private String sessionLocale = null;

    private List<String> localeList = null;

    On Wednesday, June 27, 2012 5:33:21 AM UTC-4, 田晓亮 wrote:

    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat session manager

    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/

    Is there any limitation to an application when it use memcached session
    manager? cause jpetstore use struts tablib to manage its session.


    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM de.javakaffee.web.msm.MemcachedSessionService
    loadFromMemcached
    WARNING: Could not load session with id FB00CEB8D400BD69C5C656C33DA8B1AB
    from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to deserialize
    object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: com.ibatis.jpetstore.presentation.CatalogBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException: Serialization
    trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
  • Martin Grotzke at Oct 8, 2012 at 10:00 pm
    Ok, from this I don't see anything that makes sense to dig deeper. What
    is the class that holds the Vector object? Can you rebuild the object
    structure to reproduce the problem? Is there somewhere a cyclic
    dependency in the object graph?

    Btw, it's easier to follow the thread when you reply to the
    right/previous message.

    Cheers,
    Martin

    On 10/08/2012 10:44 PM, groovy wrote:
    Thank Martin!

    This issue happens *all the time , it's never worked!*

    AP.get() is application logs,*nothing to do with this issue*

    *ZYX.java *looks like this with its getters/setters

    private *ABC *data= null;

    private String uid = null;

    private String userID = null;

    private String sessionLocale = null;

    private List<String> localeList = null;


    On Wednesday, June 27, 2012 5:33:21 AM UTC-4, 田晓亮 wrote:

    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat session
    manager

    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/
    <http://sourceforge.net/projects/ibatisjpetstore/>

    Is there any limitation to an application when it use memcached
    session manager? cause jpetstore use struts tablib to manage its
    session.


    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM
    de.javakaffee.web.msm.MemcachedSessionService loadFromMemcached
    WARNING: Could not load session with id
    FB00CEB8D400BD69C5C656C33DA8B1AB from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at
    com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable
    to deserialize object of type:
    com.ibatis.jpetstore.presentation.CatalogBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException:
    Serialization trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    --
    inoio gmbh - http://inoio.de
    Breitenfelder Str. 13c, 20251 Hamburg
    Amtsgericht Hamburg, HRB 123031
    Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn
  • Groovy at Oct 8, 2012 at 10:02 pm
    We do not use Vector at all in our application! I am not sure what cyclic
    dependency is and where do we set this?
    On Monday, October 8, 2012 5:54:40 PM UTC-4, Martin Grotzke wrote:

    Ok, from this I don't see anything that makes sense to dig deeper. What
    is the class that holds the Vector object? Can you rebuild the object
    structure to reproduce the problem? Is there somewhere a cyclic
    dependency in the object graph?

    Btw, it's easier to follow the thread when you reply to the
    right/previous message.

    Cheers,
    Martin

    On 10/08/2012 10:44 PM, groovy wrote:
    Thank Martin!

    This issue happens *all the time , it's never worked!*

    AP.get() is application logs,*nothing to do with this issue*

    *ZYX.java *looks like this with its getters/setters

    private *ABC *data= null;

    private String uid = null;

    private String userID = null;

    private String sessionLocale = null;

    private List<String> localeList = null;


    On Wednesday, June 27, 2012 5:33:21 AM UTC-4, 田晓亮 wrote:

    I use Jpetstore to test memcache session manager. the serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat session
    manager

    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/
    <http://sourceforge.net/projects/ibatisjpetstore/>

    Is there any limitation to an application when it use memcached
    session manager? cause jpetstore use struts tablib to manage its
    session.


    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM
    de.javakaffee.web.msm.MemcachedSessionService loadFromMemcached
    WARNING: Could not load session with id
    FB00CEB8D400BD69C5C656C33DA8B1AB from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type: java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at
    com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at
    org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at
    org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable
    to deserialize object of type:
    com.ibatis.jpetstore.presentation.CatalogBean
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at
    com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException:
    Serialization trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    --
    inoio gmbh - http://inoio.de
    Breitenfelder Str. 13c, 20251 Hamburg
    Amtsgericht Hamburg, HRB 123031
    Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn
  • Martin Grotzke at Oct 9, 2012 at 8:56 am

    On 10/09/2012 12:01 AM, groovy wrote:
    We do not use Vector at all in our application!
    Well, according to the serialized object structure s.th. is using it,
    maybe not your own code directly but some 3rd party stuff.

    If you attach a debugger to the running app you can add a breakpoint to
    the Vector constructor to see which class is instantiating it.
    I am not sure what
    cyclic dependency is and where do we set this?
    E.g. if class A has a reference on B and B has a reference on A you have
    a cyclic dependency (s.th. like <code>A a = new A(); B b = new B(); a.b
    = b; b.a = a;</code>

    Cheers,
    Martin
    On Monday, October 8, 2012 5:54:40 PM UTC-4, Martin Grotzke wrote:

    Ok, from this I don't see anything that makes sense to dig deeper. What
    is the class that holds the Vector object? Can you rebuild the object
    structure to reproduce the problem? Is there somewhere a cyclic
    dependency in the object graph?

    Btw, it's easier to follow the thread when you reply to the
    right/previous message.

    Cheers,
    Martin

    On 10/08/2012 10:44 PM, groovy wrote:
    Thank Martin!

    This issue happens *all the time , it's never worked!*

    AP.get() is application logs,*nothing to do with this issue*

    *ZYX.java *looks like this with its getters/setters

    private *ABC *data= null;

    private String uid = null;

    private String userID = null;

    private String sessionLocale = null;

    private List<String> localeList = null;


    On Wednesday, June 27, 2012 5:33:21 AM UTC-4, 田晓亮 wrote:

    I use Jpetstore to test memcache session manager. the
    serialization
    strategy is kryo


    the jpetstore cannot work normally as it use default tomcat session
    manager

    here is the jpetstore source code:
    http://sourceforge.net/projects/ibatisjpetstore/
    <http://sourceforge.net/projects/ibatisjpetstore/>
    <http://sourceforge.net/projects/ibatisjpetstore/
    <http://sourceforge.net/projects/ibatisjpetstore/>>
    Is there any limitation to an application when it use memcached
    session manager? cause jpetstore use struts tablib to manage its
    session.


    here is exception trace stack

    could you please give me some hint about why this happened?

    Jun 27, 2012 9:10:04 AM
    de.javakaffee.web.msm.MemcachedSessionService loadFromMemcached
    WARNING: Could not load session with id
    FB00CEB8D400BD69C5C656C33DA8B1AB from memcached.
    com.esotericsoftware.kryo.SerializationException: Unable to
    deserialize object of type:
    java.util.concurrent.ConcurrentHashMap
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:584)
    at
    com.esotericsoftware.kryo.ObjectBuffer.readObject(ObjectBuffer.java:209)
    at
    de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.deserializeAttributes(KryoTranscoder.java:256)
    at
    de.javakaffee.web.msm.TranscoderService.deserializeAttributes(TranscoderService.java:159)
    at
    de.javakaffee.web.msm.TranscoderService.deserialize(TranscoderService.java:116)
    at
    de.javakaffee.web.msm.MemcachedSessionService.loadFromMemcached(MemcachedSessionService.java:1027)
    at
    de.javakaffee.web.msm.MemcachedSessionService.findSession(MemcachedSessionService.java:578)
    at
    de.javakaffee.web.msm.MemcachedBackupSessionManager.findSession(MemcachedBackupSessionManager.java:215)
    at
    org.apache.catalina.connector.Request.doGetSession(Request.java:2382)
    at
    org.apache.catalina.connector.Request.getSession(Request.java:2120)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
    at
    org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:844)
    at
    org.apache.struts.action.RequestProcessor.processLocale(RequestProcessor.java:631)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at
    de.javakaffee.web.msm.SessionTrackerValve.invoke(SessionTrackerValve.java:126)
    at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.esotericsoftware.kryo.SerializationException: Unable
    to deserialize object of type:
    com.ibatis.jpetstore.presentation.CatalogBean
    at
    com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:562)
    at
    com.esotericsoftware.kryo.serialize.MapSerializer.readObjectData(MapSerializer.java:129)
    at
    com.esotericsoftware.kryo.Serializer.readObject(Serializer.java:61)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:580)
    ... 31 more
    Caused by: com.esotericsoftware.kryo.SerializationException:
    Serialization trace:
    productList (com.ibatis.jpetstore.presentation.CatalogBean)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:230)
    at
    com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.readObjectData(ReferenceFieldSerializer.java:81)
    at
    com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:557)
    ... 34 more
    Caused by: java.lang.NullPointerException
    at
    com.ibatis.sqlmap.engine.mapping.statement.PaginatedDataList.add(PaginatedDataList.java:233)
    at
    com.esotericsoftware.kryo.serialize.CollectionSerializer.readObjectData(CollectionSerializer.java:113)
    at
    com.esotericsoftware.kryo.serialize.FieldSerializer.readObjectData(FieldSerializer.java:212)
    --
    inoio gmbh - http://inoio.de
    Breitenfelder Str. 13c, 20251 Hamburg
    Amtsgericht Hamburg, HRB 123031
    Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn
    --
    inoio gmbh - http://inoio.de
    Breitenfelder Str. 13c, 20251 Hamburg
    Amtsgericht Hamburg, HRB 123031
    Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmemcached-session-manager @
categoriesmemcached
postedJun 27, '12 at 9:33a
activeOct 9, '12 at 8:56a
posts18
users3
websitememcached.org

People

Translate

site design / logo © 2022 Grokbase