tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [tomcat] mlem commented on issue #154: Don't serialize the whole valve into session, but use a smaller object.
Date Mon, 08 Apr 2019 13:56:41 GMT
mlem commented on issue #154: Don't serialize the whole valve into session, but use a smaller
object.
URL: https://github.com/apache/tomcat/pull/154#issuecomment-480842434
 
 
   We are getting this message in our log all the time.
   I've found out, that our serialization library (Kryo) is serializing your valve into the
session and is causing troubles with OpenJDK 11, because it wants to access a private field
of the class loader
   
   ```
   28-Mar-2019 11:30:11.530 WARNING [msm-storage-thread-15] de.javakaffee.web.msm.BackupSessionTask.call
FAILED for session id AF378F36B5D8310F0CF5B1800B89364B
    de.javakaffee.web.msm.TranscoderDeserializationException: com.esotericsoftware.kryo.KryoException:
java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.List
java.lang.module.Configuration.parents accessible: module java.base does not "opens java.lang.module"
to unnamed module @4eba42b8
   Serialization trace:
   cf (java.lang.ModuleLayer)
   classLoaderValueMap (jdk.internal.loader.ClassLoaders$AppClassLoader)
   classloader (java.security.ProtectionDomain)
   context (java.security.AccessControlContext)
   acc (java.net.URLClassLoader)
   classloader (java.security.ProtectionDomain)
   context (java.security.AccessControlContext)
   acc (org.apache.catalina.loader.ParallelWebappClassLoader)
   classLoaderLoggers (org.apache.juli.ClassLoaderLogManager)
   manager (org.apache.juli.AsyncFileHandler)
   handlers (java.util.logging.Logger$ConfigurationData)
   config (java.util.logging.Logger)
   logger (org.apache.juli.logging.DirectJDKLog)
   containerLog (org.apache.catalina.valves.AccessLogValve)
   logs (org.apache.catalina.core.AccessLogAdapter)
   accessLog (org.apache.catalina.core.StandardHost)
   container (org.apache.catalina.valves.CrawlerSessionManagerValve)
   	at de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.serializeAttributes(KryoTranscoder.java:240)
   	at de.javakaffee.web.msm.TranscoderService.serializeAttributes(TranscoderService.java:151)
   	at de.javakaffee.web.msm.BackupSessionTask.serializeAttributes(BackupSessionTask.java:179)
   	at de.javakaffee.web.msm.BackupSessionTask.call(BackupSessionTask.java:109)
   	at de.javakaffee.web.msm.BackupSessionTask.call(BackupSessionTask.java:50)
   	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   	at java.base/java.lang.Thread.run(Thread.java:834)
   Caused by: com.esotericsoftware.kryo.KryoException: java.lang.reflect.InaccessibleObjectException:
Unable to make field private final java.util.List java.lang.module.Configuration.parents accessible:
module java.base does not "opens java.lang.module" to unnamed module @4eba42b8
   Serialization trace:
   cf (java.lang.ModuleLayer)
   classLoaderValueMap (jdk.internal.loader.ClassLoaders$AppClassLoader)
   classloader (java.security.ProtectionDomain)
   context (java.security.AccessControlContext)
   acc (java.net.URLClassLoader)
   classloader (java.security.ProtectionDomain)
   context (java.security.AccessControlContext)
   acc (org.apache.catalina.loader.ParallelWebappClassLoader)
   classLoaderLoggers (org.apache.juli.ClassLoaderLogManager)
   manager (org.apache.juli.AsyncFileHandler)
   handlers (java.util.logging.Logger$ConfigurationData)
   config (java.util.logging.Logger)
   logger (org.apache.juli.logging.DirectJDKLog)
   containerLog (org.apache.catalina.valves.AccessLogValve)
   logs (org.apache.catalina.core.AccessLogAdapter)
   accessLog (org.apache.catalina.core.StandardHost)
   container (org.apache.catalina.valves.CrawlerSessionManagerValve)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:101)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:651)
   	at com.esotericsoftware.kryo.serializers.CollectionSerializer.write(CollectionSerializer.java:100)
   	at com.esotericsoftware.kryo.serializers.CollectionSerializer.write(CollectionSerializer.java:40)
   	at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:651)
   	at com.esotericsoftware.kryo.serializers.MapSerializer.write(MapSerializer.java:113)
   	at com.esotericsoftware.kryo.serializers.MapSerializer.write(MapSerializer.java:39)
   	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:575)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:79)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:575)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:79)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:651)
   	at com.esotericsoftware.kryo.serializers.DefaultArraySerializers$ObjectArraySerializer.write(DefaultArraySerializers.java:361)
   	at com.esotericsoftware.kryo.serializers.DefaultArraySerializers$ObjectArraySerializer.write(DefaultArraySerializers.java:302)
   	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:575)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:79)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeObjectOrNull(Kryo.java:629)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:86)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:575)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:79)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:651)
   	at com.esotericsoftware.kryo.serializers.DefaultArraySerializers$ObjectArraySerializer.write(DefaultArraySerializers.java:361)
   	at com.esotericsoftware.kryo.serializers.DefaultArraySerializers$ObjectArraySerializer.write(DefaultArraySerializers.java:302)
   	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:575)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:79)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeObjectOrNull(Kryo.java:629)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:86)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:651)
   	at com.esotericsoftware.kryo.serializers.MapSerializer.write(MapSerializer.java:106)
   	at com.esotericsoftware.kryo.serializers.MapSerializer.write(MapSerializer.java:39)
   	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:575)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:79)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:575)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:79)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:651)
   	at com.esotericsoftware.kryo.serializers.CollectionSerializer.write(CollectionSerializer.java:100)
   	at com.esotericsoftware.kryo.serializers.CollectionSerializer.write(CollectionSerializer.java:40)
   	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:575)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:79)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeObjectOrNull(Kryo.java:629)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:86)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:575)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:79)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:575)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:79)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:651)
   	at com.esotericsoftware.kryo.serializers.DefaultArraySerializers$ObjectArraySerializer.write(DefaultArraySerializers.java:361)
   	at com.esotericsoftware.kryo.serializers.DefaultArraySerializers$ObjectArraySerializer.write(DefaultArraySerializers.java:302)
   	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:575)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:79)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:575)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:79)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:575)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:79)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:508)
   	at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:651)
   	at com.esotericsoftware.kryo.serializers.MapSerializer.write(MapSerializer.java:113)
   	at com.esotericsoftware.kryo.serializers.MapSerializer.write(MapSerializer.java:39)
   	at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:557)
   	at de.javakaffee.web.msm.serializer.kryo.KryoTranscoder.serializeAttributes(KryoTranscoder.java:237)
   	... 8 more
   Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private
final java.util.List java.lang.module.Configuration.parents accessible: module java.base does
not "opens java.lang.module" to unnamed module @4eba42b8
   	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:340)
   	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:280)
   	at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:176)
   	at java.base/java.lang.reflect.Field.setAccessible(Field.java:170)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.buildValidFields(FieldSerializer.java:283)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.rebuildCachedFields(FieldSerializer.java:216)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.rebuildCachedFields(FieldSerializer.java:157)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.<init>(FieldSerializer.java:150)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.<init>(FieldSerializer.java:134)
   	at com.esotericsoftware.kryo.serializers.FieldSerializer.<init>(FieldSerializer.java:130)
   	at de.javakaffee.web.msm.serializer.kryo.DefaultFieldSerializerFactory.newDefaultSerializer(DefaultFieldSerializerFactory.java:34)
   	at de.javakaffee.web.msm.serializer.kryo.KryoDefaultSerializerFactory$SerializerFactoryAdapter.makeSerializer(KryoDefaultSerializerFactory.java:45)
   	at com.esotericsoftware.kryo.Kryo.newDefaultSerializer(Kryo.java:396)
   	at com.esotericsoftware.kryo.Kryo.getDefaultSerializer(Kryo.java:380)
   	at de.javakaffee.web.msm.serializer.kryo.KryoTranscoder$2.getDefaultSerializer(KryoTranscoder.java:168)
   	at com.esotericsoftware.kryo.util.DefaultClassResolver.registerImplicit(DefaultClassResolver.java:74)
   	at com.esotericsoftware.kryo.Kryo.getRegistration(Kryo.java:508)
   	at com.esotericsoftware.kryo.Kryo.getSerializer(Kryo.java:528)
   	at com.esotericsoftware.kryo.serializers.ObjectField.write(ObjectField.java:82)
   	... 83 more
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message