Aaron, can you please add this to the FAQ.
Have you added the directory or the filename for the classpath. Just add the directory with the config is found to the classpath. On 6/21/06, emily chen <[EMAIL PROTECTED]> wrote:
Hi Alistair, I modified prep.bat to put jcs-1.2.7.6.jar, commons-logging.jar, concurrent.jar, and confige file - remote.cache.ccf to my CLASSPATH. Then I double click startRemoteCache.bat, and alway got error message: ----------------------------------------------------------------------- [GC Desired survivvor size 32768 bytes, new threshold 1 (max 15) - age 1: 65536 bytes, 65536 total 640K->153K(10176), 0.0038131 secs] Jun 21, 2006 11:41:57 Am org.apache.jcs.auxiliary.retmote.RemoteUtilsloadProps SERVERE: Error loading remote properties, for file name [/remote.cache.ccf] java.lang.NullPointerException at java.util.Properties$LineReader.readline(Properties.java:365) at java.util.Properties.load(Properties.java 293) at org.apache.jcs.auxiliary.retmote.RemoteUtils loadProps( RemoteUtils.java: 93) .............. why it cannot find the property file remote.cache.ccf. I already put it in my classpath? do you have any idea? I want to put jcs remote cache server, tomcat, and my web application on one box --- my PC (window XP). also I would like to download all the source code of JCS project, so that I can look into the source code if I have some question. Where can I download the src jar of JCS project? Thanks for your help. Lucy Alistair Forbes <[EMAIL PROTECTED]> wrote: Hi, If your JCS remote server is running you should be able to telnet to the port with something like: telnet localhost 1102 Copy the config file into your classpath, and then you should be able to use something like: java -cp YOURCLASSPATH -Djava.security.policy=../config/security.policy - Dlog4j.configuration=file:../config/logger/cache.xml org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory /remote.cache.ccf Regards Al On 6/20/06, emily chen wrote: > > Hi there, > > I try to use JCS for my web application. I reviewed the project > document, and found it doesn't specify how to start up a remote cache server > in my Local PC. > > I wrote a simple testing program TestJCS.java. I got following error > when I run TestJCS: > > ------------------------------------------------------------------------------------------------ > 2006-06-19 15:48:18,326 [main] ERROR > org.apache.jcs.auxiliary.remote.RemoteCacheManager - Problem finding > server at > [//localhost:1102/org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheService] > java.rmi.ConnectException: Connection refused to host: localhost; nested > exception is: > java.net.ConnectException: Connection refused: connect > at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574) > at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java :185) > at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171) > at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306) > at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source) > at java.rmi.Naming.lookup(Naming.java:84) > at org.apache.jcs.auxiliary.remote.RemoteCacheManager.( > RemoteCacheManager.java:111) > > > > here is my cache.ccf file: > ------------------------------------ > ################################################################## > # DEFAULT CACHE REGION > # sets the default aux value for any non configured caches > ################################################################# > #jcs.default=DC > jcs.default=DC,RFailover > jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes > jcs.default.cacheattributes.MaxObjects=0 > > jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache > jcs.default.elementattributes.IsEternal=false > jcs.default.elementattributes.MaxLifeSeconds=3600 > jcs.default.elementattributes.IdleTime=1800 > jcs.default.elementattributes.IsSpool=true > jcs.default.elementattributes.IsRemote=true > jcs.default.elementattributes.IsLateral=true > ###################################################### > # CACHE REGIONS AVAILABLE > # Regions preconfigured for caching > ##################################################### > #jcs.region.bookCache=DC > jcs.region.bookCache=DC,RFailover > > jcs.region.bookCache.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes > jcs.region.bookCache.cacheattributes.MaxObjects=0 > > jcs.region.bookCache.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache > jcs.region.bookCache.elementattributes.IsEternal=false > jcs.region.bookCache.elementattributes.MaxLifeSeconds=7200 > jcs.region.bookCache.elementattributes.IdleTime=1800 > jcs.region.bookCache.elementattributes.IsSpool=true > jcs.region.bookCache.elementattributes.IsRemote=true > jcs.region.bookCache.elementattributes.IsLateral=true > > ############################################################################ > # AUXILIARY CACHES AVAILABLE > # Primary Disk Cache -- faster than the rest because of memory key storage > > ############################################################################ > > jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory > > jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes > jcs.auxiliary.DC.attributes.DiskPath=C:\\Temp\\JCS_cache > jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000 > jcs.auxiliary.DC.attributes.MaxKeySize=10000 > jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=300000 > jcs.auxiliary.DC.attributes.MaxRecycleBinSize=7500 > ####################################### > # Remote RMI Cache set up to failover > ####################################### > jcs.auxiliary.RFailover=org.apache.jcs.auxiliary.remote.RemoteCacheFactory > > jcs.auxiliary.RFailover.attributes=org.apache.jcs.auxiliary.remote.RemoteCacheAttributes > jcs.auxiliary.RFailover.attributes.RemoteTypeName=LOCAL > jcs.auxiliary.RFailover.attributes.FailoverServers=localhost:1102 > ,localhost:1103 > jcs.auxiliary.RFailover.attributes.GetOnly=false > > > and here is remote.cache.ccf file: > ----------------------------------------------- > ############################################################## > ################## REMOTE SERVER CONFIG RS1 ################# > # Registry used to register and provide the IRmiCacheService service. > registry.host=localhost > registry.port=1102 > # call back port to local caches. > remote.cache.service.port=1102 > # cluster setting > remote.cluster.LocalClusterConsistency=true > > # RS2 SERVER to update for clustering > jcs.auxiliary.RCluster=org.apache.jcs.auxiliary.remote.RemoteCacheFactory > > jcs.auxiliary.RCluster.attributes=org.apache.jcs.auxiliary.remote.RemoteCacheAttributes > #jcs.auxiliary.RCluster.attributes.RemoteTypeName=CLUSTER > jcs.auxiliary.RCluster.attributes.RemoteTypeName=LOCAL > jcs.auxiliary.RCluster.attributes.RemoveUponRemotePut=false > jcs.auxiliary.RCluster.attributes.ClusterServers=localhost:1102 > jcs.auxiliary.RCluster.attributes.GetOnly=false > jcs.auxiliary.RCluster.attributes.LocalClusterConsistency=true > > > This is the first time I used JCS. Could you please tell me how to start > up Remot Cache Server in my local PC. Many thanks, > > Lucy > > > --------------------------------- > Yahoo! Sports Fantasy Football '06 - Go with the leader. Start your league > today! > --------------------------------- How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates.