Bug 975361 - Configuring LevelDB as cachestore for memcached cache causes ClassNotFoundException
Summary: Configuring LevelDB as cachestore for memcached cache causes ClassNotFoundExc...
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Server
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: DR4
: 6.2.0
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks: 975081
TreeView+ depends on / blocked
 
Reported: 2013-06-18 08:54 UTC by Radim Vansa
Modified: 2014-03-17 04:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-3241 0 Major Resolved Memcached server should not redefine its cache if it already exists 2014-09-08 10:05:22 UTC

Description Radim Vansa 2013-06-18 08:54:05 UTC
Description of problem:
If multiple caches should use LevelDB as cachestore, the server start fails with exception

10:53:03,874 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.datagrid.memcached.memcached-connector: org.jboss.msc.service.StartException in service jboss.datagrid.memcached.memcached-connector: JDGS010004: Failed to start MemcachedServer
	at org.infinispan.server.endpoint.subsystem.ProtocolServerService.start(ProtocolServerService.java:99)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_09-icedtea]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_09-icedtea]
	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09-icedtea]
Caused by: org.infinispan.CacheConfigurationException: Unable to instantiate class org.infinispan.loaders.leveldb.LevelDBCacheStore
	at org.infinispan.util.Util.loadClass(Util.java:101)
	at org.infinispan.util.Util.getInstance(Util.java:222)
	at org.infinispan.configuration.cache.LegacyConfigurationAdaptor.adapt(LegacyConfigurationAdaptor.java:513)
	at org.infinispan.configuration.cache.LegacyConfigurationAdaptor.adapt(LegacyConfigurationAdaptor.java:435)
	at org.infinispan.manager.DefaultCacheManager.defineConfiguration(DefaultCacheManager.java:462)
	at org.infinispan.manager.DefaultCacheManager.defineConfiguration(DefaultCacheManager.java:431)
	at org.jboss.as.clustering.infinispan.DefaultEmbeddedCacheManager.defineConfiguration(DefaultEmbeddedCacheManager.java:65)
	at org.infinispan.server.memcached.MemcachedServer.start(MemcachedServer.scala:48)
	at org.infinispan.server.endpoint.subsystem.ProtocolServerService.startProtocolServer(ProtocolServerService.java:132)
	at org.infinispan.server.endpoint.subsystem.ProtocolServerService.start(ProtocolServerService.java:90)
	... 5 more
Caused by: java.lang.ClassNotFoundException: org.infinispan.loaders.leveldb.LevelDBCacheStore
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366) [rt.jar:1.7.0_09-icedtea]
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355) [rt.jar:1.7.0_09-icedtea]
	at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_09-icedtea]
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354) [rt.jar:1.7.0_09-icedtea]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423) [rt.jar:1.7.0_09-icedtea]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) [rt.jar:1.7.0_09-icedtea]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356) [rt.jar:1.7.0_09-icedtea]
	at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_09-icedtea]
	at java.lang.Class.forName(Class.java:266) [rt.jar:1.7.0_09-icedtea]
	at org.infinispan.util.Util.loadClassStrict(Util.java:138)
	at org.infinispan.util.Util.loadClass(Util.java:99)
	... 14 more

Version-Release number of selected component (if applicable):
JDG 6.1.0-redhat-2

Comment 1 Radim Vansa 2013-06-19 06:39:35 UTC
Errata: this bug occurs specifically for memcached cache, not for any two caches.

Comment 2 Michal Linhard 2013-06-19 11:21:46 UTC
adding 
<module name="org.infinispan.cachestore.leveldb" optional="true"/>
to 
modules/org/infinispan/server/endpoint/main/module.xml
helps here

Comment 3 Jimmy Wilson 2013-06-20 15:26:11 UTC
Upstream PR: https://github.com/infinispan/infinispan/pull/1911

Comment 6 Michal Linhard 2013-09-18 11:27:11 UTC
Verified for 6.2.0.DR4

Core tests were run with LevelDB configs (Local, DIST, REPL) modes, JNI/JAVA implementations, these tests also test memcached interface and no ClassNotFoundException was observed


Note You need to log in before you can comment on or make changes to this bug.