You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by Rajkumar Singh <ra...@patni.com> on 2004/09/13 12:32:30 UTC

Exception in JCS

Hi

I am getting the following exception when I am trying to instantiate JCS. I
have deployed jcs-1.1-dev.jar, commons-lang-1.0.1.jar and
commons-logging-1.0.3.jar. Mt application server is Sybase EA server.

Sep 13 15:57:07 2004: SPID: 19 java.lang.ExceptionInInitializerError:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Log4JLogger does not implement Log
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
va:532)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.ja
va:272)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.ja
va:246)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.jcs.engine.memory.AbstractMemoryCache.<clinit>(AbstractMemoryCach
e.java:39)
Sep 13 15:57:07 2004: SPID: 19 	at java.lang.Class.forName0(Native Method)
Sep 13 15:57:07 2004: SPID: 19 	at java.lang.Class.forName(Class.java:115)
Sep 13 15:57:07 2004: SPID: 19 	at
com.sybase.jaguar.server.JaguarClassLoader.loadClass(JaguarClassLoader.java:
838)
Sep 13 15:57:07 2004: SPID: 19 	at
com.sybase.jaguar.server.JaguarClassLoader.loadClass(JaguarClassLoader.java:
683)
Sep 13 15:57:07 2004: SPID: 19 	at
com.sybase.jaguar.server.JaguarClassLoader.loadClass(JaguarClassLoader.java:
676)
Sep 13 15:57:07 2004: SPID: 19 	at
com.sybase.jaguar.server.JaguarClassLoader.loadClass(JaguarClassLoader.java:
665)
Sep 13 15:57:07 2004: SPID: 19 	at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
Sep 13 15:57:07 2004: SPID: 19 	at java.lang.Class.forName0(Native Method)
Sep 13 15:57:07 2004: SPID: 19 	at java.lang.Class.forName(Class.java:115)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.jcs.engine.control.CompositeCache.createMemoryCache(CompositeCach
e.java:1120)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.jcs.engine.control.CompositeCache.<init>(CompositeCache.java:131)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Composi
teCacheConfigurator.java:225)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Composi
teCacheConfigurator.java:196)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegions(Compos
iteCacheConfigurator.java:184)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.jcs.engine.control.CompositeCacheConfigurator.doConfigure(Composi
teCacheConfigurator.java:110)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeCache
Manager.java:207)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeCache
Manager.java:190)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeCache
Manager.java:148)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.jcs.engine.control.CompositeCacheManager.getInstance(CompositeCac
heManager.java:93)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.jcs.JCS.ensureCacheManager(JCS.java:97)
Sep 13 15:57:07 2004: SPID: 19 	at
org.apache.jcs.JCS.getInstance(JCS.java:63)
Sep 13 15:57:07 2004: SPID: 19 	at
com.exn.cache.common.CacheUtil.<init>(CacheUtil.java:36)
Sep 13 15:57:07 2004: SPID: 19 	at
com.exn.ptas.dal.dao.AssetDAO.<init>(AssetDAO.java:77)
Sep 13 15:57:07 2004: SPID: 19 	at
com.exn.ptas.dal.service.CacheLoaderInvokerBean.run(CacheLoaderInvokerBean.j
ava:131)
Sep 13 15:57:07 2004: SPID: 19 	at
com.exn.ptas.dal.service._sk_cache_CacheLoaderInvoker.invoke(_sk_cache_Cache
LoaderInvoker.java:174)
Sep 13 15:57:07 2004: SPID: 19 ERROR Thread-9 CompositeCacheConfigurator -
Could not instantiate auxFactory named "LTCP".

Can anybody help me in this matter?

Thanks
Raj

-----Original Message-----
From: Eduardo Estefano [mailto:eduardo.estefano@siemens.com]
Sent: Friday, September 03, 2004 9:00 PM
To: Turbine JCS Developers List
Subject: Re: Properties instead of config file


Since that subject came up. It would also be nice to pass a URL for
configuration (like in log4j). We had that need in our project and
created a small hack but would be great if that was part of the official
version.

Eduardo

Mike Müller wrote:

>Hi
>
>To set the config filename now on ehas to use
>th emethod setConfigFilename on org.apache.jcs.JCS
>It would be nice if there would be a second method
>on the JCS object which would allow it, to pass a
>Properties object instead of a filename. The problem
>which occurred in our web application is the following:
>we need to parse the cache.ccf and set the paths for
>the file-cache on the startup of the servlet container.
>in this case we need to write the cache.ccf after setting
>the paths to the file cache and pass then the filename
>of it with setConfigFilename to JCS. under some circumstances
>JCS now can't read the file (maybe it isn't written entirely?)
>and JCS gets a NullPointerException:
>
>java.lang.NullPointerException
>	at java.util.StringTokenizer.<init>(StringTokenizer.java:146)
>	at java.util.StringTokenizer.<init>(StringTokenizer.java:162)
>	at
org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Composi
teCacheConfigurator.java:272)
>	at
org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Composi
teCacheConfigurator.java:243)
>	at
org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCacheM
anager.java:356)
>	at
org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCacheM
anager.java:315)
>	at
org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCacheM
anager.java:308)
>	at org.apache.jcs.JCS.getInstance(JCS.java:103)
>
>So if there's a way to pass the Properties object without writing
>it down to disk this would be great.
>Maybe we can implement this in JCS, but we're not yet committer to
>the JCS project. What do the committers think about it?
>
>
>best regards
>
>Mike Müller
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org


Re: Monitoring JCS

Posted by Eduardo Estefano <ed...@siemens.com>.
src\java\org\apache\jcs\admin\servlet\JCSAdminServlet.java

Rajkumar Singh wrote:

>Hi Eduardo
>
>Can you tell me in which package and what is the Servlet name?
>
>Thanks
>Raj
>
>-----Original Message-----
>From: Eduardo Estefano [mailto:eduardo.estefano@siemens.com]
>Sent: Wednesday, September 15, 2004 1:41 PM
>To: Turbine JCS Developers List
>Subject: Re: Monitoring JCS
>
>
>There is an admin servlet that will give you some statistics on each
>cache. I'm not sure if it has the option to tell you what objects are
>inside the cache though.
>
>Rajkumar Singh wrote:
>
>  
>
>>Hi
>>
>>How can we monitor the objects that are added, removed or updated in the
>>    
>>
>JCS
>  
>
>>using the JCS API?
>>
>>If JCS does not have such support then is there anyway to monitor the cache
>>using some other utility? I have used the dumpMap() and dumpCacheEntries()
>>of LRUMemoryCache in my update() method of a Java class that extends
>>LRUMemoryCache . The desription for these method says that "Dump the cache
>>entries from first to list for debugging". But I didn't get any output in
>>    
>>
>my
>  
>
>>log file.
>>
>>I am using log4j-1.2.7.jar file. My application server is Sybase EA Server.
>>
>>Thanks
>>Raj
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org
>>
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org
>
>  
>

RE: Monitoring JCS

Posted by Rajkumar Singh <ra...@patni.com>.
Hi Eduardo

Can you tell me in which package and what is the Servlet name?

Thanks
Raj

-----Original Message-----
From: Eduardo Estefano [mailto:eduardo.estefano@siemens.com]
Sent: Wednesday, September 15, 2004 1:41 PM
To: Turbine JCS Developers List
Subject: Re: Monitoring JCS


There is an admin servlet that will give you some statistics on each
cache. I'm not sure if it has the option to tell you what objects are
inside the cache though.

Rajkumar Singh wrote:

>Hi
>
>How can we monitor the objects that are added, removed or updated in the
JCS
>using the JCS API?
>
>If JCS does not have such support then is there anyway to monitor the cache
>using some other utility? I have used the dumpMap() and dumpCacheEntries()
>of LRUMemoryCache in my update() method of a Java class that extends
>LRUMemoryCache . The desription for these method says that "Dump the cache
>entries from first to list for debugging". But I didn't get any output in
my
>log file.
>
>I am using log4j-1.2.7.jar file. My application server is Sybase EA Server.
>
>Thanks
>Raj
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org


Re: Monitoring JCS

Posted by Eduardo Estefano <ed...@siemens.com>.
There is an admin servlet that will give you some statistics on each 
cache. I'm not sure if it has the option to tell you what objects are 
inside the cache though.

Rajkumar Singh wrote:

>Hi
>
>How can we monitor the objects that are added, removed or updated in the JCS
>using the JCS API?
>
>If JCS does not have such support then is there anyway to monitor the cache
>using some other utility? I have used the dumpMap() and dumpCacheEntries()
>of LRUMemoryCache in my update() method of a Java class that extends
>LRUMemoryCache . The desription for these method says that "Dump the cache
>entries from first to list for debugging". But I didn't get any output in my
>log file.
>
>I am using log4j-1.2.7.jar file. My application server is Sybase EA Server.
>
>Thanks
>Raj
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org


Monitoring JCS

Posted by Rajkumar Singh <ra...@patni.com>.
Hi

How can we monitor the objects that are added, removed or updated in the JCS
using the JCS API?

If JCS does not have such support then is there anyway to monitor the cache
using some other utility? I have used the dumpMap() and dumpCacheEntries()
of LRUMemoryCache in my update() method of a Java class that extends
LRUMemoryCache . The desription for these method says that "Dump the cache
entries from first to list for debugging". But I didn't get any output in my
log file.

I am using log4j-1.2.7.jar file. My application server is Sybase EA Server.

Thanks
Raj



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org


Re: Exception in JCS

Posted by Eduardo Estefano <ed...@siemens.com>.
Log4JLogger does implement Log (in this version at least). Perhaps you 
have an older version of commons logging lurking around somewhere in the 
classpath?

Rajkumar Singh wrote:

>Hi
>
>I am getting the following exception when I am trying to instantiate JCS. I
>have deployed jcs-1.1-dev.jar, commons-lang-1.0.1.jar and
>commons-logging-1.0.3.jar. Mt application server is Sybase EA server.
>
>Sep 13 15:57:07 2004: SPID: 19 java.lang.ExceptionInInitializerError:
>org.apache.commons.logging.LogConfigurationException:
>org.apache.commons.logging.LogConfigurationException:
>org.apache.commons.logging.LogConfigurationException: Class
>org.apache.commons.logging.impl.Log4JLogger does not implement Log
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
>va:532)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.ja
>va:272)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.ja
>va:246)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.jcs.engine.memory.AbstractMemoryCache.<clinit>(AbstractMemoryCach
>e.java:39)
>Sep 13 15:57:07 2004: SPID: 19 	at java.lang.Class.forName0(Native Method)
>Sep 13 15:57:07 2004: SPID: 19 	at java.lang.Class.forName(Class.java:115)
>Sep 13 15:57:07 2004: SPID: 19 	at
>com.sybase.jaguar.server.JaguarClassLoader.loadClass(JaguarClassLoader.java:
>838)
>Sep 13 15:57:07 2004: SPID: 19 	at
>com.sybase.jaguar.server.JaguarClassLoader.loadClass(JaguarClassLoader.java:
>683)
>Sep 13 15:57:07 2004: SPID: 19 	at
>com.sybase.jaguar.server.JaguarClassLoader.loadClass(JaguarClassLoader.java:
>676)
>Sep 13 15:57:07 2004: SPID: 19 	at
>com.sybase.jaguar.server.JaguarClassLoader.loadClass(JaguarClassLoader.java:
>665)
>Sep 13 15:57:07 2004: SPID: 19 	at
>java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
>Sep 13 15:57:07 2004: SPID: 19 	at java.lang.Class.forName0(Native Method)
>Sep 13 15:57:07 2004: SPID: 19 	at java.lang.Class.forName(Class.java:115)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.jcs.engine.control.CompositeCache.createMemoryCache(CompositeCach
>e.java:1120)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.jcs.engine.control.CompositeCache.<init>(CompositeCache.java:131)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Composi
>teCacheConfigurator.java:225)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Composi
>teCacheConfigurator.java:196)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegions(Compos
>iteCacheConfigurator.java:184)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.jcs.engine.control.CompositeCacheConfigurator.doConfigure(Composi
>teCacheConfigurator.java:110)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeCache
>Manager.java:207)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeCache
>Manager.java:190)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeCache
>Manager.java:148)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.jcs.engine.control.CompositeCacheManager.getInstance(CompositeCac
>heManager.java:93)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.jcs.JCS.ensureCacheManager(JCS.java:97)
>Sep 13 15:57:07 2004: SPID: 19 	at
>org.apache.jcs.JCS.getInstance(JCS.java:63)
>Sep 13 15:57:07 2004: SPID: 19 	at
>com.exn.cache.common.CacheUtil.<init>(CacheUtil.java:36)
>Sep 13 15:57:07 2004: SPID: 19 	at
>com.exn.ptas.dal.dao.AssetDAO.<init>(AssetDAO.java:77)
>Sep 13 15:57:07 2004: SPID: 19 	at
>com.exn.ptas.dal.service.CacheLoaderInvokerBean.run(CacheLoaderInvokerBean.j
>ava:131)
>Sep 13 15:57:07 2004: SPID: 19 	at
>com.exn.ptas.dal.service._sk_cache_CacheLoaderInvoker.invoke(_sk_cache_Cache
>LoaderInvoker.java:174)
>Sep 13 15:57:07 2004: SPID: 19 ERROR Thread-9 CompositeCacheConfigurator -
>Could not instantiate auxFactory named "LTCP".
>
>Can anybody help me in this matter?
>
>Thanks
>Raj
>
>-----Original Message-----
>From: Eduardo Estefano [mailto:eduardo.estefano@siemens.com]
>Sent: Friday, September 03, 2004 9:00 PM
>To: Turbine JCS Developers List
>Subject: Re: Properties instead of config file
>
>
>Since that subject came up. It would also be nice to pass a URL for
>configuration (like in log4j). We had that need in our project and
>created a small hack but would be great if that was part of the official
>version.
>
>Eduardo
>
>Mike Müller wrote:
>
>  
>
>>Hi
>>
>>To set the config filename now on ehas to use
>>th emethod setConfigFilename on org.apache.jcs.JCS
>>It would be nice if there would be a second method
>>on the JCS object which would allow it, to pass a
>>Properties object instead of a filename. The problem
>>which occurred in our web application is the following:
>>we need to parse the cache.ccf and set the paths for
>>the file-cache on the startup of the servlet container.
>>in this case we need to write the cache.ccf after setting
>>the paths to the file cache and pass then the filename
>>of it with setConfigFilename to JCS. under some circumstances
>>JCS now can't read the file (maybe it isn't written entirely?)
>>and JCS gets a NullPointerException:
>>
>>java.lang.NullPointerException
>>	at java.util.StringTokenizer.<init>(StringTokenizer.java:146)
>>	at java.util.StringTokenizer.<init>(StringTokenizer.java:162)
>>	at
>>    
>>
>org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Composi
>teCacheConfigurator.java:272)
>  
>
>>	at
>>    
>>
>org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Composi
>teCacheConfigurator.java:243)
>  
>
>>	at
>>    
>>
>org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCacheM
>anager.java:356)
>  
>
>>	at
>>    
>>
>org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCacheM
>anager.java:315)
>  
>
>>	at
>>    
>>
>org.apache.jcs.engine.control.CompositeCacheManager.getCache(CompositeCacheM
>anager.java:308)
>  
>
>>	at org.apache.jcs.JCS.getInstance(JCS.java:103)
>>
>>So if there's a way to pass the Properties object without writing
>>it down to disk this would be great.
>>Maybe we can implement this in JCS, but we're not yet committer to
>>the JCS project. What do the committers think about it?
>>
>>
>>best regards
>>
>>Mike Müller
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org
>>
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org
>
>  
>