Uploaded image for project: 'JBoss Marshalling'
  1. JBoss Marshalling
  2. JBMAR-236

Java SE 15+ incompatibility from using Unsafe.objectFieldOffset for hidden classes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.0.12.Final
    • None
    • None
    • Undefined

      SE 15 brings in https://openjdk.java.net/jeps/371, which introduces the notion of 'hidden' classes. It seems that for such classes, calling Unsafe.objectFieldOffset will (deliberately) fail.

      This is problematic for JBoss Marshalling as SerializableField relies on making that call. So if any class that is hidden is marshalled, that will likely fail.

      This is resulting in a couple failures in my work with getting WildFly Preview to run much of its TS with SE 15.

      See https://ci.wildfly.org/viewLog.html?buildId=254549&tab=buildResultsDiv&buildTypeId=WF_Ee9LinuxJdk15

      For example StatefulWithXPCFailoverTestCase fails. The interesting part of the server log is:

      &amp#27;[0m&amp#27;[33m18:46:37,026 WARN  [org.infinispan.PERSISTENCE] (non-blocking-thread--p31-t8) ISPN000559: Cannot marshall 'class org.infinispan.marshall.protostream.impl.MarshallableUserObject': java.lang.UnsupportedOperationException: can't get field offset on a hidden class: private final org.hibernate.Interceptor org.hibernate.internal.AbstractSharedSessionContract$$Lambda$2279/0x000000080200aa28.arg$1
      	at jdk.unsupported/sun.misc.Unsafe.objectFieldOffset(Unsafe.java:646)
      	at org.jboss.marshalling@2.0.11.Final//org.jboss.marshalling.reflect.SerializableField.<init>(SerializableField.java:58)
      	at org.jboss.marshalling@2.0.11.Final//org.jboss.marshalling.reflect.SerializableClass.getSerializableFields(SerializableClass.java:121)
      	at org.jboss.marshalling@2.0.11.Final//org.jboss.marshalling.reflect.SerializableClass.<init>(SerializableClass.java:88)
      	at org.jboss.marshalling@2.0.11.Final//org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:62)
      	at org.jboss.marshalling@2.0.11.Final//org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:59)
      	at java.base/java.lang.ClassValue.getFromHashMap(ClassValue.java:226)
      	at java.base/java.lang.ClassValue.getFromBackup(ClassValue.java:208)
      	at java.base/java.lang.ClassValue.get(ClassValue.java:114)
      	at org.jboss.marshalling@2.0.11.Final//org.jboss.marshalling.reflect.SerializableClassRegistry.lookup(SerializableClassRegistry.java:83)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:180)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:65)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:56)
      	at org.jboss.marshalling@2.0.11.Final//org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:50)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverObjectOutputStream.writeObjectOverride(RiverObjectOutputStream.java:179)
      	at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:349)
      	at org.hibernate@5.3.20.Final//org.hibernate.internal.AbstractSharedSessionContract.writeObject(AbstractSharedSessionContract.java:1122)
      	at org.jboss.marshalling@2.0.11.Final//org.jboss.marshalling.reflect.JDKSpecific$SerMethods.callWriteObject(JDKSpecific.java:89)
      	at org.jboss.marshalling@2.0.11.Final//org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:193)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1089)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1080)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1143)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1101)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:268)
      	at org.jboss.marshalling@2.0.11.Final//org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:58)
      	at org.jboss.marshalling@2.0.11.Final//org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:111)
      	at org.wildfly.clustering.marshalling.spi@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.spi.util.MapExternalizer.writeObject(MapExternalizer.java:63)
      	at org.wildfly.clustering.marshalling.spi@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.spi.util.MapExternalizer.writeObject(MapExternalizer.java:40)
      	at org.wildfly.clustering.marshalling.spi@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.spi.ExternalizerProvider.writeObject(ExternalizerProvider.java:41)
      	at org.wildfly.clustering.marshalling.jboss@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.jboss.ExternalizerObjectTable$ExternalizerWriter.writeObject(ExternalizerObjectTable.java:142)
      	at org.jboss.marshalling.river@2.0.11.Final//org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:141)
      	at org.jboss.marshalling@2.0.11.Final//org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:58)
      	at org.jboss.marshalling@2.0.11.Final//org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:111)
      	at org.wildfly.clustering.marshalling.jboss@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.jboss.JBossByteBufferMarshaller.writeTo(JBossByteBufferMarshaller.java:92)
      	at org.wildfly.clustering.marshalling.spi@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.spi.ByteBufferMarshaller.write(ByteBufferMarshaller.java:55)
      	at org.wildfly.clustering.marshalling.spi@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.spi.ByteBufferMarshalledValue.getBuffer(ByteBufferMarshalledValue.java:68)
      	at org.wildfly.clustering.marshalling.protostream@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.protostream.FunctionalScalarMarshaller.size(FunctionalScalarMarshaller.java:183)
      	at org.wildfly.clustering.marshalling.protostream@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.protostream.FunctionalMarshaller.size(FunctionalMarshaller.java:79)
      	at org.wildfly.clustering.marshalling.protostream@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.protostream.SizeComputingProtoStreamWriter.writeObjectNoTag(SizeComputingProtoStreamWriter.java:231)
      	at org.wildfly.clustering.marshalling.protostream@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.protostream.SizeComputingProtoStreamWriter.writeObject(SizeComputingProtoStreamWriter.java:222)
      	at org.wildfly.clustering.marshalling.protostream@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.protostream.TypedObjectMarshaller.writeTo(TypedObjectMarshaller.java:61)
      	at org.wildfly.clustering.marshalling.protostream@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.protostream.AnyMarshaller.writeTo(AnyMarshaller.java:75)
      	at org.wildfly.clustering.marshalling.protostream@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.protostream.AnyMarshaller.writeTo(AnyMarshaller.java:36)
      	at org.wildfly.clustering.marshalling.protostream@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.protostream.Marshallable.size(Marshallable.java:62)
      	at org.wildfly.clustering.marshalling.protostream@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.protostream.SizeComputingProtoStreamWriter.writeObjectNoTag(SizeComputingProtoStreamWriter.java:231)
      	at org.wildfly.clustering.marshalling.protostream@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.marshalling.protostream.ProtoStreamByteBufferMarshaller.size(ProtoStreamByteBufferMarshaller.java:51)
      	at org.wildfly.clustering.infinispan.marshalling@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.infinispan.marshalling.protostream.ProtoStreamMarshaller.sizeEstimate(ProtoStreamMarshaller.java:57)
      	at org.wildfly.clustering.infinispan.marshalling@24.0.0.Beta1-SNAPSHOT//org.wildfly.clustering.infinispan.marshalling.AbstractMarshaller.objectToByteBuffer(AbstractMarshaller.java:75)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.protostream.impl.MarshallableUserObject$Marshaller.writeTo(MarshallableUserObject.java:149)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.protostream.impl.MarshallableUserObject$Marshaller.writeTo(MarshallableUserObject.java:102)
      	at org.infinispan.protostream@4.3.5.Final//org.infinispan.protostream.impl.RawProtobufMarshallerDelegate.marshall(RawProtobufMarshallerDelegate.java:32)
      	at org.infinispan.protostream@4.3.5.Final//org.infinispan.protostream.WrappedMessage.writeMessage(WrappedMessage.java:257)
      	at org.infinispan.protostream@4.3.5.Final//org.infinispan.protostream.ProtobufUtil.toWrappedStream(ProtobufUtil.java:195)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.persistence.impl.PersistenceMarshallerImpl.objectToByteBuffer(PersistenceMarshallerImpl.java:133)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.persistence.impl.PersistenceMarshallerImpl.objectToByteBuffer(PersistenceMarshallerImpl.java:145)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeRawUnknown(GlobalMarshaller.java:638)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeUnknown(GlobalMarshaller.java:627)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeUnknown(GlobalMarshaller.java:618)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeNonNullableObject(GlobalMarshaller.java:384)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeNullableObject(GlobalMarshaller.java:352)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.BytesObjectOutput.writeObject(BytesObjectOutput.java:26)
      	at org.infinispan@11.0.10.Final//org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.writeObject(ImmortalCacheEntry.java:101)
      	at org.infinispan@11.0.10.Final//org.infinispan.container.entries.ImmortalCacheEntry$Externalizer.writeObject(ImmortalCacheEntry.java:97)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeInternal(GlobalMarshaller.java:656)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeNonNullableObject(GlobalMarshaller.java:371)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeNullableObject(GlobalMarshaller.java:352)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.BytesObjectOutput.writeObject(BytesObjectOutput.java:26)
      	at org.infinispan.commons@11.0.10.Final//org.infinispan.commons.marshall.MarshallUtil.marshallCollection(MarshallUtil.java:252)
      	at org.infinispan.commons@11.0.10.Final//org.infinispan.commons.marshall.MarshallUtil.marshallCollection(MarshallUtil.java:230)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.exts.CollectionExternalizer.writeObject(CollectionExternalizer.java:76)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.exts.CollectionExternalizer.writeObject(CollectionExternalizer.java:28)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeInternal(GlobalMarshaller.java:656)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeNonNullableObject(GlobalMarshaller.java:371)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeNullableObject(GlobalMarshaller.java:352)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.BytesObjectOutput.writeObject(BytesObjectOutput.java:26)
      	at org.infinispan@11.0.10.Final//org.infinispan.statetransfer.StateChunk$Externalizer.writeObject(StateChunk.java:80)
      	at org.infinispan@11.0.10.Final//org.infinispan.statetransfer.StateChunk$Externalizer.writeObject(StateChunk.java:65)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeInternal(GlobalMarshaller.java:656)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeNonNullableObject(GlobalMarshaller.java:371)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeNullableObject(GlobalMarshaller.java:352)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.BytesObjectOutput.writeObject(BytesObjectOutput.java:26)
      	at org.infinispan.commons@11.0.10.Final//org.infinispan.commons.marshall.MarshallUtil.marshallCollection(MarshallUtil.java:252)
      	at org.infinispan.commons@11.0.10.Final//org.infinispan.commons.marshall.MarshallUtil.marshallCollection(MarshallUtil.java:230)
      	at org.infinispan@11.0.10.Final//org.infinispan.commands.statetransfer.StateResponseCommand.writeTo(StateResponseCommand.java:118)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.exts.ReplicableCommandExternalizer.writeCommandParameters(ReplicableCommandExternalizer.java:81)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.exts.CacheRpcCommandExternalizer.marshallParameters(CacheRpcCommandExternalizer.java:142)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.exts.CacheRpcCommandExternalizer.writeObject(CacheRpcCommandExternalizer.java:138)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.exts.CacheRpcCommandExternalizer.writeObject(CacheRpcCommandExternalizer.java:81)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeInternal(GlobalMarshaller.java:656)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeNonNullableObject(GlobalMarshaller.java:371)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeNullableObject(GlobalMarshaller.java:352)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeObjectOutput(GlobalMarshaller.java:181)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.writeObjectOutput(GlobalMarshaller.java:174)
      	at org.infinispan@11.0.10.Final//org.infinispan.marshall.core.GlobalMarshaller.objectToBuffer(GlobalMarshaller.java:302)
      	at org.infinispan@11.0.10.Final//org.infinispan.remoting.transport.jgroups.JGroupsTransport.marshallRequest(JGroupsTransport.java:1061)
      	at org.infinispan@11.0.10.Final//org.infinispan.remoting.transport.jgroups.JGroupsTransport.sendCommand(JGroupsTransport.java:1049)
      	at org.infinispan@11.0.10.Final//org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeCommand(JGroupsTransport.java:886)
      	at org.infinispan@11.0.10.Final//org.infinispan.remoting.rpc.RpcManagerImpl.invokeCommand(RpcManagerImpl.java:146)
      	at org.infinispan@11.0.10.Final//org.infinispan.statetransfer.OutboundTransferTask.sendEntries(OutboundTransferTask.java:213)
      	at org.infinispan@11.0.10.Final//org.infinispan.statetransfer.OutboundTransferTask.access$000(OutboundTransferTask.java:46)
      	at org.infinispan@11.0.10.Final//org.infinispan.statetransfer.OutboundTransferTask$1.onComplete(OutboundTransferTask.java:157)
      	at io.reactivex.rxjava3.rxjava//io.reactivex.rxjava3.internal.util.AtomicThrowable.tryTerminateConsumer(AtomicThrowable.java:154)
      	at io.reactivex.rxjava3.rxjava//io.reactivex.rxjava3.internal.operators.mixed.FlowableConcatMapCompletable$ConcatMapCompletableObserver.drain(FlowableConcatMapCompletable.java:208)
      	at io.reactivex.rxjava3.rxjava//io.reactivex.rxjava3.internal.operators.mixed.FlowableConcatMapCompletable$ConcatMapCompletableObserver.onComplete(FlowableConcatMapCompletable.java:143)
      	at io.reactivex.rxjava3.rxjava//io.reactivex.rxjava3.internal.operators.flowable.FlowableTakeUntilPredicate$InnerSubscriber.onComplete(FlowableTakeUntilPredicate.java:89)
      	at io.reactivex.rxjava3.rxjava//io.reactivex.rxjava3.internal.operators.flowable.FlowableBuffer$PublisherBufferExactSubscriber.onComplete(FlowableBuffer.java:154)
      	at io.reactivex.rxjava3.rxjava//io.reactivex.rxjava3.internal.operators.flowable.FlowableConcatArray$ConcatArraySubscriber.onComplete(FlowableConcatArray.java:112)
      	at io.reactivex.rxjava3.rxjava//io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.onComplete(BasicFuseableSubscriber.java:120)
      	at io.reactivex.rxjava3.rxjava//io.reactivex.rxjava3.internal.operators.flowable.FlowableUsing$UsingSubscriber.onComplete(FlowableUsing.java:144)
      	at io.reactivex.rxjava3.rxjava//io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.checkTerminated(FlowableObserveOn.java:215)
      	at io.reactivex.rxjava3.rxjava//io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync(FlowableObserveOn.java:394)
      	at io.reactivex.rxjava3.rxjava//io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:176)
      	at io.reactivex.rxjava3.rxjava//io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler$ExecutorWorker$BooleanRunnable.run(ExecutorScheduler.java:322)
      	at io.reactivex.rxjava3.rxjava//io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler$ExecutorWorker.runEager(ExecutorScheduler.java:287)
      	at io.reactivex.rxjava3.rxjava//io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler$ExecutorWorker.run(ExecutorScheduler.java:248)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
      	at org.jboss.as.clustering.common@24.0.0.Beta1-SNAPSHOT//org.jboss.as.clustering.context.ContextReferenceExecutor.execute(ContextReferenceExecutor.java:49)
      	at org.jboss.as.clustering.common@24.0.0.Beta1-SNAPSHOT//org.jboss.as.clustering.context.ContextualExecutor$1.run(ContextualExecutor.java:70)
      	at java.base/java.lang.Thread.run(Thread.java:832)
      Caused by: an exception which occurred:
      	in field org.jboss.as.jpa.container.ExtendedEntityManager.underlyingEntityManager
      	in object org.jboss.as.jpa.container.ExtendedEntityManager@af400458
      	in field org.jboss.as.test.clustering.cluster.ejb.xpc.bean.StatefulBean.em
      	in object org.jboss.as.test.clustering.cluster.ejb.xpc.bean.StatefulBean@2ee87655
      	in field org.jboss.as.weld.injection.WeldManagedReferenceFactory$WeldManagedReference.instance
      	in object org.jboss.as.weld.injection.WeldManagedReferenceFactory$WeldManagedReference@3f2429bb
      	in field org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent.instance
      	in object org.jboss.as.ejb3.component.stateful.SerializedStatefulSessionComponent@433a12f8
      	in object org.jboss.as.ejb3.component.stateful.StatefulSessionComponentInstance@25e1eab8
      	in object java.util.concurrent.ConcurrentHashMap@2d2153aa
      

      I believe the issue here is the classes behind some lambdas are being generated as hidden classes with SE 15. Specifically, I think this from org.hibernate.internal.AbstractSharedSessionContract is the issue:

      	private StatementInspector interpret(StatementInspector statementInspector) {
      		if ( statementInspector == null ) {
      			// If there is no StatementInspector specified, map to the call
      			//		to the (deprecated) Interceptor #onPrepareStatement method
      			return (StatementInspector) interceptor::onPrepareStatement;
      		}
      		return statementInspector;
      

      I believe that because the stack trace includes this line:

      at org.hibernate@5.3.20.Final//org.hibernate.internal.AbstractSharedSessionContract.writeObject(AbstractSharedSessionContract.java:1122)

      which is this:

      oos.writeObject( jdbcSessionContext.getStatementInspector() );

      The other StatementInspector impls are normal anonymous inner classes so I don't expect they'd be hidden classes.

              dlloyd@redhat.com David Lloyd
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: