<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
<BR>
<FONT color=#008000>Hi </FONT><BR>
<FONT color=#008000>I am new to jboss cahe, could you please help me in sorting out this error.</FONT><BR>
<FONT color=#008000></FONT> <BR>
<FONT color=#008000>I am using netbeans to compile my program running it on remote linux server.</FONT><BR>
<FONT color=#008000></FONT> <BR>
<FONT color=#008000>NetBeans 6.0.1</FONT><BR>
<FONT color=#008000>JDK jdk1.5.0_12</FONT><BR>
<FONT color=#008000>JRE jre1.6.0_07</FONT><BR>
<FONT color=#008000>JBossCache-1.4.0.SP1</FONT><BR>
<FONT color=#008000>POstgreSQL 8.3</FONT><BR>
<FONT color=#008000>postgresql-8.2-506.jdbc3 driver</FONT><BR>
<FONT color=#008000>Running Windows XP</FONT><BR>
<BR>
<FONT color=#0000ff>1- While compilin Jboss-Cache I am getting following error , though it is building successfuly</FONT><BR>
<BR>
Created dir: C:\Documents and Settings\Meena\Desktop\db project\jboss-cache\build\classes<BR>Compiling 258 source files to C:\Documents and Settings\Meena\Desktop\db project\jboss-cache\build\classes<BR>C:\Documents and Settings\Meena\Desktop\db project\jboss-cache\src\org\jboss\cache\aop\TreeCacheAopDelegate.java:127: warning: non-varargs call of varargs method with inexact argument type for last parameter;<BR>cast to java.lang.Class for a varargs call<BR>cast to java.lang.Class[] for a non-varargs call and to suppress this warning<BR> Constructor ctr = clazz.getDeclaredConstructor(null);<BR>C:\Documents and Settings\Meena\Desktop\db project\jboss-cache\src\org\jboss\cache\aop\TreeCacheAopDelegate.java:129: warning: non-varargs call of varargs method with inexact argument type for last parameter;<BR>cast to java.lang.Object for a varargs call<BR>cast to java.lang.Object[] for a non-varargs call and to suppress this warning<BR> obj = ctr.newInstance(null);<BR>Note: Some input files use or override a deprecated API.<BR>Note: Recompile with -Xlint:deprecation for details.<BR>Note: Some input files use unchecked or unsafe operations.<BR>Note: Recompile with -Xlint:unchecked for details.<BR>2 warnings<BR><BR>
<BR>
<FONT color=#0000ff>While Running the compiled code it on Server </FONT><BR>
<FONT color=#0000ff>I am getting following error </FONT><BR>
<FONT color=#0000ff>It seems it canot not initialize cache, complaining about configuration file. I tried the same code few months ago it was working fine.</FONT><BR>
<BR>
java.lang.reflect.InvocationTargetException<BR> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<BR> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<BR> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<BR> at java.lang.reflect.Method.invoke(Method.java:585)<BR> at org.jboss.cache.PropertyConfigurator.configure(PropertyConfigurator.java:215)<BR> at org.jboss.cache.PropertyConfigurator.configure(PropertyConfigurator.java:161)<BR> at org.usyd.sit.perfEvalServer.ServerImpl.initCache(ServerImpl.java:60)<BR> at org.usyd.sit.perfEvalServer.ServerImpl.<init>(ServerImpl.java:45)<BR> at org.usyd.sit.perfEvalServer.ServerImpl.main(ServerImpl.java:150)<BR>Caused by: java.lang.IllegalArgumentException: setCacheMode(): caching mode -1 is invalid<BR> at org.jboss.cache.TreeCache.setCacheMode(TreeCache.java:928)<BR> at org.jboss.cache.TreeCache.setCacheMode(TreeCache.java:909)<BR> ... 9 more<BR>org.jboss.cache.ConfigureException: configure(): can't invoke setCacheMode to configure TreeCache properties. Exception: java.lang.reflect.InvocationTargetException<BR> at org.jboss.cache.PropertyConfigurator.configure(PropertyConfigurator.java:220)<BR> at org.jboss.cache.PropertyConfigurator.configure(PropertyConfigurator.java:161)<BR> at org.usyd.sit.perfEvalServer.ServerImpl.initCache(ServerImpl.java:60)<BR> at org.usyd.sit.perfEvalServer.ServerImpl.<init>(ServerImpl.java:45)<BR> at org.usyd.sit.perfEvalServer.ServerImpl.main(ServerImpl.java:150)<BR>
<BR>
<BR> <BR>
<FONT color=#0000ff>Following is my xml file</FONT><BR>
<BR>
<BR>
<?xml version="1.0" encoding="UTF-8"?><BR>
<!-- ===================================================================== --><BR><!-- --><BR><!-- Sample TreeCache Service Configuration --><BR><!-- --><BR><!-- ===================================================================== --><BR>
<server><BR>
<classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/><BR>
<BR> <!-- ==================================================================== --><BR> <!-- Defines TreeCache configuration --><BR> <!-- ==================================================================== --><BR>
<mbean code="org.jboss.cache.TreeCache"<BR> name="jboss.cache:service=TreeCache"><BR>
<depends>jboss:service=Naming</depends><BR> <depends>jboss:service=TransactionManager</depends><BR>
<!--<BR> Configure the TransactionManager<BR> --><BR> <attribute name="TransactionManagerLookupClass">org.jboss.cache.DummyTransactionManagerLookup</attribute><BR>
<!--<BR> Isolation level : SERIALIZABLE<BR> REPEATABLE_READ (default)<BR> READ_COMMITTED<BR> READ_UNCOMMITTED<BR> NONE<BR> --><BR> <attribute name ="IsolationLevel">REPEATABLE_READ</attribute><BR>
<!--<BR> Valid modes are LOCAL<BR> REPL_ASYNC<BR> REPL_SYNC<BR> INVALIDATION_ASYNC<BR> INVALIDATION_SYNC<BR> FRESHNESS_ASYNC<BR> FRESHNESS_GROUP_ASYNC<BR> INVALIDATION_FINEGRAIN<BR> --><BR> <attribute name="CacheMode">FRESHNESS_ASYNC</attribute><BR>
<BR> <!--<BR> Freshness limit, in ms<BR> --><BR> <attribute name="FreshnessLimit">1000</attribute><BR>
<!--<BR> Just used for async repl: use a replication queue<BR> --><BR> <attribute name="UseReplQueue">false</attribute><BR>
<!--<BR> Replication interval for replication queue (in ms)<BR> --><BR> <attribute name="ReplQueueInterval">0</attribute><BR>
<!--<BR> Max number of elements which trigger replication<BR> --><BR> <attribute name="ReplQueueMaxElements">0</attribute><BR>
<!-- Name of cluster. Needs to be the same for all clusters, in order<BR> to find each other<BR> --><BR> <attribute name="ClusterName">TreeCache-Cluster</attribute><BR>
<!-- JGroups protocol stack properties. Can also be a URL,<BR> e.g. file:/home/bela/default.xml<BR> <attribute name="ClusterProperties"></attribute><BR> --><BR>
<attribute name="ClusterConfig"><BR> <config><BR> <!-- UDP: if you have a multihomed machine,<BR> set the bind_addr attribute to the appropriate NIC IP address --><BR> <!-- UDP: On Windows machines, because of the media sense feature<BR> being broken with multicast (even after disabling media sense)<BR> set the loopback attribute to true --><BR> <UDP mcast_addr="228.1.2.3" mcast_port="48866" bind_addr="129.78.97.10"<BR> ip_ttl="64" ip_mcast="true"<BR> mcast_send_buf_size="150000" mcast_recv_buf_size="80000"<BR> ucast_send_buf_size="150000" ucast_recv_buf_size="80000"<BR> loopback="false"/><BR> <PING timeout="2000" num_initial_members="3"<BR> up_thread="false" down_thread="false"/><BR> <MERGE2 min_interval="10000" max_interval="20000"/><BR> <!-- <FD shun="true" up_thread="true" down_thread="true" />--><BR> <FD_SOCK/><BR> <VERIFY_SUSPECT timeout="1500"<BR>
up_thread="false" down_thread="false"/><BR> <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"<BR> max_xmit_size="8192" up_thread="false" down_thread="false"/><BR> <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"<BR> down_thread="false"/><BR> <pbcast.STABLE desired_avg_gossip="20000"<BR> up_thread="false" down_thread="false"/><BR> <FRAG frag_size="8192"<BR> down_thread="false" up_thread="false"/><BR> <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"<BR> shun="true" print_local_addr="true"/><BR> <pbcast.STATE_TRANSFER up_thread="true" down_thread="true"/><BR> </config><BR> </attribute><BR>
<!--<BR> Whether or not to fetch state on joining a cluster<BR> NOTE this used to be called FetchStateOnStartup and has been renamed to be more descriptive.<BR> --><BR> <attribute name="FetchInMemoryState">true</attribute><BR>
<!--<BR> The max amount of time (in milliseconds) we wait until the<BR> initial state (ie. the contents of the cache) are retrieved from<BR> existing members in a clustered environment<BR> --><BR> <attribute name="InitialStateRetrievalTimeout">20000</attribute><BR>
<!--<BR> Number of milliseconds to wait until all responses for a<BR> synchronous call have been received.<BR> --><BR> <attribute name="SyncReplTimeout">20000</attribute><BR>
<!--<attribute name="NodeLockingScheme">OPTIMISTIC</attribute>--><BR>
<!-- Max number of milliseconds to wait for a lock acquisition --><BR> <attribute name="LockAcquisitionTimeout">15000</attribute><BR>
<BR> <!-- Name of the eviction policy class. --><BR> <attribute name="EvictionPolicyClass"></attribute><BR>
<BR> <!--<BR> Indicate whether to use region based marshalling or not. Set this to true if you are running under a scoped<BR> class loader, e.g., inside an application server. Default is "false".<BR> --><BR> <attribute name="UseRegionBasedMarshalling">false</attribute><BR> </mbean><BR></server><BR><BR>
<BR>
Thanks<BR>
Meena<BR><br /><hr />Connect to the next generation of MSN Messenger <a href='http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline' target='_new'>Get it now! </a></body>
</html>