Return-Path: Delivered-To: apmail-jakarta-jcs-users-archive@www.apache.org Received: (qmail 13298 invoked from network); 30 Jun 2005 11:11:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Jun 2005 11:11:44 -0000 Received: (qmail 28069 invoked by uid 500); 30 Jun 2005 11:11:43 -0000 Delivered-To: apmail-jakarta-jcs-users-archive@jakarta.apache.org Received: (qmail 27863 invoked by uid 500); 30 Jun 2005 11:11:39 -0000 Mailing-List: contact jcs-users-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JCS Users List" Delivered-To: mailing list jcs-users@jakarta.apache.org Received: (qmail 27713 invoked by uid 99); 30 Jun 2005 11:11:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jun 2005 04:11:38 -0700 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=HTML_50_60,HTML_MESSAGE,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [203.101.69.158] (HELO inchng01.tcs.com) (203.101.69.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jun 2005 04:11:37 -0700 Received: from InChnM01.tcs.com ([172.20.93.59]) by inchng01.tcs.com with InterScan Messaging Security Suite; Thu, 30 Jun 2005 16:41:45 +0530 To: jcs-users@jakarta.apache.org Subject: Simple JCS program MIME-Version: 1.0 X-Mailer: Lotus Notes Release 6.5 September 26, 2003 From: saipradeep.v@tcs.com Message-ID: Date: Thu, 30 Jun 2005 16:40:16 +0530 X-MIMETrack: Serialize by Router on InChnM01/TCS(Release 6.53HF361 | February 23, 2005) at06/30/2005 16:41:21,Serialize complete at 06/30/2005 16:41:21 Content-Type: multipart/alternative; boundary="=_alternative 003DDDDE65257030_=" X-imss-version: 2.028 X-imss-result: Passed X-imss-scores: Clean:99.90000 C:2 M:3 S:5 R:5 X-imss-settings: Baseline:4 C:3 M:3 S:3 R:3 (1.0000 1.0000) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --=_alternative 003DDDDE65257030_= Content-Type: text/plain; charset="US-ASCII" Hi all, I am new to JCS. I have written a simple JCS program as per the guidelines i got from the documentation. But I am not able to successfully execute it. I am enclosing my program and the exception which I have received for your perusal. please do suggest. Cheers Saipradeep V.G. CacheController.java import java.util.List; import org.apache.jcs.JCS; public class CacheController { private static JCS viewCache; private static CacheController cacheinstance=null; private CacheController() { try { viewCache = JCS.getInstance("viewCache"); } catch (Exception e){e.printStackTrace();} } public static CacheController getInstance() { synchronized(CacheController.class) { if(cacheinstance==null) { cacheinstance = new CacheController(); } } return cacheinstance; } public static JCS getCurrentInstance() { return viewCache; } public List getComponentData(cachekey) throws Exception { List compdata = searchViewCache(cachekey); return compdata; } public void setComponentData(List compData, String cachekey) throws Exception { updateViewCache(compData,cachekey); } private List searchViewCache(String cachekey) { List compdata = null; try { System.out.println("Searching for CacheKey ["+cachekey); Object obj = viewCache.get(cachekey); System.out.println(obj.toString()); }catch(Exception e){e.printStackTrace();} return compdata; } public void updateViewCache(List compData, String cachekey) throws Exception { try{ viewCache.put(cachekey,compData); }catch(Exception e){e.printStackTrace();} } } Exception log4j:WARN No appenders could be found for logger (org.apache.jcs.engine.control.CompositeCacheManager). log4j:WARN Please initialize the log4j system properly. java.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/Channel at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeCacheManager.java:203) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeCacheManager.java:192) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeCacheManager.java:149) at org.apache.jcs.engine.control.CompositeCacheManager.getInstance(CompositeCacheManager.java:93) at org.apache.jcs.JCS.ensureCacheManager(JCS.java:99) at org.apache.jcs.JCS.getInstance(JCS.java:64) at com.bofa.crme.grp.view.CacheController.(CacheController.java:31) at com.bofa.crme.grp.view.CacheController.getInstance(CacheController.java:43) at TestViewCache.main(TestViewCache.java:28) Exception in thread "main" Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you --=_alternative 003DDDDE65257030_=--