-- You are currently subscribed to cas-...@lists.jasig.org as: cas-user-ga...@googlegroups.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-...@lists.jasig.org as: mmoa...@unicon.net
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
-- You are currently subscribed to cas-...@lists.jasig.org as: jasig-cas-user...@googlegroups.com
Andy,
I just saw your message. I don’t claim to know much here, as I am slogging my through this on my own, but here is the part of my setup that got me on the road to authenticating with mysql. I believe that the original out of the box war that I used already had the mysql connector included, so no build necessary.
The relevant part of my deployerConfigContext.xml is here:
<!--
Adding the JDBC authentication related configuration
-->
<bean id="primaryAuthenticationHandler" class="org.jasig.cas.adaptors.jdbc.SearchModeSearchDatabaseAuthenticationHandler"
abstract="false" lazy-init="default" autowire="default" >
<property name="tableUsers"><value>main</value></property>
<property name="fieldUser"><value>userid</value></property>
<property name="fieldPassword"><value>ssn</value></property>
<!--<property name="passwordEncoder" ref="defaultPasswordEncoder"/>-->
<property name="dataSource" ref="dataSource"/>
</bean>
<!-- Data source definition -->
<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://address.of.mysqlserver:3306/mydatabasename</value>
</property>
<property name="username"><value>mysqlrootusername</value></property>
<property name="password"><value>mysqlrootuserpassword</value></property>
</bean>
Regards,
Christopher Adams
You are currently subscribed to cas-...@lists.jasig.org as: chris....@state.or.us
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
-- You are currently subscribed to cas-...@lists.jasig.org as: jasig-cas-user...@googlegroups.com
-- You are currently subscribed to cas-...@lists.jasig.org as: andy....@mail.ic.edu
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
"An ocean refuses no river."- Sheila Chandra
Andy,
If it helps, here is the section in my pom.xml that indicates the mysql dependency:
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.13</version>
<scope>runtime</scope>
</dependency>
From: Andy Turner [mailto:andy....@mail.ic.edu]
Sent: Wednesday, January 07, 2015 12:09 PM
To: cas-...@lists.jasig.org
Subject: Re: [cas-user] Building cas-server with mysql as a backend
hi, the pom.xml is here, i can't get maven to "find" the jars that it downloads, so i can't do "build clean package" because it keeps failing, but if i do "build clean package -DskipTests=true, it builds the war file, but i get error 404 when navigating to /cas/login in the browser. The jars are in the right place pulled down by the dependencies /cas/target/WEB-INF/lib i think. I think my classpath isn't right, i don't know what it is supposed to be set to. I'm on centos, with ~/.bash_profile having an entry for classpath=/usr/lib/jvm/<jdk version for java 7>/jre/lib/ext/ <all the jars maven pulled down>
You are currently subscribed to cas-...@lists.jasig.org as: chris....@state.or.us
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
-- You are currently subscribed to cas-...@lists.jasig.org as: jasig-cas-user...@googlegroups.com
Andy,
It seems that I had the same problem when I was first trying to build a war using the maven overlay. I was trying to build from source instead of letting maven pull in the dependencies as needed. I still have not completely wrapped my head around it, but I am making small steps in one direction now. :>)
I utilized this: https://github.com/UniconLabs/simple-cas4-overlay-template
Create a directory and copy the template data and build from there using ‘mvn clean package’.
Then move your war file to the /tomcat/webapps directory. You can then add the mysql authentication information as I mentioned in a previous post.
Regards,
Chris
Chris,
Thanks a lot! I will try it.
sent via mobile
- please email help...@ic.edu to generate a work order
my availability: http://www.google.com/calendar/embed?src=andy.turner%40mail.ic.edu&ctz=America/Chicago
Have you done this? Create a /etc/cas directory and copy the two files to it. Then restart Tomcat. I found evidence of a problem in the tomcat logs and then realized that, other than modifying paths in the code, this was the easiest way to just get it done. Hope this helps.
If that is not the problem, do check the logs for some other reason that the page is not being found.
Make sure that your URL has the actual name of the deployed war, like https://myserfer.com:8443/cas, where cas.war is the deployed war file.
The etc directory contains the sample configuration files that would need to be copied to an external file system location (/etc/cas by default) and configured to satisfy local CAS installation needs. Current files are:
Andy,
Good deal ! I was just going to comment that maybe you needed to set the classpath to the java directory. I don’t have a CLASSPATH set on my CentOS environment. Apparently, the default CLASSPATH is the “working directory”, so I guess in this situation it is as you found out.
I will be interested to see where you take it from here, since I am now not much farther along than you.
POM.XML
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/maven-v4_0_0.xsd">
-- You are currently subscribed to cas-...@lists.jasig.org as: dkopy...@unicon.net
To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user