Error Reading Oscache Properties In Cacheadministrator Loadprops
for my application. I moved the .properties file to the correct location and everything worked. --------------------------------------------------------------------- Posted via Jive Forums http://forums.opensymphony.com/thread.jspa?threadID=2923&messageID=7911#7911 Thread at a glance: Previous Message by Date: [Opensymphony-oscache] Easy Config question--Please Help!!!! I know this is a very easy question, so please excuse me for even asking it. I am modifying the properties file to use some file caching capability. When I come to the login servlet, I get a null point exception when OSCache is trying to load the properties file. Here the things I changed from the default: cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.DiskPersistenceListener cache.path=c:\\app\\cache cache.algorithm=com.opensymphony.oscache.base.algorithm.UnlimitedCache cache.blocking=false This is my error: [6/3/05 11:01:55:984 CDT] 49927ac1 Config E com.opensymphony.oscache.base.Config Error reading /oscache.properties in CacheAdministrator.loadProps() java.lang.NullPointerException [6/3/05 11:01:55:984 CDT] 49927ac1 Config E com.opensymphony.oscache.base.Config Ensure the /oscache.properties file is readable and in your classpath. Then I see this and I get confused: [6/3/05 11:01:56:000 CDT] 49927ac1 ServletCacheA I com.opensymphony.oscache.web.ServletCacheAdministrator Created new instance of ServletCacheAdministrator [6/3/05 11:01:56:000 CDT] 49927ac1 ServletCacheA I com.opensymphony.oscache.web.ServletCacheAdministrator Created new application-scoped cache at key: __oscache_cache [6/3/05 11:01:56:000 CDT] 49927ac1 CacheFilter I com.opensymphony.oscache.web.filter.CacheFilter
my spring-hibernate application. I would like to cache my POJO so that it will not loaded again and again from database.But due to some problem in enabling the OScache to cache my POJO. I have placed the oscache.properties file in /WEB-INF/but during start-up server says[java] 2005-11-09 20:15:00,568 ERROR [Config.java:148] : Error reading /oscache.properties in CacheAdministrator.loadProps() java.lang.NullPointerException[java] 2005-11-09 20:15:00,572 ERROR [Config.java:149] : Ensure the /oscache.properties file is readable and in your classpath.[java] 2005-11-09 20:15:03,890 ERROR [Config.java:148] : Error reading /oscache.properties in http://osdir.com/ml/java.open-symphony.os-cache/2005-06/msg00026.html CacheAdministrator.loadProps() java.lang.NullPointerException[java] 2005-11-09 20:15:03,892 ERROR [Config.java:149] : Ensure the /oscache.properties file is readable and in your classpath.[java] 2005-11-09 20:15:03,908 ERROR [Config.java:148] : Error reading /oscache.properties in CacheAdministrator.loadProps() java.lang.NullPointerException[java] 2005-11-09 20:15:03,909 ERROR [Config.java:149] : Ensure the /oscache.properties file is readable and in your classpath.Any input on this issue will be very helpful.RegardsSelvaThis e-mail and http://springframework-user.narkive.com/PwUYjLsZ/oscache-config-problem any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictlyprohibited and may be unlawful.Visit us at http://www.cognizant.com VAN BROECK Jimmy 2005-11-10 11:55:47 UTC PermalinkRaw Message You have to place the file in the classpath.The /WEB-INF/ dir isn't part of the classpath. Put it in /WEB-INF/classes, which is a part of the classpath.GreetingsJimmy-----Original Message-----From: springframework-user-***@lists.sourceforge.net[mailto:springframework-user-***@lists.sourceforge.net]On Behalf OfSrinivasan, Selvakumar (Cognizant)Sent: donderdag 10 november 2005 4:43To: springframework-***@lists.sourceforge.netSubject: [Springframework-user] OScache config problemHi All,This mail is regarding issue in configuring oscache for my spring-hibernate application. I would like to cache my POJO so that it will not loaded again and again from database.But due to some problem in
| Report Content as Inappropriate ♦ ♦ Build failures > testSharedCacheDataRowsRefresh(org.apache.cayenne.access.DataContextQueryCachingOSCacheTest) Now it looks like http://cayenne.195.n3.nabble.com/Build-failures-td2805297.html we might have some real test failures. Just with H2 http://grepcode.com/file/repo1.maven.org/maven2/opensymphony/oscache/2.3/com/opensymphony/oscache/base/Config.java and Derby and only on JDK 1.5. The error is: Running org.apache.cayenne.access.DataContextQueryCachingOSCacheTest Apr 10, 2011 6:42:23 PM com.opensymphony.oscache.base.Config loadProps SEVERE: Error reading /oscache.properties in CacheAdministrator.loadProps() java.lang.NullPointerException Apr 10, 2011 6:42:23 PM com.opensymphony.oscache.base.Config loadProps SEVERE: Ensure the /oscache.properties file is readable and in error reading your classpath. I don't understand why that would be specific to 1.5. Ari -- --------------------------> Aristedes Maniatis GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A Andrus Adamchik Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: error reading oscache Build failures IIRC that's one of those tests with race conditions. Will need to devise a better approach. Andrus On Apr 11, 2011, at 7:35 AM, Aristedes Maniatis wrote: >> testSharedCacheDataRowsRefresh(org.apache.cayenne.access.DataContextQueryCachingOSCacheTest) > > Now it looks like we might have some real test failures. Just with H2 and Derby and only on JDK 1.5. The error is: > > Running org.apache.cayenne.access.DataContextQueryCachingOSCacheTest > Apr 10, 2011 6:42:23 PM com.opensymphony.oscache.base.Config loadProps > SEVERE: Error reading /oscache.properties in CacheAdministrator.loadProps() java.lang.NullPointerException > Apr 10, 2011 6:42:23 PM com.opensymphony.oscache.base.Config loadProps > SEVERE: Ensure the /oscache.properties file is readable and in your classpath. > > I don't understand why that would be specific to 1.5. > > > Ari > > > > -- > --------------------------> > Aristedes Maniatis > GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A > « Return to Cayenne - Dev | 1 view|%1 views Loading... Free forum by Nabble Edit this page
/ oscache / 2.3 2.4.1 2.4 2.3 / com.opensymphony.oscache.base.Config Find Usages Diff Raw Download HTML Widget oh o [] Start line: End line: Snippet Preview Snippet HTML Code Stack Overflow Questions 1/*2*Copyright(c)2002-2003byOpenSymphony3*Allrightsreserved.4*/5packagecom.opensymphony.oscache.base;67importorg.apache.commons.logging.Log;8importorg.apache.commons.logging.LogFactory;910importjava.io.InputStream;1112importjava.util.Properties; Responsible for holding the Cache configuration properties. If the default constructor is used, this class will load the properties from the cache.configuration. Author(s):Fabian Crabus Version:$Revision: 1.1 $2122publicclassConfigimplementsjava.io.Serializable{23privatestaticfinaltransientLoglog=LogFactory.getLog(Config.class); Name of the properties file. 2728privatefinalstaticStringPROPERTIES_FILENAME="/oscache.properties"; Properties map to hold the cache configuration. 3233privatePropertiesproperties=null; Create an OSCache Config that loads properties from oscache.properties. The file must be present in the root of OSCache's classpath. If the file cannot be loaded, an error will be logged and the configuration will remain empty. 4041publicConfig(){42this(null);43} Create an OSCache configuration with the specified properties. Note that it is the responsibility of the caller to provide valid properties as no error checking is done to ensure that required keys are present. If you're unsure of what keys should be present, have a look at a sample oscache.properties file. Parameters:p The properties to use for this configuration. If null, then the default properties are loaded from the oscache.properties file.5556publicConfig(Propertiesp){57if(log.isDebugEnabled()){58log.debug("Config()called");59}6061if(p==null){62loadProps();63}else{64this.properties=p;65}66} Retrieve the value of the named configuration property. If the property cannot be found this method will return nu