9 Replies Latest reply on Sep 15, 2004 8:49 PM by ben.wang

    NotSerializableException using standalone TreeCacheAop

    umk

      Scenario:
      Server A starts up and adds a Map to the cache using this code

      ...
      private static TreeCacheAop treeCache;
      public static synchronized TreeCacheAop getClusterCache(){
       if(treeCache == null){
       try {
       treeCache = new TreeCacheAop();
       PropertyConfigurator config = new PropertyConfigurator(); // configure tree cache.
       config.configure(treeCache, "replSync-service.xml");
       treeCache.startService();
       } catch (Exception e) {
       traceLog.fatal("Error while initializing JBoss cache", e);
       }
       }
       return treeCache;
      }
      ...
      if(Util.getClusterCache().exists("/aop/expresso/CacheManager/cacheLists")){
       cacheLists = (FastHashMap)Util.getClusterCache().getObject("/aop/expresso/CacheManager/cacheLists");
      } else {
       Util.getClusterCache().putObject("/aop/expresso/CacheManager/cacheLists", cacheLists);
       cacheLists = (FastHashMap)Util.getClusterCache().getObject("/aop/expresso/CacheManager/cacheLists");
      }
      ...
      


      When Server B starts up and executes the same code, this error appears on server A console:

      2004-09-12 22:01:22,809 ERROR [MessageDispatcher up processing thread] cache.TreeCache$MessageListenerAdaptor (TreeCache.java:2919) - failed getting the transient state
      java.io.NotSerializableException: com.jcorporate.expresso.core.cache.UnOrderedCache
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
      at java.util.HashMap.writeObject(HashMap.java:978)
      ...

      and this error on server B console:

      2004-09-12 22:01:23,260 ERROR [main] blocks.RpcDispatcher (RpcDispatcher.java:128) - exception=java.io.NotSerializableException: UnOrderedCache
      2004-09-12 22:01:24,182 ERROR [main] blocks.RpcDispatcher (RpcDispatcher.java:128) - exception=java.io.NotSerializableException: UnOrderedCache

      The class UnOrderedCache does not implement Serializable which as I understand is not a requirement for TreeCacheAop. I do not have a jboss-aop.xml file because I'm using -Djava.system.class.loader=org.jboss.aop.standalone.SystemClassLoader. UnOrderedCache contains a few private members: couple strings, another HashMap, Logger reference etc.

      The code is running under Tomcat 4.1.24 using JDK1.4.2 and jbosscache 1.1 with aop 1.0rc1

      Any suggestions greatly appreciated!


        • 1. Re: NotSerializableException using standalone TreeCacheAop
          umk

          ... one additional comment. 'cachelists' in the code sample is a Map instance to which an UnOrderedCache instance is added

          • 2. Re: NotSerializableException using standalone TreeCacheAop

            You will still need jboss-aop to declare your object, UnOrderedCache, to be aspectized. Otherwise, aop will treat it as a regular object of which requires Serializable, and furthermore will not breakdown the object graph for UnOrderedCache.

            -Ben

            • 3. Re: NotSerializableException using standalone TreeCacheAop
              umk

               

              "bwang00" wrote:
              You will still need jboss-aop to declare your object, UnOrderedCache, to be aspectized. Otherwise, aop will treat it as a regular object of which requires Serializable, and furthermore will not breakdown the object graph for UnOrderedCache.

              -Ben


              Thanks for your feedback but I'm still having the same problem.

              I'm assuming that 'aspectized' means adding UnOrderedCache to the jboss-aop.xml. This is the contents of the file (I copied it to the root of my classes folder):

              <?xml version="1.0" encoding="UTF-8"?>
              <aop>
               <prepare expr="field(* $instanceof{com.jcorporate.expresso.core.cache.UnOrderedCache}->*)" />
              </aop>


              Another attempt at running resulted in the same errors I listed above.

              Where am I going wrong?


              • 4. Re: NotSerializableException using standalone TreeCacheAop

                Forget about the map and list. Why don't you do a putObject on UnderedCache to see if it gets replicated correctly?

                -Ben

                • 5. Re: NotSerializableException using standalone TreeCacheAop
                  umk

                   

                  "bwang00" wrote:
                  Forget about the map and list. Why don't you do a putObject on UnderedCache to see if it gets replicated correctly?

                  -Ben


                  Same problem. Here's the updated code I'm running:
                  if(Util.getClusterCache().exists("/aop/expresso/CacheManager/cacheLists")){
                   } else {
                   Util.getClusterCache().putObject("/aop/expresso/CacheManager/cacheLists", new UnOrderedCache());
                   }


                  I set logging to DEBUG. Here are the results for Server A:

                  2004-09-14 17:23:35,696 INFO [main] cache.PropertyConfigurator (PropertyConfigurator.java:172) - configure(): attribute size: 12
                  2004-09-14 17:23:35,758 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:208) - setting attribute IsolationLevel to REPEATABLE_READ
                  2004-09-14 17:23:35,774 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:208) - setting attribute CacheMode to REPL_SYNC
                  2004-09-14 17:23:35,774 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setUseReplQueue(boolean) with parameter "false" of type class java.lang.Boolean
                  2004-09-14 17:23:35,790 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setReplQueueInterval(long) with parameter "0" of type class java.lang.Long
                  2004-09-14 17:23:35,790 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setReplQueueMaxElements(int) with parameter "0" of type class java.lang.Integer
                  2004-09-14 17:23:35,805 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:208) - setting attribute ClusterName to TreeCache-Cluster
                  2004-09-14 17:23:35,805 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setClusterConfig(org.w3c.dom.Element) with parameter "[config: null]" of type cla
                  2004-09-14 17:23:35,805 INFO [main] cache.TreeCache (TreeCache.java:613) - setClusterConfig(): setting cluster properties from xml to: UDP(ip_mcast=true;ip_ttl=64;loopback=true;mcast_addr=228.1.2.3;mcast_port=45566;mcast_recv_buf_size=80000
                  _send_buf_size=150000):PING(down_thread=false;num_initial_members=3;timeout=2000;up_thread=false):MERGE2(max_interval=20000;min_interval=10000):FD_SOCK:VERIFY_SUSPECT(down_thread=false;timeout=1500;up_thread=false):pbcast.NAKACK(down_thread=
                  200,2400,4800;up_thread=false):UNICAST(down_thread=false;min_threshold=10;timeout=600,1200,2400;window_size=100):pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):FRAG(down_thread=false;frag_size=8192;up_thread=false)
                  _local_addr=true;shun=true):pbcast.STATE_TRANSFER(down_thread=true;up_thread=true)
                  2004-09-14 17:23:35,821 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setFetchStateOnStartup(boolean) with parameter "true" of type class java.lang.Boo
                  2004-09-14 17:23:35,821 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setInitialStateRetrievalTimeout(long) with parameter "5000" of type class java.la
                  2004-09-14 17:23:35,821 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setSyncReplTimeout(long) with parameter "10000" of type class java.lang.Long
                  2004-09-14 17:23:35,836 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setLockAcquisitionTimeout(long) with parameter "15000" of type class java.lang.Lo
                  2004-09-14 17:23:35,836 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:280) - getSubElementObject(): element object. Does not exist for config
                  2004-09-14 17:23:35,836 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:208) - setting attribute EvictionPolicyClass to
                  2004-09-14 17:23:35,852 WARN [main] cache.TreeCache (TreeCache.java:1092) - No transaction manager lookup class has been defined. TX will be null
                  2004-09-14 17:23:35,868 INFO [main] cache.TreeCache (TreeCache.java:1229) - interceptor chain is:
                  class org.jboss.cache.interceptors.CallInterceptor
                  class org.jboss.cache.interceptors.ReplicationInterceptor
                  2004-09-14 17:23:35,883 INFO [main] cache.TreeCache (TreeCache.java:1116) - cache mode is REPL_SYNC
                  
                  -------------------------------------------------------
                  GMS: address is dev:2331
                  -------------------------------------------------------
                  2004-09-14 17:23:38,836 INFO [MessageDispatcher up processing thread] cache.TreeCache (TreeCache.java:3071) - viewAccepted(): new members: [dev:2331]
                  2004-09-14 17:23:38,899 INFO [main] cache.TreeCache (TreeCache.java:1437) - state could not be retrieved (must be first member in group)
                  2004-09-14 17:23:38,899 INFO [MessageDispatcher up processing thread] cache.TreeCache$MessageListenerAdaptor (TreeCache.java:2978) - new cache is null (maybe first member in cluster)
                  2004-09-14 17:23:38,915 DEBUG [main] cache.TreeCache (TreeCache.java:1569) - get(, "/aop/expresso/CacheManager/cacheLists", AOPInstance, "false")
                  2004-09-14 17:23:38,930 DEBUG [main] aop.TreeCacheAop (TreeCacheAop.java:150) - putObject(): fqn: /aop/expresso/CacheManager/cacheLists
                  2004-09-14 17:23:38,930 DEBUG [main] cache.TreeCache (TreeCache.java:1569) - get(, "/aop/expresso/CacheManager/cacheLists", jboss:internal:class, "false")
                  2004-09-14 17:23:38,946 DEBUG [main] aop.TreeCacheAop (TreeCacheAop.java:281) - putObject(): obj is non-advisable.
                  2004-09-14 17:23:38,946 DEBUG [main] cache.TreeCache (TreeCache.java:2336) - _put(null, "/aop/expresso/CacheManager/cacheLists", jboss:internal:class, class com.jcorporate.expresso.core.cache.UnOrderedCache)
                  2004-09-14 17:23:38,961 DEBUG [main] cache.Node (Node.java:200) - createChild: fqn=/aop
                  2004-09-14 17:23:38,961 DEBUG [main] cache.Node (Node.java:200) - createChild: fqn=/aop/expresso
                  2004-09-14 17:23:38,977 DEBUG [main] cache.Node (Node.java:200) - createChild: fqn=/aop/expresso/CacheManager
                  2004-09-14 17:23:38,977 DEBUG [main] cache.Node (Node.java:200) - createChild: fqn=/aop/expresso/CacheManager/cacheLists
                  2004-09-14 17:23:39,008 DEBUG [main] cache.TreeCache (TreeCache.java:1569) - get(, "/aop/expresso/CacheManager/cacheLists", AOPInstance, "false")
                  2004-09-14 17:23:39,008 DEBUG [main] cache.TreeCache (TreeCache.java:2131) - callRemoteMethods(): destination list is empty, discarding call
                  2004-09-14 17:23:39,024 DEBUG [main] cache.TreeCache (TreeCache.java:2336) - _put(null, "/aop/expresso/CacheManager/cacheLists", value, com.jcorporate.expresso.core.cache.UnOrderedCache@425eb9)
                  2004-09-14 17:23:39,040 DEBUG [main] cache.TreeCache (TreeCache.java:1569) - get(, "/aop/expresso/CacheManager/cacheLists", AOPInstance, "false")
                  2004-09-14 17:23:39,040 DEBUG [main] cache.TreeCache (TreeCache.java:2131) - callRemoteMethods(): destination list is empty, discarding call
                  Loading Messagebundle: com.jcorporate.expresso.core.ExpressoSchema
                  Loading Messagebundle: com/jcorporate/expresso/core
                  ConfigManager: Expresso initialization complete
                  factory loaded : {expressoClassicDefinition={name=expressoClassicDefinition, path=/expresso/layout/expresso-layout.jsp, role=null, controller=null, controllerType=null, controllerInstance=null, attributes={title=Expresso Framework, header=/e
                  main.jsp}}
                  }
                  Factory initialized from file '/WEB-INF/tiles-definitions/expresso-page.xml'.
                  2004-09-14 17:24:48,447 INFO [MessageDispatcher up processing thread] cache.TreeCache (TreeCache.java:3071) - viewAccepted(): new members: [dev:2331, BIO133:1317]
                  2004-09-14 17:24:48,478 INFO [MessageDispatcher up processing thread] cache.TreeCache$MessageListenerAdaptor (TreeCache.java:2910) - locking the tree to obtain transient state
                  2004-09-14 17:24:48,541 DEBUG [MessageDispatcher up processing thread] cache.Node (Node.java:411) - acquired RL: fqn=/, owner=<dev:2331>:3, lock=read owners=[<dev:2331>:3]
                  2004-09-14 17:24:48,541 DEBUG [MessageDispatcher up processing thread] cache.Node (Node.java:411) - acquired RL: fqn=/aop, owner=<dev:2331>:3, lock=read owners=[<dev:2331>:3]
                  2004-09-14 17:24:48,541 DEBUG [MessageDispatcher up processing thread] cache.Node (Node.java:411) - acquired RL: fqn=/aop/expresso, owner=<dev:2331>:3, lock=read owners=[<dev:2331>:3]
                  2004-09-14 17:24:48,556 DEBUG [MessageDispatcher up processing thread] cache.Node (Node.java:411) - acquired RL: fqn=/aop/expresso/CacheManager, owner=<dev:2331>:3, lock=read owners=[<dev:2331>:3]
                  2004-09-14 17:24:48,556 DEBUG [MessageDispatcher up processing thread] cache.Node (Node.java:411) - acquired RL: fqn=/aop/expresso/CacheManager/cacheLists, owner=<dev:2331>:3, lock=read owners=[<dev:2331>:3]
                  2004-09-14 17:24:48,634 ERROR [MessageDispatcher up processing thread] cache.TreeCache$MessageListenerAdaptor (TreeCache.java:2919) - failed getting the transient state
                  java.io.NotSerializableException: com.jcorporate.expresso.core.cache.UnOrderedCache
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
                   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
                   at java.util.HashMap.writeObject(HashMap.java:978)
                   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:324)
                   at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
                   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
                   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
                   at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
                   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
                   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
                   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
                   at java.util.HashMap.writeObject(HashMap.java:978)
                   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:324)
                   at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
                   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
                   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
                   at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
                   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
                   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
                   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
                   at java.util.HashMap.writeObject(HashMap.java:978)
                   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:324)
                   at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
                   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
                   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
                   at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
                   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
                   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
                   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
                   at java.util.HashMap.writeObject(HashMap.java:978)
                   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:324)
                   at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
                   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
                   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
                   at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
                   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
                   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
                   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
                   at java.util.HashMap.writeObject(HashMap.java:978)
                   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:324)
                   at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
                   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
                   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
                   at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
                   at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
                   at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
                   at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
                   at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
                   at org.jgroups.util.Util.objectToByteBuffer(Util.java:64)
                   at org.jboss.cache.TreeCache$MessageListenerAdaptor.getState(TreeCache.java:2913)
                   at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.passUp(MessageDispatcher.java:601)
                   at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:331)
                   at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUp(MessageDispatcher.java:720)
                   at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.access$300(MessageDispatcher.java:553)
                   at org.jgroups.blocks.MessageDispatcher$1.run(MessageDispatcher.java:689)
                   at java.lang.Thread.run(Thread.java:534)
                  2004-09-14 17:24:48,884 DEBUG [MessageDispatcher up processing thread] cache.TreeCache (TreeCache.java:2336) - _put(null, "/aop/expresso/CacheManager/cacheLists", jboss:internal:class, class com.jcorporate.expresso.core.cache.UnOrderedCache)
                  2004-09-14 17:24:48,884 DEBUG [MessageDispatcher up processing thread] lock.IdentityLock (IdentityLock.java:217) - release(): lock map owner <dev:2331>:3 not found. Could have been released.
                  2004-09-14 17:24:48,900 DEBUG [MessageDispatcher up processing thread] lock.IdentityLock (IdentityLock.java:217) - release(): lock map owner <dev:2331>:3 not found. Could have been released.
                  2004-09-14 17:24:48,900 DEBUG [MessageDispatcher up processing thread] lock.IdentityLock (IdentityLock.java:217) - release(): lock map owner <dev:2331>:3 not found. Could have been released.
                  2004-09-14 17:24:48,916 DEBUG [MessageDispatcher up processing thread] lock.IdentityLock (IdentityLock.java:217) - release(): lock map owner <dev:2331>:3 not found. Could have been released.
                  2004-09-14 17:24:48,916 DEBUG [MessageDispatcher up processing thread] cache.TreeCache (TreeCache.java:1569) - get(, "/aop/expresso/CacheManager/cacheLists", AOPInstance, "false")
                  2004-09-14 17:24:48,931 DEBUG [MessageDispatcher up processing thread] lock.IdentityLock (IdentityLock.java:217) - release(): lock map owner <dev:2331>:3 not found. Could have been released.
                  2004-09-14 17:24:48,931 DEBUG [MessageDispatcher up processing thread] lock.IdentityLock (IdentityLock.java:217) - release(): lock map owner <dev:2331>:3 not found. Could have been released.
                  2004-09-14 17:24:48,931 DEBUG [MessageDispatcher up processing thread] lock.IdentityLock (IdentityLock.java:217) - release(): lock map owner <dev:2331>:3 not found. Could have been released.
                  2004-09-14 17:24:48,947 DEBUG [MessageDispatcher up processing thread] lock.IdentityLock (IdentityLock.java:217) - release(): lock map owner <dev:2331>:3 not found. Could have been released.


                  and DEBUG for Server B:

                  2004-09-14 17:24:39,367 INFO [main] cache.PropertyConfigurator (PropertyConfigurator.java:172) - configure(): attribute size: 12
                  2004-09-14 17:24:39,383 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:208) - setting attribute IsolationLevel to REPEATABLE_READ
                  2004-09-14 17:24:39,399 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:208) - setting attribute CacheMode to REPL_SYNC
                  2004-09-14 17:24:39,399 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setUseReplQueue(boolean) with para
                  2004-09-14 17:24:39,399 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setReplQueueInterval(long) with pa
                  2004-09-14 17:24:39,399 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setReplQueueMaxElements(int) with
                  2004-09-14 17:24:39,399 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:208) - setting attribute ClusterName to TreeCache-Cluster
                  2004-09-14 17:24:39,399 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setClusterConfig(org.w3c.dom.Eleme
                  2004-09-14 17:24:39,399 INFO [main] cache.TreeCache (TreeCache.java:613) - setClusterConfig(): setting cluster properties from xml to: UDP(ip_mcast=true;ip_ttl=64;loopback=true;mcast_addr=228.1
                  _send_buf_size=150000):PING(down_thread=false;num_initial_members=3;timeout=2000;up_thread=false):MERGE2(max_interval=20000;min_interval=10000):FD_SOCK:VERIFY_SUSPECT(down_thread=false;timeout=1
                  200,2400,4800;up_thread=false):UNICAST(down_thread=false;min_threshold=10;timeout=600,1200,2400;window_size=100):pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):FRAG(do
                  _local_addr=true;shun=true):pbcast.STATE_TRANSFER(down_thread=true;up_thread=true)
                  2004-09-14 17:24:39,414 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setFetchStateOnStartup(boolean) wi
                  2004-09-14 17:24:39,414 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setInitialStateRetrievalTimeout(lo
                  2004-09-14 17:24:39,414 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setSyncReplTimeout(long) with para
                  2004-09-14 17:24:39,414 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:250) - Invoking setter method: public void org.jboss.cache.TreeCache.setLockAcquisitionTimeout(long) wi
                  2004-09-14 17:24:39,414 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:280) - getSubElementObject(): element object. Does not exist for config
                  2004-09-14 17:24:39,414 DEBUG [main] cache.PropertyConfigurator (PropertyConfigurator.java:208) - setting attribute EvictionPolicyClass to
                  2004-09-14 17:24:39,414 WARN [main] cache.TreeCache (TreeCache.java:1092) - No transaction manager lookup class has been defined. TX will be null
                  2004-09-14 17:24:39,430 INFO [main] cache.TreeCache (TreeCache.java:1229) - interceptor chain is:
                  class org.jboss.cache.interceptors.CallInterceptor
                  class org.jboss.cache.interceptors.ReplicationInterceptor
                  2004-09-14 17:24:39,430 INFO [main] cache.TreeCache (TreeCache.java:1116) - cache mode is REPL_SYNC
                  
                  -------------------------------------------------------
                  GMS: address is Bio133:1317
                  -------------------------------------------------------
                  2004-09-14 17:24:41,792 INFO [MessageDispatcher up processing thread] cache.TreeCache (TreeCache.java:3071) - viewAccepted(): new members: [DEV:2331, Bio133:1317]
                  2004-09-14 17:24:42,138 INFO [MessageDispatcher up processing thread] cache.TreeCache$MessageListenerAdaptor (TreeCache.java:2984) - received the state (size=30 bytes)
                  2004-09-14 17:24:42,138 INFO [main] cache.TreeCache (TreeCache.java:1434) - state was retrieved successfully (in 346 milliseconds
                  2004-09-14 17:24:42,138 DEBUG [main] cache.TreeCache (TreeCache.java:1569) - get(, "/aop/expresso/CacheManager/cacheLists", AOPInstance, "false")
                  2004-09-14 17:24:42,138 DEBUG [main] aop.TreeCacheAop (TreeCacheAop.java:150) - putObject(): fqn: /aop/expresso/CacheManager/cacheLists
                  2004-09-14 17:24:42,154 DEBUG [main] cache.TreeCache (TreeCache.java:1569) - get(, "/aop/expresso/CacheManager/cacheLists", jboss:internal:class, "false")
                  2004-09-14 17:24:42,154 DEBUG [main] aop.TreeCacheAop (TreeCacheAop.java:281) - putObject(): obj is non-advisable.
                  2004-09-14 17:24:42,154 DEBUG [main] cache.TreeCache (TreeCache.java:2336) - _put(null, "/aop/expresso/CacheManager/cacheLists", jboss:internal:class, class com.jcorporate.expresso.core.cache.Un
                  2004-09-14 17:24:42,154 DEBUG [main] cache.Node (Node.java:200) - createChild: fqn=/aop
                  2004-09-14 17:24:42,170 DEBUG [main] cache.Node (Node.java:200) - createChild: fqn=/aop/expresso
                  2004-09-14 17:24:42,170 DEBUG [main] cache.Node (Node.java:200) - createChild: fqn=/aop/expresso/CacheManager
                  2004-09-14 17:24:42,170 DEBUG [main] cache.Node (Node.java:200) - createChild: fqn=/aop/expresso/CacheManager/cacheLists
                  2004-09-14 17:24:42,170 DEBUG [main] cache.TreeCache (TreeCache.java:1569) - get(, "/aop/expresso/CacheManager/cacheLists", AOPInstance, "false")
                  2004-09-14 17:24:42,170 DEBUG [main] cache.TreeCache (TreeCache.java:2136) - callRemoteMethods(): valid members are [DEV:2331]
                  2004-09-14 17:24:42,311 DEBUG [main] cache.TreeCache (TreeCache.java:2336) - _put(null, "/aop/expresso/CacheManager/cacheLists", value, com.jcorporate.expresso.core.cache.UnOrderedCache@18e609b)
                  2004-09-14 17:24:42,311 DEBUG [main] cache.TreeCache (TreeCache.java:1569) - get(, "/aop/expresso/CacheManager/cacheLists", AOPInstance, "false")
                  2004-09-14 17:24:42,311 DEBUG [main] cache.TreeCache (TreeCache.java:2136) - callRemoteMethods(): valid members are [DEV:2331]
                  2004-09-14 17:24:42,327 ERROR [main] blocks.RpcDispatcher (RpcDispatcher.java:128) - exception=java.io.NotSerializableException: com.jcorporate.expresso.core.cache.UnOrderedCache


                  What else can I try?


                  • 6. Re: NotSerializableException using standalone TreeCacheAop

                    Well, the log says obj is non-advisable:

                    | 2004-09-14 17:23:38,946 DEBUG [main] aop.TreeCacheAop (TreeCacheAop.java:281) - putObject(): obj is non-advisable.
                    | 2004-09-14 17:23:38,946 DEBUG [main] cache.TreeCache (TreeCache.java:2336) - _put(null, "/aop/expresso/CacheManager/cacheLists", jboss:internal:class, class com.jcorporate.expresso.core.cache.UnOrderedCache)

                    Are you sure your jboss-aop.xml is in the class path? Under the distro, you can run the aop example. Make sure that works first. For example,

                    sh build.sh run.aopc.examples -Dtest=org.jboss.test.cache.test.standAloneAop.AopLocalTest

                    -Ben

                    • 7. Re: NotSerializableException using standalone TreeCacheAop
                      umk

                       

                      "bwang00" wrote:
                      Well, the log says obj is non-advisable:

                      | 2004-09-14 17:23:38,946 DEBUG [main] aop.TreeCacheAop (TreeCacheAop.java:281) - putObject(): obj is non-advisable.
                      | 2004-09-14 17:23:38,946 DEBUG [main] cache.TreeCache (TreeCache.java:2336) - _put(null, "/aop/expresso/CacheManager/cacheLists", jboss:internal:class, class com.jcorporate.expresso.core.cache.UnOrderedCache)

                      Are you sure your jboss-aop.xml is in the class path? Under the distro, you can run the aop example. Make sure that works first. For example,

                      sh build.sh run.aopc.examples -Dtest=org.jboss.test.cache.test.standAloneAop.AopLocalTest

                      -Ben


                      I appreciate you working with me on this but it's becoming very frustrating :( Here are the results of running LocalAopTest:
                      run.aopc.examples:
                       [junit] Running org.jboss.test.cache.test.standAloneAop.LocalAopTest
                       [junit] Tests run: 12, Failures: 0, Errors: 0, Time elapsed: 3.547 sec
                      [junitreport] jar:file:/E:/jboss-cache/ant-dist/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl; Line #41; Column #53; javax.xml.transform.TransformerException: java.lang.ClassNotFoundException: redirect
                      [junitreport] jar:file:/E:/jboss-cache/ant-dist/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl; Line #46; Column #57; javax.xml.transform.TransformerException: java.lang.ClassNotFoundException: redirect
                      [junitreport] jar:file:/E:/jboss-cache/ant-dist/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl; Line #51; Column #64; javax.xml.transform.TransformerException: java.lang.ClassNotFoundException: redirect
                      [junitreport] jar:file:/E:/jboss-cache/ant-dist/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl; Line #56; Column #62; javax.xml.transform.TransformerException: java.lang.ClassNotFoundException: redirect
                      [junitreport] jar:file:/E:/jboss-cache/ant-dist/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl; Line #61; Column #64; javax.xml.transform.TransformerException: java.lang.ClassNotFoundException: redirect
                      [junitreport] jar:file:/E:/jboss-cache/ant-dist/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl; Line #82; Column #76; javax.xml.transform.TransformerException: java.lang.ClassNotFoundException: redirect
                      [junitreport] jar:file:/E:/jboss-cache/ant-dist/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl; Line #89; Column #78; javax.xml.transform.TransformerException: java.lang.ClassNotFoundException: redirect
                      [junitreport] jar:file:/E:/jboss-cache/ant-dist/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl; Line #98; Column #74; javax.xml.transform.TransformerException: java.lang.ClassNotFoundException: redirect
                      [junitreport] jar:file:/E:/jboss-cache/ant-dist/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl; Line #102; Column #81; javax.xml.transform.TransformerException: java.lang.ClassNotFoundException: redirect
                      [junitreport] Transform time: 1281ms
                      
                      BUILD SUCCESSFUL
                      


                      If not finding jboss-aop.xml is the problem then maybe you can tell me how I'm supposed to correctly specify the location of jboss-aop.xml? I've already tried the following:
                      - creating a WEB-INF/classes/META-INF folder and copying jboss-aop.xml to it
                      - copying jboss-aop.xml to the WEB-INF/classes folder
                      - adding -Djboss.aop.path=...path...\jboss-aop.xml to the JAVA_OPTS environment variable that is used by the Tomcat startup script


                      • 8. Re: NotSerializableException using standalone TreeCacheAop
                        umk

                        Some more info...

                        I've even reverted to using the org.jboss.test.cache.test.standAloneAop.Person instead of UnOrderedCache (setting -Djboss.aop.path=...path...\jboss-aop.xml) and I still get the same errors.

                        These jars have been added to the tomcat/common/endorsed folder to support org.jboss.aop.standalone.SystemClassLoader:

                        commons-collections.jar
                        concurrent.jar
                        javassist.jar
                        jboss-aop-jdk15.jar
                        jboss-aop.jar
                        jboss-common.jar
                        junit.jar
                        log4j-1.2.7.jar
                        qdox.jar
                        trove.jar
                        xalan_2_6_0.jar
                        xercesImpl.jar
                        xml-apis.jar


                        Help!


                        • 9. Re: NotSerializableException using standalone TreeCacheAop

                          If you are running under Tomcat, it'd be best to use aopc to pre-compile your advisable object. Check into the example in build.xml of aopc. That way, at least, you take the class loader out of the picture.

                          -Ben