Bug 975361 - Configuring LevelDB as cachestore for memcached cache causes ClassNotFoundException
Configuring LevelDB as cachestore for memcached cache causes ClassNotFoundExc...
Status: VERIFIED
Product: JBoss Data Grid 6
Classification: JBoss
Component: Server (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity high
: DR4
: 6.2.0
Assigned To: Tristan Tarrant
Martin Gencur
:
Depends On:
Blocks: 975081
  Show dependency treegraph
 
Reported: 2013-06-18 04:54 EDT by Radim Vansa
Modified: 2014-03-17 00:02 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker ISPN-3241 Major Resolved Memcached server should not redefine its cache if it already exists 2014-09-08 06:05:22 EDT

  None (edit)
Description Radim Vansa 2013-06-18 04:54:05 EDT
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 02:39:35 EDT
Errata: this bug occurs specifically for memcached cache, not for any two caches.
Comment 2 Michal Linhard 2013-06-19 07:21:46 EDT
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 11:26:11 EDT
Upstream PR: https://github.com/infinispan/infinispan/pull/1911
Comment 6 Michal Linhard 2013-09-18 07:27:11 EDT
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.