wang-haha / memcached-session-manager

Automatically exported from code.google.com/p/memcached-session-manager
0 stars 0 forks source link

NullPointerException On Memcached Session Manager Configurations #206

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Environment and configurations using here. Just for the information the 
application works for "JavaSerialization"

Application Using: Java, Tomcat 7.0.42, JSF 2.2.2,Spring 3.2.3

OS : Windows 7.

Memcache : memcached-win64-1.4.4-14

Libs in tomcat : spymemcached-2.10.6.jar, reflectasm-1.03.jar, 
msm-kryo-serializer-1.8.1.jar, memcached-session-manager-tc7-1.8.1.jar, 
memcached-session-manager-1.8.1.jar, asm-3.2.jar, minlog-1.2.jar, 
kryo-1.04.jar, kryo-serializers-0.11.jar

Maven conf:  

      <dependency>
         <groupId>de.javakaffee.msm</groupId>
         <artifactId>msm-kryo-serializer</artifactId>
         <version>1.8.1</version>
       </dependency>

context.xml in tomcat:   

     <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
                    memcachedNodes="127.0.0.1:11211"
                    sticky="false"
                    sessionBackupAsync="false"
                    lockingMode="auto"   
                requestUriIgnorePattern= ".*\.(png|gif|jpg|css|js)$"
                memcachedProtocol="binary"copyCollectionsForSerialization="true"
    transcoderFactoryClass="de.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"    

    customConverter="de.javakaffee.web.msm.serializer.kryo.FacesLRUMapRegistration"/>

StackTrace:

May 25, 2014 9:34:05 PM de.javakaffee.web.msm.BackupSessionService backupSession
INFO: Could not store session B65472C2CF0928E3FA1ECD97F7B8D438 in memcached.
java.util.concurrent.ExecutionException: java.lang.NullPointerException
    at de.javakaffee.web.msm.BackupSessionService$SynchronousExecutorService.submit(BackupSessionService.java:348)
    at de.javakaffee.web.msm.BackupSessionService.backupSession(BackupSessionService.java:205)
    at de.javakaffee.web.msm.MemcachedSessionService.backupSession(MemcachedSessionService.java:1040)
    at de.javakaffee.web.msm.RequestTrackingHostValve.backupSession(RequestTrackingHostValve.java:230)
    at de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:159)
    at de.javakaffee.web.msm.RequestTrackingHostValve.invoke(RequestTrackingHostValve.java:124)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
    at com.esotericsoftware.kryo.serialize.FieldSerializer.rebuildCachedFields(FieldSerializer.java:61)
    at com.esotericsoftware.kryo.serialize.FieldSerializer.<init>(FieldSerializer.java:48)
    at com.esotericsoftware.kryo.serialize.ReferenceFieldSerializer.<init>(ReferenceFieldSerializer.java:26)
    at de.javakaffee.web.msm.serializer.kryo.ReferenceFieldSerializerFactory.newDefaultSerializer(ReferenceFieldSerializerFactory.java:34)
    at de.javakaffee.web.msm.serializer.kryo.KryoTranscoder$1.newDefaultSerializer(KryoTranscoder.java:198)
    at com.esotericsoftware.kryo.Kryo.newSerializer(Kryo.java:273)
    at de.javakaffee.web.msm.serializer.kryo.KryoTranscoder$1.newSerializer(KryoTranscoder.java:176)
    at com.esotericsoftware.kryo.Kryo.handleUnregisteredClass(Kryo.java:329)
    at de.javakaffee.web.msm.serializer.kryo.KryoTranscoder$1.handleUnregisteredClass(KryoTranscoder.java:193)
    at com.esotericsoftware.kryo.Kryo.getRegisteredClass(Kryo.java:305)
    at com.esotericsoftware.kryo.Kryo.writeClass(Kryo.java:374)
    at de.javakaffee.kryoserializers.ClassSerializer.write(ClassSerializer.java:51)
    at de.javakaffee.kryoserializers.ClassSerializer.write(ClassSerializer.java:30)
    at com.esotericsoftware.kryo.serialize.SimpleSerializer.writeObjectData(SimpleSerializer.java:17)
    at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:489)
    at com.esotericsoftware.kryo.serialize.ArraySerializer.writeArray(ArraySerializer.java:123)
    at com.esotericsoftware.kryo.serialize.ArraySerializer.writeObjectData(ArraySerializer.java:88)
    at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:489)
    at com.esotericsoftware.kryo.serialize.ArraySerializer.writeArray(ArraySerializer.java:123)
    at com.esotericsoftware.kryo.serialize.ArraySerializer.writeObjectData(ArraySerializer.java:88)
    at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:489)
    at com.esotericsoftware.kryo.serialize.ArraySerializer.writeArray(ArraySerializer.java:123)
    at com.esotericsoftware.kryo.serialize.ArraySerializer.writeObjectData(ArraySerializer.java:88)
    at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:489)
    at com.esotericsoftware.kryo.serialize.ArraySerializer.writeArray(ArraySerializer.java:123)
    at com.esotericsoftware.kryo.serialize.ArraySerializer.writeObjectData(ArraySerializer.java:88)
    at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:489)
    at com.esotericsoftware.kryo.serialize.MapSerializer.writeObjectData(MapSerializer.java:104)
    at de.javakaffee.kryoserializers.CopyForIterateMapSerializer.writeObjectData(CopyForIterateMapSerializer.java:56)
    at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:489)
    at com.esotericsoftware.kryo.serialize.ArraySerializer.writeArray(ArraySerializer.java:123)
    at com.esotericsoftware.kryo.serialize.ArraySerializer.writeObjectData(ArraySerializer.java:88)
    at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:489)
    at de.javakaffee.web.msm.serializer.kryo.FacesLRUMapRegistration$LRUMapSerializer.write(FacesLRUMapRegistration.java:87)
    at de.javakaffee.web.msm.serializer.kryo.FacesLRUMapRegistration$LRUMapSerializer.write(FacesLRUMapRegistration.java:45)
    at com.esotericsoftware.kryo.serialize.SimpleSerializer.writeObjectData(SimpleSerializer.java:17)
    at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:489)
    at de.javakaffee.web.msm.serializer.kryo.FacesLRUMapRegistration$LRUMapSerializer.write(FacesLRUMapRegistration.java:87)
    at de.javakaffee.web.msm.serializer.kryo.FacesLRUMapRegistration$LRUMapSerializer.write(FacesLRUMapRegistration.java:45)
    at com.esotericsoftware.kryo.serialize.SimpleSerializer.writeObjectData(SimpleSerializer.java:17)
    at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:489)
    at com.esotericsoftware.kryo.serialize.MapSerializer.writeObjectData(MapSerializer.java:104)
    at de.javakaffee.kryoserializers.CopyForIterateMapSerializer.writeObjectData(CopyForIterateMapSerializer.java:56)
    at com.esotericsoftware.kryo.Serializer.writeObject(Serializer.java:43)
    at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:520)
    at com.esotericsoftware.kryo.ObjectBuffer.writeObject(ObjectBuffer.java:251)
    at de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.serializeAttributes(KryoTranscoder.java:303)
    at de.javakaffee.web.msm.TranscoderService.serializeAttributes(TranscoderService.java:155)
    at de.javakaffee.web.msm.BackupSessionTask.serializeAttributes(BackupSessionTask.java:176)
    at de.javakaffee.web.msm.BackupSessionTask.call(BackupSessionTask.java:110)
    at de.javakaffee.web.msm.BackupSessionTask.call(BackupSessionTask.java:51)
    at de.javakaffee.web.msm.BackupSessionService$SynchronousExecutorService.submit(BackupSessionService.java:346)
    ... 15 more

I am stuck on that. any help is really appreciated. 

Original issue reported on code.google.com by shahinur...@gmail.com on 26 May 2014 at 2:44

GoogleCodeExporter commented 8 years ago
Correction : 
Libs in tomcat : spymemcached-2.10.6.jar, 
memcached-session-manager-tc7-1.8.1.jar, memcached-session-manager-1.8.1.jar

Original comment by shahinur...@gmail.com on 26 May 2014 at 5:22

GoogleCodeExporter commented 8 years ago
Can you provide a sample project (e.g. on github) that allows to reproduce 
this? Alternatively show the classes that are serialized, or debug your 
application to see for which class the NPE is thrown in 
FieldSerializer.rebuildCachedFields.

Original comment by martin.grotzke on 15 Jun 2014 at 10:46