Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-835

@Resource UserTransaction error when file passivation store is selected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 11.0.0.Alpha1
    • 9.0.0.CR2
    • EJB
    • Hide
      • Jboss 7.1.1 Final started as standalone full.
      • EJB subsystem configuration:
      <subsystem xmlns="urn:jboss:domain:ejb3:1.2">
                  <session-bean>
                      <stateless>
                          <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
                      </stateless>
                      <stateful default-access-timeout="10000" cache-ref="passivating"/>
                      <singleton default-access-timeout="5000"/>
                  </session-bean>
                  <mdb>
                      <resource-adapter-ref resource-adapter-name="hornetq-ra"/>
                      <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
                  </mdb>
                  <pools>
                      <bean-instance-pools>
                          <strict-max-pool name="slsb-strict-max-pool" max-pool-size="50" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                          <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                      </bean-instance-pools>
                  </pools>
                  <caches>
                      <cache name="simple" aliases="NoPassivationCache"/>
                      <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>
                  </caches>
                  <passivation-stores>
                      <file-passivation-store name="file" idle-timeout="10" idle-timeout-unit="SECONDS"/>
                  </passivation-stores>
                  <async thread-pool-name="default"/>
                  <timer-service thread-pool-name="default">
                      <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
                  </timer-service>
                  <remote connector-ref="remoting-connector" thread-pool-name="default"/>
                  <thread-pools>
                      <thread-pool name="default">
                          <max-threads count="100"/>
                          <keepalive-time time="100" unit="milliseconds"/>
                      </thread-pool>
                  </thread-pools>
                  <iiop enable-by-default="false" use-qualified-name="false"/>
              </subsystem>
      
      • Create a statefull EJB with EntityManager injected as @PersistenceContext and UserTransaction injected as @Resource. Set the TransactionManagement as TransactionManagementType.BEAN

      10 seconds after the instantiation of the EJB, it will be passivated and this exception will be launched.

      Show
      Jboss 7.1.1 Final started as standalone full. EJB subsystem configuration: <subsystem xmlns= "urn:jboss:domain:ejb3:1.2" > <session-bean> <stateless> <bean-instance-pool-ref pool-name= "slsb-strict-max-pool" /> </stateless> <stateful default-access-timeout= "10000" cache-ref= "passivating" /> <singleton default-access-timeout= "5000" /> </session-bean> <mdb> <resource-adapter-ref resource-adapter-name= "hornetq-ra" /> <bean-instance-pool-ref pool-name= "mdb-strict-max-pool" /> </mdb> <pools> <bean-instance-pools> <strict-max-pool name= "slsb-strict-max-pool" max-pool-size= "50" instance-acquisition-timeout= "5" instance-acquisition-timeout-unit= "MINUTES" /> <strict-max-pool name= "mdb-strict-max-pool" max-pool-size= "20" instance-acquisition-timeout= "5" instance-acquisition-timeout-unit= "MINUTES" /> </bean-instance-pools> </pools> <caches> <cache name= "simple" aliases= "NoPassivationCache" /> <cache name= "passivating" passivation-store-ref= "file" aliases= "SimpleStatefulCache" /> </caches> <passivation-stores> <file-passivation-store name= "file" idle-timeout= "10" idle-timeout-unit= "SECONDS" /> </passivation-stores> <async thread-pool-name= "default" /> <timer-service thread-pool-name= "default" > <data-store path= "timer-service-data" relative-to= "jboss.server.data.dir" /> </timer-service> <remote connector-ref= "remoting-connector" thread-pool-name= "default" /> <thread-pools> <thread-pool name= "default" > <max-threads count= "100" /> <keepalive-time time= "100" unit= "milliseconds" /> </thread-pool> </thread-pools> <iiop enable-by-default= "false" use-qualified-name= "false" /> </subsystem> Create a statefull EJB with EntityManager injected as @PersistenceContext and UserTransaction injected as @Resource. Set the TransactionManagement as TransactionManagementType.BEAN 10 seconds after the instantiation of the EJB, it will be passivated and this exception will be launched.

      The following exception is launched when the server tries to passivate into the file passivation storage a stateful EJB session with UserTransaction injected as a resource:

      [org.jboss.as.ejb3.cache.spi.impl.PassivateTask] (pool-10-thread-1) JBAS014538: Failed to passivate {[-36, 0, 14, -43, 72, 10, 76, -28, -105, -108, 24, 45, -70, -58, -48, -107]}: java.lang.RuntimeException: JBAS014538: Failed to passivate {[-36, 0, 14, -43, 72, 10, 76, -28, -105, -108, 24, 45, -70, -58, -48, -107]}
      	at org.jboss.as.ejb3.cache.spi.impl.FilePersistentObjectStore.store(FilePersistentObjectStore.java:248) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
      	at org.jboss.as.ejb3.cache.spi.impl.FilePersistentObjectStore.store(FilePersistentObjectStore.java:52) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
      	at org.jboss.as.ejb3.cache.impl.backing.SimpleBackingCacheEntryStore.passivate(SimpleBackingCacheEntryStore.java:155) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
      	at org.jboss.as.ejb3.cache.impl.backing.SerializationGroupMemberContainer.passivate(SerializationGroupMemberContainer.java:288) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
      	at org.jboss.as.ejb3.cache.impl.backing.SerializationGroupMemberContainer.passivate(SerializationGroupMemberContainer.java:50) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
      	at org.jboss.as.ejb3.cache.impl.backing.PassivatingBackingCacheImpl.passivate(PassivatingBackingCacheImpl.java:190) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
      	at org.jboss.as.ejb3.cache.impl.backing.PassivatingBackingCacheImpl.passivate(PassivatingBackingCacheImpl.java:60) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
      	at org.jboss.as.ejb3.cache.spi.impl.PassivateTask.run(PassivateTask.java:45) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_13]
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_13]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_13]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [rt.jar:1.7.0_13]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [rt.jar:1.7.0_13]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
      	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
      Caused by: java.io.NotSerializableException: org.jboss.tm.usertx.client.ServerVMClientUserTransaction
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:891)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1063)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:885)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1063)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:885)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1063)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1019)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:885)
      	at org.jboss.marshalling.river.BlockMarshaller.doWriteObject(BlockMarshaller.java:69)
      	at org.jboss.marshalling.river.BlockMarshaller.writeObject(BlockMarshaller.java:60)
      	at org.jboss.marshalling.MarshallerObjectOutputStream.writeObjectOverride(MarshallerObjectOutputStream.java:54)
      	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342) [rt.jar:1.7.0_13]
      	at org.jboss.as.ejb3.cache.impl.backing.SerializationGroupMemberImpl.writeObject(SerializationGroupMemberImpl.java:368) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_13]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_13]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_13]
      	at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_13]
      	at org.jboss.marshalling.reflect.SerializableClass.callWriteObject(SerializableClass.java:175)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:1007)
      	at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:885)
      	at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:62)
      	at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:119)
      	at org.jboss.as.ejb3.cache.spi.impl.FilePersistentObjectStore.store(FilePersistentObjectStore.java:239) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
      	... 15 more
      Caused by: an exception which occurred:
      	in field userTransaction
      	in field instance
      	in field instance
      	in object org.jboss.as.ejb3.cache.impl.backing.SerializationGroupMemberImpl@6a4de0c9
      

      The EJB subsystem configuration is:

      <subsystem xmlns="urn:jboss:domain:ejb3:1.2">
                  <session-bean>
                      <stateless>
                          <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
                      </stateless>
                      <stateful default-access-timeout="10000" cache-ref="passivating"/>
                      <singleton default-access-timeout="5000"/>
                  </session-bean>
                  <mdb>
                      <resource-adapter-ref resource-adapter-name="hornetq-ra"/>
                      <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
                  </mdb>
                  <pools>
                      <bean-instance-pools>
                          <strict-max-pool name="slsb-strict-max-pool" max-pool-size="50" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                          <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                      </bean-instance-pools>
                  </pools>
                  <caches>
                      <cache name="simple" aliases="NoPassivationCache"/>
                      <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>
                  </caches>
                  <passivation-stores>
                      <file-passivation-store name="file" idle-timeout="10" idle-timeout-unit="SECONDS"/>
                  </passivation-stores>
                  <async thread-pool-name="default"/>
                  <timer-service thread-pool-name="default">
                      <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
                  </timer-service>
                  <remote connector-ref="remoting-connector" thread-pool-name="default"/>
                  <thread-pools>
                      <thread-pool name="default">
                          <max-threads count="100"/>
                          <keepalive-time time="100" unit="milliseconds"/>
                      </thread-pool>
                  </thread-pools>
                  <iiop enable-by-default="false" use-qualified-name="false"/>
              </subsystem>
      

              rhn-engineering-mmusgrov Michael Musgrove
              abraham.cabanillas Abraham Cabanillas Piera (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: