[cas-dev] CAS is Unavailable ??

Edward Chen edwardc at wolfram.com
Thu Apr 10 11:20:44 EDT 2008


I follow the instruction below but it doesn't work. I don't know what I 
miss. I have the following error


   CAS is Unavailable

There was a fatal error initializing the CAS application context. This 
is almost always because of an error in the Spring bean configuration 
files. Are the files valid XML? Do the beans they refer to all exist?
.....

Below is what I modify. I have mysql installed in my PC, the mysql 
server name is "edwardcwin.wri.wolfram.com"

               <bean id="SearchModeSearchDatabaseAuthenticationHandler"
                 
class="org.jasig.cas.adaptors.jdbc.SearchModeSearchDatabaseAuthenticationHandler" 

                 abstract="false" singleton="true" lazy-init="default" 
autowire="default" dependency-check="default">
                 <property  name="tableUsers">
                  <value>users</value>
                 </property>
                 <property name="fieldUser">
                  <value>user_id</value>
                 </property>
                 <property name="fieldPassword">
                  <value>password</value>
                 </property>
                 <property name="dataSource" ref="dataSource" />
               </bean>

               <bean 
class="org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler">
                 <property name="dataSource" ref="dataSource" />
                 <property name="sql" value="select password from users 
where lower(username) = lower(?)" />
               </bean>

           </list>
       </property>
   </bean>

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">
 <value>oracle.jdbc.driver.OracleDriver</value>
</property>
<property name="url">
 <value>jdbc:oracle:thin:@database-server-name:1521:SID</value>
</property>
<property name="username">
 <value>admusr</value>
</property>
<property name="password">
 <value>admpwd</value>
</property>
</bean>

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">
 <value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
 <value>jdbc:mysql://edwardcwin.wri.wolfram.com:3306/login</value>
</property>
<property name="username">
 <value>admusr</value>
</property>
<property name="password">
 <value>admpwd</value>
</property>
</bean>

</beans>

Also, from your instruction, I download "cas-server-jdbc-3.0.5.jar" into 
%CATALINA_HOME%/webapps/cas/WEB-INF/lib
I got confused if I need to download ojdbc14.jar (this is the Oracle 
JDBC Driver) or mysql-connector-java-5.1.5-bin.jar (this is the mysql 
driver) into ..cas/WEB-INF/lib

How about

   * commons-collections-3.2.jar
   * commons-dbcp-1.2.1.jar
   * commons-pool-1.3.jar


Also, do I need to write a java handler file into C:\Program 
Files\Apache Software Foundation\Tomcat 
5.5\webapps\servlets-examples\WEB-INF\classes
in order to do the authentication???


Thanks,


Edward



More information about the cas-dev mailing list