6 Replies Latest reply on Nov 4, 2005 8:41 AM by motormind

    InstantiationException during TreeCacheAop.findObjects()

    motormind

      I get an java.lang.InstantiationException when I try to obtain POJOs from a TreeCacheAop through findObjects, like this:

      org.jboss.cache.CacheException: failed creating instance of nl.motormind.tasks.ToCCommand; - nested throwable: (java.lang.InstantiationException: nl.motormind.tasks.ToCCommand)
       at org.jboss.cache.aop.TreeCacheAopDelegate._getObject(TreeCacheAopDelegate.java:75)
       at org.jboss.cache.aop.TreeCacheAopDelegate.findChildObjects(TreeCacheAopDelegate.java:376)
       at org.jboss.cache.aop.TreeCacheAopDelegate._findObjects(TreeCacheAopDelegate.java:356)
       at org.jboss.cache.aop.TreeCacheAop._findObjects(TreeCacheAop.java:522)
       at org.jboss.cache.aop.TreeCacheAop.findObjects(TreeCacheAop.java:461)
       at nl.motormind.server.TblServerRmt.getStoredCommands(Unknown Source)
       at nl.motormind.server.TblServerRmt.getCommands(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 sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
       at sun.rmi.transport.Transport$1.run(Unknown Source)
       at java.security.AccessController.doPrivileged(Native Method)
       at sun.rmi.transport.Transport.serviceCall(Unknown Source)
       at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
       at java.lang.Thread.run(Unknown Source)
      


      The thing is: nl.motormind.tasks.ToCCommand is a concrete class, so this should work ...

        • 1. Re: InstantiationException during TreeCacheAop.findObjects()

          Hmmn! I don't see anything obvious come to mind. Can you send me a JUnit test case if you can? ben.wang@jboss.com.

          -Ben

          • 2. Re: InstantiationException during TreeCacheAop.findObjects()
            motormind

             

            "ben.wang@jboss.com" wrote:
            Hmmn! I don't see anything obvious come to mind. Can you send me a JUnit test case if you can? ben.wang@jboss.com.

            -Ben


            Alas, the code itself is actually pretty secret, so I can't send it to you. I also only get the error when I try to load an object from a persistent cache using the FileCacheLoader

            • 3. Re: InstantiationException during TreeCacheAop.findObjects()

              ic. And which version this is? If it is not 1.2.4, can you try it out? I have junit test case for FileCacheLoader that is working under TreeCacheAop.

              -Ben

              • 4. Re: InstantiationException during TreeCacheAop.findObjects()
                motormind

                 

                "ben.wang@jboss.com" wrote:
                ic. And which version this is? If it is not 1.2.4, can you try it out? I have junit test case for FileCacheLoader that is working under TreeCacheAop.

                -Ben


                Well, it is version 1.2.4 ...

                • 5. Re: InstantiationException during TreeCacheAop.findObjects()

                  ok, so the code is confidential. But can you cook up a mockup example to reproduce the problem?

                  Or can you check out the source code and run the CacheLoader tests under aop ppackage? I will be interested to see where it fails.

                  -Ben

                  • 6. Re: InstantiationException during TreeCacheAop.findObjects()
                    motormind

                     

                    "ben.wang@jboss.com" wrote:
                    ok, so the code is confidential. But can you cook up a mockup example to reproduce the problem?

                    Or can you check out the source code and run the CacheLoader tests under aop ppackage? I will be interested to see where it fails.

                    -Ben


                    I will see what I can do. It is also happening though without reading from the persistent cache ... and I also get a JGroups error along with it:

                    11/04/05,14:34:58:jgroups-ERROR-PessimisticLockInterceptor: undo operation failedjava.lang.reflect.InvocationTargetException
                     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 org.jboss.cache.aop.collection.CollectionInterceptorUtil.invoke(CollectionInterceptorUtil.java:122)
                     at org.jboss.cache.aop.collection.CachedMapInterceptor.invoke(CachedMapInterceptor.java:108)
                     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
                     at AOPClassProxy$0.get(AOPClassProxy$0.java)
                     at nl.motormind.TblServerRmt$TBLTreeCacheListener.nodeModified(TblServerRmt.java:169)
                     at org.jboss.cache.TreeCache.notifyNodeModified(TreeCache.java:4519)
                     at org.jboss.cache.TreeCache._remove(TreeCache.java:3863)
                     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 org.jgroups.blocks.MethodCall.invoke(MethodCall.java:286)
                     at org.jboss.cache.interceptors.PessimisticLockInterceptor.rollback(PessimisticLockInterceptor.java:336)
                     at org.jboss.cache.interceptors.PessimisticLockInterceptor.access$200(PessimisticLockInterceptor.java:31)
                     at org.jboss.cache.interceptors.PessimisticLockInterceptor$SynchronizationHandler.afterCompletion(PessimisticLockInterceptor.java:418)
                     at org.jboss.cache.interceptors.OrderedSynchronizationHandler.afterCompletion(OrderedSynchronizationHandler.java:80)
                     at org.jboss.cache.transaction.DummyTransaction.notifyAfterCompletion(DummyTransaction.java:260)
                     at org.jboss.cache.transaction.DummyTransaction.rollback(DummyTransaction.java:88)
                     at org.jboss.cache.transaction.DummyBaseTransactionManager.rollback(DummyBaseTransactionManager.java:84)
                     at org.jboss.cache.aop.TreeCacheAop.endTransaction(TreeCacheAop.java:486)
                     at org.jboss.cache.aop.TreeCacheAop.putObject(TreeCacheAop.java:373)
                     at org.jboss.cache.aop.collection.CachedMapImpl.put(CachedMapImpl.java:66)
                     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 org.jboss.cache.aop.collection.CollectionInterceptorUtil.invoke(CollectionInterceptorUtil.java:122)
                     at org.jboss.cache.aop.collection.CachedMapInterceptor.invoke(CachedMapInterceptor.java:108)
                     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
                     at AOPClassProxy$0.put(AOPClassProxy$0.java)