Your cache.ccf file is bad. You are getting a configuration error. It says that it cannot load a class by they name [].
> org.apache.jcs.config.OptionConverter > instantiateByClassName > SEVERE: Could not instantiate class [] All strings are logged inside brackets, so we can detect padding issues and the like. It looks like you have an empty value in your propeties file for the DC class name. You probably have a new line after the equals sign. The properties file format requires that name value pairs be on the same line. From your first email, it looks like you have a new lines in a few palces after equals signs. Fix the cache.ccf and try again. Aaron --- Sreelakshmi Dokkara <[EMAIL PROTECTED]> wrote: > --> I have the class > "org.apache.jcs.config.OptionConverter" which has > the method instantiateByClassName(String, Class > Object). > > --> Here are the classes that I'm using to implement > JCS (I haven't > included the POJO fiels. They are simple classes > with getters & setters > for their members). > > import org.apache.jcs.JCS; > import > org.apache.jcs.access.exception.CacheException; > > class Cacher > { > private JCS cacheHandler = null; > private String region; > > Cacher(String cacheRegion) > { > this.setRegion(cacheRegion); > try > { > > this.setCacheHandler(JCS.getInstance(this.getRegion())); > } > catch(CacheException ce) > { > System.out.println("Couldn't > return reference to > cache region "+this.getRegion()); > } > } > > public boolean putObject(Object obj) > { > if(obj == null) > { > System.out.println("NULL > object reference > passed"); > return false; > } > else > { > try{ > > this.getCacheHandler().put(obj.toString(), > obj); > return true; > } > catch(CacheException ce) > { > > System.out.println(ce); > return false; > } > } > } > > public Object getObject(String key) > { > return > this.getCacheHandler().get(key); > } > > private JCS getCacheHandler() { > return cacheHandler; > } > private void setCacheHandler(JCS > cacheHandler) { > this.cacheHandler = cacheHandler; > } > private String getRegion() { > return region; > } > private void setRegion(String region) { > this.region = region; > } > } > > public class Main { > > /** > * @param args > */ > public static void main(String[] args) { > > //Create new objects to be cached > Student mary_ = new Student(); > mary_.setName("Mary Smith"); > > Address address = new Address(); > address.setStreet("456 Oak Drive"); > address.setCity("Pleasantville, CA"); > address.setZip(94555); > > mary_.setAddress(address); > > > Student joe_ = new Student(); > joe_.setName("Joe Smith"); > joe_.setSchool("Engineering"); > > // Mary and Joe have the same address > joe_.setAddress(address); > > Course foo_ = new Course(); > foo_.setTitle("Intro to Foo"); > foo_.setInstructor("Jones"); > > joe_.addCourse(foo_); > mary_.addCourse(foo_); > > Course bar_ = new Course(); > bar_.setTitle("Advanced Bar"); > bar_.setInstructor("Woods"); > bar_.setRoom("104 Encina"); > > //Create an instance of the Cache > Hnadler > Cacher cache = new Cacher("ABCache"); > > //Insert the objects into the cache > if(cache.putObject(mary_)) > { > System.out.println("Caching > Successful for "+mary_); > } > else > System.out.println("Caching > Unsuccessful for "+mary_); > > if(cache.putObject(joe_)) > { > System.out.println("Caching > Successful for "+joe_); > } > else > System.out.println("Caching > Unsuccessful for "+joe_); > > } > > } > > > Here's the exception which is occuring. > > Jun 16, 2006 4:41:48 PM > org.apache.jcs.engine.control.CompositeCacheManager > configure > INFO: Creating cache manager from config file: > /cache.ccf > Jun 16, 2006 4:41:49 PM > org.apache.jcs.utils.threadpool.ThreadPoolManager > loadConfig > INFO: thread_pool.default PoolConfiguration = > useBoundary = > [true]boundarySize = [2000]maximumPoolSize = > [150]minimumPoolSize = > [4]keepAliveTime = [300000]whenBlockedPolicy = > [RUN]startUpSize = [4] > Jun 16, 2006 4:41:49 PM > org.apache.jcs.engine.control.CompositeCacheConfigurator > > setDefaultAuxValues > INFO: Setting default auxiliaries to DC > Jun 16, 2006 4:41:50 PM > org.apache.jcs.config.OptionConverter > instantiateByClassName > SEVERE: Could not instantiate class [] > java.lang.ClassNotFoundException: > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at > org.apache.jcs.config.OptionConverter.instantiateByClassName( > OptionConverter.java:327) > at > org.apache.jcs.config.OptionConverter.instantiateByKey( > OptionConverter.java:177) > at > org.apache.jcs.engine.control.CompositeCacheConfigurator.parseCompositeCacheAttributes( > CompositeCacheConfigurator.java:389) > at > org.apache.jcs.engine.control.CompositeCacheConfigurator.setDefaultCompositeCacheAttributes( > CompositeCacheConfigurator.java:169) > at > org.apache.jcs.engine.control.CompositeCacheConfigurator.doConfigure( > CompositeCacheConfigurator.java:127) > at > org.apache.jcs.engine.control.CompositeCacheManager.configure( > CompositeCacheManager.java:311) > at > org.apache.jcs.engine.control.CompositeCacheManager.configure( > CompositeCacheManager.java:255) > at > org.apache.jcs.engine.control.CompositeCacheManager.configure( > CompositeCacheManager.java:242) > === message truncated === --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]