1 Reply Latest reply on Jul 19, 2011 9:45 AM by Massimo Romano

    Seam Clustering Identity Error

    Massimo Romano Newbie

      Hi all.
      I'm having some problem using Seam 2 in a clustered environment.
      Anytime I log in into the application or I move from one view to another I receive the following error:




      2011-07-19 13:59:49,234 WARN  [org.jboss.web.tomcat.service.session.InstantSnapshotManager./avic] (http-localhost%2F127.0.0.1-8180-1) Failed to replicate session TmgMae8VJBgCtnX-BWs3wg__
      org.jboss.seam.RequiredException: @In attribute requires non-null value: topTrustList.identity
              at org.jboss.seam.Component.getValueToInject(Component.java:2335)
              at org.jboss.seam.Component.injectAttributes(Component.java:1736)
              at org.jboss.seam.Component.inject(Component.java:1554)
              at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.persistence.ManagedEntityInterceptor.aroundInvoke(ManagedEntityInterceptor.java:48)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:97)
              at org.jboss.seam.util.Work.workInTransaction(Work.java:47)
              at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:91)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:118)
              at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
              at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
              at it.retis.avic.session.trust.TopTrustList_$$_javassist_seam_38.hashCode(TopTrustList_$$_javassist_seam_38.java)
              at java.util.HashMap$Entry.hashCode(HashMap.java:764)
              at java.util.AbstractMap.hashCode(AbstractMap.java:557)
              at org.jboss.ha.framework.server.SimpleCachableMarshalledValue.<init>(SimpleCachableMarshalledValue.java:74)
              at org.jboss.ha.framework.server.SimpleCachableMarshalledValue.<init>(SimpleCachableMarshalledValue.java:80)
              at org.jboss.web.tomcat.service.session.distributedcache.spi.SessionSerializationFactory.createMarshalledValue(SessionSerializationFactory.java:74)
              at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.AbstractJBossCacheService.getMarshalledValue(AbstractJBossCacheService.java:635)
              at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.SessionBasedJBossCacheService.storeSessionAttributes(SessionBasedJBossCacheService.java:124)
              at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.SessionBasedJBossCacheService.storeSessionAttributes(SessionBasedJBossCacheService.java:37)
              at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.AbstractJBossCacheService.storeSessionData(AbstractJBossCacheService.java:403)
              at org.jboss.web.tomcat.service.session.ClusteredSession.processSessionReplication(ClusteredSession.java:1166)
              at org.jboss.web.tomcat.service.session.JBossCacheManager.processSessionRepl(JBossCacheManager.java:1937)
              at org.jboss.web.tomcat.service.session.JBossCacheManager.storeSession(JBossCacheManager.java:309)
              at org.jboss.web.tomcat.service.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:51)
              at org.jboss.web.tomcat.service.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:147)
              at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:94)
              at org.jboss.web.tomcat.service.session.LockingValve.invoke(LockingValve.java:62)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              at java.lang.Thread.run(Thread.java:595)
      
      Consider I have rewritten the Identity component:






      @SuppressWarnings("serial")
      @Name("org.jboss.seam.security.identity")  
      @Scope(ScopeType.SESSION)  
      @Install(precedence = Install.APPLICATION)  
      @BypassInterceptors  
      @Startup  
      public class AvicIdentity extends Identity implements Serializable
      {
      ...
      }





      Anywai in any component having @In AvicIdentity identity; I receive the error even if the application works correctly.

        • 1. Re: Seam Clustering Identity Error
          Massimo Romano Newbie

          Problem solved.
          As mentioned in the manual:





          ... any component marked with @BypassInterceptors cannot use features such as bijection, annotated security restrictions, or synchronization ...



          So I used the code:




          // Inline code to lookup component instead of using @In
          AvicIdentity identity = (AvicIdentity) Component.getInstance("org.jboss.seam.security.identity");