0 Replies Latest reply on May 19, 2011 11:34 AM by Thomas Andraschko

    Seam 3 in clustered environment?

    Thomas Andraschko Newbie

      Hi,


      i tried to get my webapp running in a clustered environment but AFAICS it is not possible because some transaction stuff is put into the session wich ich not serializable.


      Stacktrace:



      WARNING: Cannot serialize session attribute org.jboss.weld.context.http.HttpSessionContext#org.jboss.weld.bean-flat-ManagedBean-TestController[@javax.enterprise.context.SessionScoped()@javax.inject.Named(value=)]{TestController.userDao[@javax.inject.Inject()];TestController.newUser[@org.jboss.seam.transaction.Transactional(value=REQUIRED)@org.jboss.seam.transaction.TransactionalInterceptorBinding()]();TestController.post[@javax.annotation.PostConstruct()]();} for session 488BDFEE2194D758C7B76C6E60E6BD5E-n2
      java.io.NotSerializableException: org.jboss.seam.transaction.TransactionExtension
              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
              at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
              at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
              at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
              at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
              at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
              at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
              at java.util.ArrayList.writeObject(ArrayList.java:570)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
              at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
              at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
              at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
              at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:422)
              at java.util.Collections$SynchronizedCollection.writeObject(Collections.java:1602)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
              at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
              at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
              at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
              at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
              at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
              at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
              at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
              at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
              at de.javakaffee.web.msm.JavaSerializationTranscoder.writeAttributes(JavaSerializationTranscoder.java:143)
              at de.javakaffee.web.msm.JavaSerializationTranscoder.serializeAttributes(JavaSerializationTranscoder.java:106)
              at de.javakaffee.web.msm.TranscoderService.serializeAttributes(TranscoderService.java:138)
              at de.javakaffee.web.msm.BackupSessionTask.serializeAttributes(BackupSessionTask.java:177)
              at de.javakaffee.web.msm.BackupSessionTask.call(BackupSessionTask.java:111)
              at de.javakaffee.web.msm.BackupSessionTask.call(BackupSessionTask.java:48)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
              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)





      Any ideas? Why it is stored in the session and it is possible to make it serializable?


      My setup:
      Tomcat 7.0.14 and memcached-session-manager
      Myfaces 2.0.5
      Weld 1.1.2-SNAPSHOT
      Seam Faces, Persistence and XML Config
      Hibernate 3.6.4


      Thanks and best regards