Thank you, I was able to solve the problem by including relevant jars.
Now I am getting the below error. Looks like there is some issue with the 
/WEB-INF/classes/jbossTicketCacheReplicationConfig.xml (please find the xml 
below)

-------------------------------------------------------------------------------------------------------------------------------------------------------------
2010-06-15 09:37:54,806 ERROR [org.springframework.web.context.ContextLoader] - 
Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'centralAuthenticationService' defined in ServletContext resource 
[/WEB-INF/spring-configuration/applicationContext.xml]: Cannot resolve 
reference to bean 'ticketRegistry' while setting bean property 
'ticketRegistry'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'ticketRegistry' defined in ServletContext resource 
[/WEB-INF/spring-configuration/ticketRegistry.xml]: Cannot resolve reference to 
bean 'cache' while setting bean property 'cache'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'cache' defined in ServletContext resource 
[/WEB-INF/spring-configuration/ticketRegistry.xml]: Invocation of init method 
failed; nested exception is java.lang.NoSuchMethodError: 
org.jboss.cache.xml.XmlHelper.getDocumentRoot(Ljava/io/InputStream;)Lorg/w3c/dom/Element;
        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
        at java.security.AccessController.doPrivileged(Native Method)

Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'ticketRegistry' defined in ServletContext resource 
[/WEB-INF/spring-configuration/ticketRegistry.xml]: Cannot resolve reference to 
bean 'cache' while setting bean property 'cache'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'cache' defined in ServletContext resource 
[/WEB-INF/spring-configuration/ticketRegistry.xml]: Invocation of init method 
failed; nested exception is java.lang.NoSuchMethodError: 
org.jboss.cache.xml.XmlHelper.getDocumentRoot(Ljava/io/InputStream;)Lorg/w3c/dom/Element;
        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
        at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)

Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'cache' defined in ServletContext resource 
[/WEB-INF/spring-configuration/ticketRegistry.xml]: Invocation of init method 
failed; nested exception is java.lang.NoSuchMethodError: 
org.jboss.cache.xml.XmlHelper.getDocumentRoot(Ljava/io/InputStream;)Lorg/w3c/dom/Element;
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)

Caused by: java.lang.NoSuchMethodError: 
org.jboss.cache.xml.XmlHelper.getDocumentRoot(Ljava/io/InputStream;)Lorg/w3c/dom/Element;
        at 
org.jboss.cache.factories.XmlConfigurationParser.parseStream(XmlConfigurationParser.java:100)
        at 
org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:145)
        at 
org.jasig.cas.util.JBossCacheFactoryBean.afterPropertiesSet(JBossCacheFactoryBean.java:49)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)

-------------------------------------------------------------------------------------------------------------------------------------------------------------
jbossTicketCacheReplicationConfig.xml
-------------------------------------------------------------------------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!--                                                                       -->
<!--  Sample TreeCache Service Configuration                               -->
<!--                                                                       -->
<!-- ===================================================================== -->
<server>
     <!-- ==================================================================== 
-->
    <!-- Defines TreeCache configuration                                      
-->
    <!-- ==================================================================== 
-->
    <mbean code="org.jboss.cache.TreeCache"
        name="jboss.cache:service=TreeCache">
        <depends>jboss:service=Naming</depends>
<!-- Commented for CAS clustering 
        <depends>jboss:service=TransactionManager</depends>
-->
<!--
        Configure the TransactionManager
 -->
<!-- Commented for CAS clustering 
        <attribute 
name="TransactionManagerLookupClass">org.jboss.cache.transaction.DummyTransactionManagerLookup</attribute>
-->
<!--
            Isolation level : SERIALIZABLE
                              REPEATABLE_READ (default)
                              READ_COMMITTED
                              READ_UNCOMMITTED
                              NONE
-->
        <attribute name="IsolationLevel">REPEATABLE_READ</attribute>

<!--
             Valid modes are LOCAL
                             REPL_ASYNC
                             REPL_SYNC
                             INVALIDATION_ASYNC
                             INVALIDATION_SYNC
-->
        <attribute name="CacheMode">REPL_SYNC</attribute>
<!--
        Just used for async repl: use a replication queue
-->
        <attribute name="UseReplQueue">false</attribute>
<!--
            Replication interval for replication queue (in ms)
-->
        <attribute name="ReplQueueInterval">0</attribute>
<!--
            Max number of elements which trigger replication
-->
        <attribute name="ReplQueueMaxElements">0</attribute>
<!-- Name of cluster. Needs to be the same for all clusters, in order
             to find each other
-->
        <attribute name="ClusterName">TreeCache-Cluster</attribute>
<!-- JGroups protocol stack properties. Can also be a URL,
             e.g. file:/home/bela/default.xml
           <attribute name="ClusterProperties"></attribute>
-->
        <attribute name="ClusterConfig">
            <config>
<!-- UDP: if you have a multihomed machine,
                set the bind_addr attribute to the appropriate NIC IP address, 
e.g bind_addr="192.168.0.2"
-->
<!-- UDP: On Windows machines, because of the media sense feature
                 being broken with multicast (even after disabling media sense)
                 set the loopback attribute to true -->
                <UDP mcast_addr="x.x.x.x" mcast_port="9998"
                    ip_ttl="1" ip_mcast="true" bind_addr=" x.x.x.x "
                    mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
                    ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
                    loopback="false"/>
                <PING timeout="2000" num_initial_members="3"
                    up_thread="false" down_thread="false"/>
                <MERGE2 min_interval="10000" max_interval="20000"/>
                <!--        <FD shun="true" up_thread="true" down_thread="true" 
/>-->
                <FD_SOCK/>
                <VERIFY_SUSPECT timeout="1500"
                    up_thread="false" down_thread="false"/>
                <pbcast.NAKACK gc_lag="50" 
retransmit_timeout="600,1200,2400,4800"
                    max_xmit_size="8192" up_thread="false" down_thread="false"/>
                <UNICAST timeout="600,1200,2400" window_size="100" 
min_threshold="10"
                    down_thread="false"/>
                <pbcast.STABLE desired_avg_gossip="20000"
                    up_thread="false" down_thread="false"/>
                <FRAG frag_size="8192"
                    down_thread="false" up_thread="false"/>
                <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
                    shun="true" print_local_addr="true"/>
                <pbcast.STATE_TRANSFER up_thread="true" down_thread="true"/>
            </config>
        </attribute>
        <!--
         Whether or not to fetch state on joining a cluster
         NOTE this used to be called FetchStateOnStartup and has been renamed 
to be more descriptive.
        -->
        <attribute name="FetchInMemoryState">true</attribute>
        <!--
            The max amount of time (in milliseconds) we wait until the
            initial state (ie. the contents of the cache) are retrieved from
            existing members in a clustered environment
        -->
        <attribute name="InitialStateRetrievalTimeout">15000</attribute>
        <!--
            Number of milliseconds to wait until all responses for a
            synchronous call have been received.
        -->
        <attribute name="SyncReplTimeout">15000</attribute>
        <!-- Max number of milliseconds to wait for a lock acquisition -->
        <attribute name="LockAcquisitionTimeout">10000</attribute>
        <!-- Name of the eviction policy class. -->
        <attribute name="EvictionPolicyClass"></attribute>
       <!--
          Indicate whether to use marshalling or not. Set this to true if you 
are running under a scoped
          class loader, e.g., inside an application server. Default is "false".
       -->
        <attribute name="UseMarshalling">false</attribute>
                <attribute name="StateTransferVersion">130</attribute>
        <!--attribute name="CacheLoaderConfiguration">
            <config>
                <passivation>false</passivation>
                <preload>/</preload>
                <shared>false</shared>
                <cacheloader>
                    <class>org.jboss.cache.loader.ClusteredCacheLoader</class>
                    <properties>
                        timeout=1000
                    </properties>
                    <async>false</async>
                    <fetchPersistentState>false</fetchPersistentState>
                    <ignoreModifications>false</ignoreModifications>
                </cacheloader>
            </config>
        </attribute-->
    </mbean>
</server>

-------------------------------------------------------------------------------------------------------------------------------------------------------------



Thanks & Regards,
Gokula

-----Original Message-----
From: Tobias Trelle [mailto:tobias.tre...@proximity.de] 
Sent: Wednesday, June 09, 2010 6:19 PM
To: cas-user@lists.jasig.org
Subject: Re:[cas-user] Need help on Clustering CAS


>[/WEB-INF/spring-configuration/ticketRegistry.xml]: Initialization of bean
failed; nested exception is java.lang.NoClassDefFoundError:
org/jboss/cache/Cache
>               at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)

This is a class loading problem. JBOSS by default uses (IIRC) an isolated
classloading strategy for web application. The class org.jboss.cache.Cache
is not part of the classpath of the CAS server webapp.

Try this:

a) add a dependency to the JBOSS Cache artifact to the cas server pom,
rebuild, redeploy

b) change JBOSS' class loading policy so that the global cache libs
(somewhere in %JBOSS_HOME%/lib or somewhere else) are visible from your web
app (I don't exactly how to this, the last JBOSS project was some years ago)

HTH
-- 
Tobias
-- 
View this message in context: 
http://jasig.275507.n4.nabble.com/Re-Need-help-on-Clustering-CAS-tp2248793p2248793.html
Sent from the CAS Users mailing list archive at Nabble.com.

-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
gokula_krish...@infosys.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to