2 Replies Latest reply on Jul 7, 2005 5:25 PM by Ben Wang

    TreeCache.put throws ClassNotFoundException

    tsrmohan Newbie

      I am using TreeCache (not AOP) in stand-alone replSync configuration. When I use instances of java.String as my key for the put() method, it works fine. But when I use instance of my own key class (that is serializable and implements equals() and hashCode() methods), I get a ClassNotFoundException (stacktrace shown below):

      Exception in thread "main" org.jboss.util.NestedRuntimeException: java.lang.ClassNotFoundException: test.MyKey(C:\DOCUME~1\mohan\LOCALS~1\Temp\aopdynclasses\test\MyKey.class); - nested throwable: (java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: test.MyKey(C:\DOCUME~1\mohan\LOCALS~1\Temp\aopdynclasses\test\MyKey.class))
      at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:3107)
      at org.jboss.cache.TreeCache.put(TreeCache.java:1745)
      at org.jboss.cache.TreeCache.put(TreeCache.java:1685)
      at DistributedMap.put(DistributedMap.java:78)
      at DistributedMap.main(DistributedMap.java:223)
      Caused by: java.lang.IllegalArgumentException:

      The MyKey class is present in the classpath when I run my test program. But not sure why TreeCache is expecting it to be present in C:\DOCUME~1\... I even tried copying the MyKey.class to the above directory but that does not help. From the folder name "aopdynclasses", appears that some AOP related stuff is getting in the way though I am using plain TreeCache.

      Any help will be highly appreciated.