6 Replies Latest reply on Jan 13, 2010 3:18 PM by luke biddell

    Drools deserialization exception in cluster

    First Last Newbie

      Dear all,


      I have a cluster with 2 nodes setup for development purposes, replicating SFSB and http sessions across the 2 nodes. Things working fine until I start using drools security rules as defined in components.xml and the corresponding security.drl files, ClassCastException was thrown when I try fail-over between nodes in the cluster. I have upgraded drool to 4.0.7. I have searched the forum, but couldn't locate any posts with similar problem. What have I done wrong?


      Thank you.


      ERROR [JBossCacheService] loadSession(): id: OfXkgZkg+AxsAeu7Vv0BnQ** exception occurred during deserialization
      java.lang.ClassCastException: org.jboss.invocation.MarshalledValueInputStream
           at org.drools.reteoo.Rete$ClassObjectTypeConf.readObject(Rete.java:605)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
           at java.io.ObjectInputStream.readSerialData(Unknown Source)
           at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
           at java.io.ObjectInputStream.readSerialData(Unknown Source)
           at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.readArray(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.readObject(Unknown Source)
           at org.drools.util.AbstractHashTable.readExternal(AbstractHashTable.java:66)
           at org.drools.util.ObjectHashMap.readExternal(ObjectHashMap.java:41)
           at java.io.ObjectInputStream.readExternalData(Unknown Source)
           at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.readArray(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.readArray(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
           at java.io.ObjectInputStream.readSerialData(Unknown Source)
           at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
           at java.io.ObjectInputStream.readSerialData(Unknown Source)
           at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
           at java.io.ObjectInputStream.readSerialData(Unknown Source)
           at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
           at java.io.ObjectInputStream.readSerialData(Unknown Source)
           at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.readObject(Unknown Source)
           at java.util.concurrent.ConcurrentHashMap.readObject(Unknown Source)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
           at java.io.ObjectInputStream.readSerialData(Unknown Source)
           at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
           at java.io.ObjectInputStream.readObject0(Unknown Source)
           at java.io.ObjectInputStream.readObject(Unknown Source)
           at org.jboss.web.tomcat.service.session.SessionBasedClusteredSession.readExternal(SessionBasedClusteredSession.java:154)
           at org.jboss.web.tomcat.service.session.JBossCacheService.loadSession(JBossCacheService.java:284)
           at org.jboss.web.tomcat.service.session.JBossCacheManager.loadSession(JBossCacheManager.java:1041)
           at org.jboss.web.tomcat.service.session.JBossCacheManager.findSession(JBossCacheManager.java:813)
           at org.apache.catalina.connector.Request.doGetSession(Request.java:2283)
           at org.apache.catalina.connector.Request.getSession(Request.java:2075)
           at org.jboss.web.tomcat.service.session.JvmRouteValve.checkJvmRoute(JvmRouteValve.java:91)
           at org.jboss.web.tomcat.service.session.JvmRouteValve.invoke(JvmRouteValve.java:81)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           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:157)
           at org.jboss.web.tomcat.service.sso.ClusteredSingleSignOn.invoke(ClusteredSingleSignOn.java:638)
           at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
           at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
           at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
           at java.lang.Thread.run(Unknown Source)


        • 1. Re: Drools deserialization exception in cluster
          Matt Drees Master

          I've run into this problem, too.  I'm going to work on it sometime in the next week or so; I'll get back to you when I have a solution.

          • 2. Re: Drools deserialization exception in cluster
            Jacob Barrett Newbie

            Same problem, anyone found the solution?

            • 3. Re: Drools deserialization exception in cluster
              gdfgd eqwe Novice
              Hy.

              I've got a nearly same issue on Seam 2.2.0GA +JBoss 5.1.0

              When I use drools I got the following exception:


              `

              20:47:12,994 ERROR [SessionBasedJBossCacheService] IOException occurred unmarshalling value
              java.io.EOFException
                   at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2281)
                   at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750)
                   at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780)
                   at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
                   at org.drools.common.DroolsObjectInputStream.<init>(DroolsObjectInputStream.java:55)
                   at org.drools.common.DroolsObjectInputStream.<init>(DroolsObjectInputStream.java:49)
                   at org.drools.common.AbstractRuleBase.readExternal(AbstractRuleBase.java:232)
                   at org.drools.reteoo.ReteooRuleBase.readExternal(ReteooRuleBase.java:179)
                   at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
                   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
                   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
                   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
                   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
                   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
                   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
                   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
                   at java.util.HashMap.readObject(HashMap.java:1030)
                   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.invokeReadObject(ObjectStreamClass.java:974)
                   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
                   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
                   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
                   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
                   at org.jboss.ha.framework.server.SimpleCachableMarshalledValue.get(SimpleCachableMarshalledValue.java:94)
                   at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.AbstractJBossCacheService.getUnMarshalledValue(AbstractJBossCacheService.java:660)
                   at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.SessionBasedJBossCacheService.getSessionAttributes(SessionBasedJBossCacheService.java:114)
                   at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.AbstractJBossCacheService.getDistributableSessionData(AbstractJBossCacheService.java:581)
                   at org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.AbstractJBossCacheService.getSessionData(AbstractJBossCacheService.java:364)
                   at org.jboss.web.tomcat.service.session.JBossCacheManager.loadSession(JBossCacheManager.java:1832)
                   at org.jboss.web.tomcat.service.session.JBossCacheManager.findSession(JBossCacheManager.java:489)
                   at org.apache.catalina.connector.Request.doGetSession(Request.java:2320)
                   at org.apache.catalina.connector.Request.getSessionInternal(Request.java:2239)
                   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:394)
                   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.ajp.AjpProcessor.process(AjpProcessor.java:436)
                   at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:384)
                   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                   at java.lang.Thread.run(Thread.java:619)

              `


              Anybody can help me?
              thank you!
              • 4. Re: Drools deserialization exception in cluster
                gdfgd eqwe Novice

                this exception occured when I try to fail-over the second node in clustered environment

                • 5. Re: Drools deserialization exception in cluster
                  gdfgd eqwe Novice

                  Anyone found the solution?


                  thanx!

                  • 6. Re: Drools deserialization exception in cluster
                    luke biddell Newbie

                    I removed all of the drools config from components.xml and it seems to have gone away. For now at least ;-)