4 Replies Latest reply on Nov 24, 2005 12:16 AM by ben.wang

    Reading from persisted TreeCacheAop leads to InstantiationEx

    motormind

      I pretty much ironed out most of the problems I have with the TreeCacheAop-implementation by delaying reading the cache after an event as much as possible., One thing remains though: when I try to read a persisted cache I get this error:

      Caused by: org.jboss.util.NestedRuntimeException: failed creating instance of nl.motormind.ToCCommand; - nested throwable: (java.lang.InstantiationException: nl.motormind.ToCCommand); - nested throwable: (org.jboss.cache.CacheException: failed creating instance of nl.motormind.ToCCommand; - nested throwable: (java.lang.InstantiationException: nl.motormind.ToCCommand))
       at org.jboss.cache.aop.collection.CachedMapImpl.get(CachedMapImpl.java:59)
       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.mindef.c2sc.titaan.tbl.server.TblServerRmt.getStoredCommands(TblServerRmt.java:606)
       at nl.mindef.c2sc.titaan.tbl.server.TblServerRmt.getCommands(TblServerRmt.java:618)
       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)
      


      I am using the FileCacheLoader for persisting the cache. Now I do get the idea that the code bails since the FileCacheLoader expects a default constructor when loading a POJO from the cache. Is this correct?