Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBoss cache problem

 
Aditya Juvvala
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can someone please tell me how to use jboss cache. I am using jbosscache 3.0 Pojo jars. I am trying to create the cache object using the following :
1: String configFile = "replSync-service.xml";
2: PojoCache cache = PojoCacheFactory.createCache(configFile);

The Exception I am getting at line no. 2 is :
Exception in thread "main" java.lang.NoClassDefFoundError: org/jgroups/blocks/RpcDispatcher$Marshaller2
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getMethod0(Class.java:2670)
at java.lang.Class.getMethod(Class.java:1603)
at org.jboss.cache.config.parsing.XmlConfigHelper.setValues(XmlConfigHelper.java:502)
at org.jboss.cache.config.parsing.XmlConfigurationParser2x.parseConfiguration(XmlConfigurationParser2x.java:120)
at org.jboss.cache.config.parsing.XmlConfigurationParser2x.parseStream(XmlConfigurationParser2x.java:106)
at org.jboss.cache.config.parsing.XmlConfigurationParser2x.parseFile(XmlConfigurationParser2x.java:90)
at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:91)
at org.jboss.cache.pojo.impl.PojoCacheImpl.<init>(PojoCacheImpl.java:58)
at org.jboss.cache.pojo.PojoCacheFactory.createCache(PojoCacheFactory.java:29)
at myPack.MyClass.main(MyClass.java:35)

Please help.

 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like your classpath is not having the jar which contains org/jgroups/blocks/RpcDispatcher$Marshaller2
 
Aditya Juvvala
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jaikiran Pai wrote:Looks like your classpath is not having the jar which contains org/jgroups/blocks/RpcDispatcher$Marshaller2

Thanks, I will check that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic