Wrapped: Unable to load class "com.cache.DBCacheStore"
812318Nov 10 2010 — edited Nov 12 2010Hi,
I was trying out a sample application for using DBCacheStore and getting the following error...
(Wrapped: Unable to load class "com.cache.DBCacheStore" using sun.misc.Launc
her$AppClassLoader@13f5d07
<class-scheme>
<class-name>com.cache.DBCacheStore</class-name>
</class-scheme>) java.lang.ClassNotFoundException: com.cache.DBCacheStore
I have the CLASSPATH set to the location of DBCacheStore.class file both in cache-server.cmd and in my application startup JVM params. But still i am not able to resolve this issue. However i am still able to hit the database and get the values for the first call and on sub-sequent call, i am able to retrive the value from cache. I also encounter the below error, after i have retrieved the values from cache...
2010-11-10 15:08:31.553/29.671 Oracle Coherence GE 3.6.0.0 <Error> (thread=Distr
ibutedCache, member=1): Terminating PartitionedCache due to unhandled exception:
java.lang.UnsupportedOperationException
2010-11-10 15:08:31.553/29.671 Oracle Coherence GE 3.6.0.0 <Error> (thread=Distr
ibutedCache, member=1):
java.lang.UnsupportedOperationException
at java.util.Collections$UnmodifiableMap.put(Collections.java:1285)
As the exception occurs, the cluster gets restarted and when i re-run the application, it again goes for a DB hit instead of cache hit.
Note : I have the cache-server.cmd running in one the console window.
Following is my cache-config.xml file content...
<?xml version="1.0" encoding="UTF-8" ?>
<cache-config>
<caching-scheme-mapping>
<!--
Caches with names that start with 'Virtual' will be created
as distributed-db-backed.
-->
<cache-mapping>
<cache-name>Virtual*</cache-name>
<scheme-name>distributed-db-backed</scheme-name>
</cache-mapping>
</caching-scheme-mapping>
<caching-schemes>
<!--
DB Backed Distributed caching scheme.
-->
<distributed-scheme>
<scheme-name>distributed-db-backed</scheme-name>
<service-name>DistributedCache</service-name>
<backing-map-scheme>
<read-write-backing-map-scheme>
<internal-cache-scheme>
<class-scheme>
<class-name>
com.tangosol.util.ObservableHashMap
</class-name>
</class-scheme>
</internal-cache-scheme>
<cachestore-scheme>
<class-scheme>
<class-name>
com.cache.DBCacheStore
</class-name>
<init-params>
<init-param>
<param-type>
java.lang.String
</param-type>
<param-value>
EMP_ADDR_VIEW
</param-value>
</init-param>
</init-params>
</class-scheme>
</cachestore-scheme>
<read-only>false</read-only>
<!--
To make this a write-through cache just change the value below to 0 (zero)
-->
<write-delay-seconds>0</write-delay-seconds>
</read-write-backing-map-scheme>
</backing-map-scheme>
<listener />
<autostart>true</autostart>
</distributed-scheme>
</caching-schemes>
</cache-config>
Thanks
Karthik
Edited by: user1073902 on Nov 10, 2010 4:25 AM