Hi Gerald,

I can't see too much wrong with that.

Did you try with a simpler security file?

grant {
    // Allow everything for now
    permission java.security.AllPermission;
};

On 20 April 2010 09:15, gerald ternola <zerlite2...@yahoo.com> wrote:

>
> Hi,
>
> We had already a running RMI Server running in a tomcat, but our Project
> Manager
> decline to use it because it will be run in a load sharing facility (LSF)
> and we
> can’t afford to run multiple tomcat in an LSF cluster, so we are trying to
> configure a standalone RMI Server, but run in a trouble starting it
> up.
>
> I’m a newbie in JCS platform. We had a configuration below and the error
> that we
> got during starting up the server.
>
>
>
>
> Directory
> Structure
>
> conf
>
> remote.cache.ccf
>
> cache.policy
>
> lib
>
> commons-logging.1.1.1.jar
>
> concurrent.jar
>
> jcs-1.3.jar
>
> scripts
>
> startRemoteCache.sh
>
>
>
> remote.cache.ccf
> file
>
> # Registry used to register and
> provide the
> # IRemoteCacheService
> service.
> registry.host=peitlab01.dallab.design.ti.com
> registry.port=50005
> # call back port to local
> caches.
> remote.cache.service.port=50005
> # rmi socket factory
> timeout
> remote.cache.rmiSocketFactoryTimeoutMillis=5000
> # cluster
> setting
> remote.cluster.LocalClusterConsistency=true
> remote.cluster.AllowClusterGet=true
>
> # sets the default aux value for any
> non configured caches
> jcs.default=DC
> jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
> jcs.default.cacheattributes.MaxObjects=1000
>
> # CACHE REGIONS
> AVAILABLE
> # Regions preconfigured for
> caching
> # PRE-DEFINED CACHE
> REGIONS
> jcs.region.testCache2=DC
>
> jcs.region.testCache2.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
> jcs.region.testCache2.cacheattributes.MaxObjects=1000
>
> jcs.region.testCache2.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
> jcs.region.testCache2.cacheattributes.UseMemoryShrinker=false
> jcs.region.testCache2.cacheattributes.MaxMemoryIdleTimeSeconds=3600
> jcs.region.testCache2.cacheattributes.ShrinkerIntervalSeconds=60
> jcs.region.testCache2.cacheattributes.MaxSpoolPerRun=500
>
> jcs.region.testCache2.elementattributes=org.apache.jcs.engine.ElementAttributes
> jcs.region.testCache2.elementattributes.IsEternal=false
>
> # 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=/home/a0282562/JCS
> jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000000
> jcs.auxiliary.DC.attributes.MaxKeySize=1000000
> jcs.auxiliary.DC.attributes.MaxRecycleBinSize=5000
> jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=300000
> jcs.auxiliary.DC.attributes.ShutdownSpoolTimeLimit=60
>
>
>
> cache.policy
>
> grant {
>     permission
> java.security.AllPermission;
> };
>
>
> grant codeBase
> "file:g:/dev/jakarta-turbine-jcs/target/classes/*"
> {
>     permission
> java.security.AllPermission;
> };
>
> grant codeBase
> "file:g:/dev/jakarta-turbine-jcs/src/conf/*" {
>     permission
> java.security.AllPermission;
> };
>
> grant codeBase
> "file:g:/dev/jakarta-turbine-jcs/src/conf/scripts/*"
> {
>     permission
> java.security.AllPermission;
> };
>
> grant codeBase
> "file:g:/dev/jakarta-turbine-jcs/*" {
>     permission
> java.security.AllPermission;
> };
>
> grant codeBase "file:/G:/*"
> {
>     permission
> java.security.AllPermission;
> };
>
>
>
> startRemote.sh
>
> # Licensed to the Apache Software
> Foundation (ASF) under one
> # or more contributor license
> agreements.  See the NOTICE file
> # distributed with this work for
> additional information
> # regarding copyright ownership.
> The ASF licenses this file
> # to you under the Apache License,
> Version 2.0 (the
> # "License"); you may not use this
> file except in compliance
> # with the License.  You may obtain
> a copy of the License at
> #
> #
> http://www.apache.org/licenses/LICENSE-2.0
> #
> # Unless required by applicable law
> or agreed to in writing,
> # software distributed under the
> License is distributed on an
> # "AS IS" BASIS, WITHOUT WARRANTIES
> OR CONDITIONS OF ANY
> # KIND, either express or implied.
> See the License for the
> # specific language governing
> permissions and limitations
> # under the
> License.
> # !
> /bin/sh
>
> export
> CLASSPATH=.
> export
> CLASSPATH=${CLASSPATH}:`dirname
> $0`/../conf:/usr/java/jcs/conf:/usr/java/jcs/conf/
>
> THISDIR=`dirname
> $0`
>
> for i in `find ${THISDIR}/../lib
> -name "*.jar" `
> do
>         export
> CLASSPATH=${CLASSPATH}:$i
> done
> echo "Classpath =
> ${CLASSPATH}"
>
> # START THE
> REGISTRY
> if [ "$2" != "" ];
> then
>   echo "Starting the registry on
> port $2"
>   rmiregistry $2
> &
> else
>   echo "Not starting registry, since
> no port was supplied."
> fi
>
> POLICY="-Djava.security.policy=`dirname
> $0`/../conf/cache.policy"
>
> HEAP="-Xms128m
> -Xmx512m"
>
> DEBUG="-verbose:gc
> -XX:+PrintTenuringDistribution"
>
> ARGS="$HEAP $DEBUG
> $POLICY"
>
> echo
> $ARGS
>
> java  $ARGS
> org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory
> "$1"
>
>
>
>
> Starting up the
> RMI server:
>
> testlab.com% sh ./startRemoteCache.sh /../conf/remote.cache.ccf
> 50000
>
> Classpath =
>
> .:./../conf:/usr/java/jcs/conf:/usr/java/jcs/conf/:./../lib/commons-logging-1.1.1.jar:./../lib/concurrent.jar:./../lib/jcs-1.3.jar
> Starting the registry on port
> 50000
> -Xms128m -Xmx512m -verbose:gc
> -XX:+PrintTenuringDistribution
> -Djava.security.policy=./../conf/cache.policy
> Apr 15, 2010 10:07:30 PM
> org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory
> startup
> INFO: ConfigFileName =
> [/../conf/remote.cache.ccf]
> Apr 15, 2010 10:07:30 PM
> org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory
> startup
> INFO: Creating server with these
> attributes
>  remoteHost =
> null
>  remotePort =
> 0
>  cacheName =
> null
>  removeUponRemotePut =
> true
>  getOnly =
> false
>  allowClusterGet =
> true
>  localClusterConsistency =
> true
>  getConfigFileName =
> /../conf/remote.cache.ccf
> [GC
> Desired survivor size 5570560 bytes,
> new threshold 7 (max 15)
>  3277K->640K(125632K), 0.0032670
> secs]
> [Full GC 640K->448K(125632K),
> 0.0157800 secs]
> Apr 15, 2010 10:07:30 PM
> org.apache.jcs.engine.control.CompositeCacheManager
> getUnconfiguredInstance
> INFO: Instance is null, creating
> with provided config
> Apr 15, 2010 10:07:30 PM
> org.apache.jcs.engine.control.CompositeCacheManager
> configure
> INFO: Creating cache manager from
> config file: /../conf/remote.cache.ccf
> Apr 15, 2010 10:07:30 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]
> Apr 15, 2010 10:07:30 PM
> org.apache.jcs.engine.control.CompositeCacheConfigurator
> setDefaultAuxValues
> INFO: Setting default auxiliaries to
> DC
> Apr 15, 2010 10:07:30 PM
> org.apache.jcs.engine.control.CompositeCacheConfigurator
> setDefaultCompositeCacheAttributes
> INFO: setting
> defaultCompositeCacheAttributes to [ useLateral = true, useRemote = true,
> useDisk = true, maxObjs = 1000, maxSpoolPerRun = -1, diskUsagePattern = 0
> ]
> Apr 15, 2010 10:07:30 PM
> org.apache.jcs.engine.control.CompositeCacheConfigurator
> parseElementAttributes
> INFO: No special ElementAttribute
> class defined for key [jcs.default.elementattributes], using default
> class.
> Apr 15, 2010 10:07:30 PM
> org.apache.jcs.engine.control.CompositeCacheConfigurator
> setDefaultElementAttributes
> INFO: setting
> defaultElementAttributes to [ IS_LATERAL = true, IS_SPOOL = true, IS_REMOTE
> =
> true, IS_ETERNAL = true, MaxLifeSeconds = -1, IdleTime = -1, CreateTime =
> 1271387250988, LastAccessTime = 1271387250988, getTimeToLiveSeconds() = -1,
> createTime = 1271387250988 ]
> Apr 15, 2010 10:07:31 PM
> org.apache.jcs.engine.memory.lru.LRUMemoryCache
> initialize
> INFO: initialized LRUMemoryCache for
> testCache2
> Apr 15, 2010 10:07:31 PM
> org.apache.jcs.engine.control.CompositeCache
> <init>
> INFO: Constructed cache with name
> [testCache2] and cache attributes [ useLateral = true, useRemote = true,
> useDisk
> = true, maxObjs = 1000, maxSpoolPerRun = 500, diskUsagePattern = 0
> ]
> Apr 15, 2010 10:07:31 PM
> org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache
> <init>
> INFO: Region [testCache2] Cache file
> root directory: /home/a0282562/JCS
> Apr 15, 2010 10:07:31 PM
> org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache
> initKeyMap
> INFO: Region [testCache2] Set
> maxKeySize to: '1000000'
> Apr 15, 2010 10:07:31 PM
> org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache
> <init>
> INFO: Region [testCache2] Indexed
> Disk Cache is alive.
> Apr 15, 2010 10:07:31 PM
> org.apache.jcs.engine.control.CompositeCacheConfigurator
> parseRegions
> INFO: Parsed regions
> [testCache2]
> Apr 15, 2010 10:07:31 PM
> org.apache.jcs.engine.control.CompositeCacheConfigurator
> doConfigure
> INFO: Finished configuration in 56
> ms.
> Apr 15, 2010 10:07:31 PM
> org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory
> startup
> INFO: Binding
> server to testlab.com:50005 with the name
> org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheService
> Exception in
> thread "main" java.rmi.NoSuchObjectException: no such object in
> table
>         at
>
> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
>         at
> sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
>         at
> sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
>         at
> sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown
> Source)
>         at
> java.rmi.Naming.rebind(Naming.java:160)
>         at
>
> org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory.startup(RemoteCacheServerFactory.java:187)
>         at
>
> org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory.main(RemoteCacheServerFactory.java:342)
>
>
>
>
> Thanks in
> advance
>
>
> Sincerely,
> Gerald
> G. Ternola
> IT-Application
> Center of
> Excellence (ACE)
> PEIT-ACE
>
>
>

Reply via email to