Bernard,  while I am NO expert on CAS, and I haven't even got it working on 
LDAP yet, I do know that you need to add the dbcp dependency to your pom.xlm:

 

                <dependency>

                        <groupId>commons-dbcp</groupId>

                        <artifactId>commons-dbcp</artifactId>

                        <version>1.2.2</version>

                        <scope>runtime</scope>

                </dependency>

 

And if your still getting the hibernate errors listed below, add these 
dependencies as well.

 

                <dependency>

                    <groupId>org.hibernate</groupId>

                    <artifactId>hibernate-entitymanager</artifactId>

                    <version>3.3.1.ga</version>

                </dependency>

                <dependency>

                    <groupId>org.hibernate</groupId>

                    <artifactId>hibernate</artifactId>

                    <version>3.2.5.ga</version>

                </dependency>

 

Hope this helps!

 

Rob.

From: Bernard Debord [mailto:[email protected]] 
Sent: Tuesday, May 11, 2010 7:53 AM
To: [email protected]
Subject: Re: [cas-user] FastBindLdapAuthenticationHandler with cas-version 3.4.2

 

Hello,

Adding the following dependency enables maven a successfull build.
             <repository>
                 <id>jboss</id>
                 <name>JBoss Repository</name>
                 <url>http://repository.jboss.org/maven2</url>
             </repository>

Then the deployement in tomcat 6 fails due to unknown classes. 
Some were related to Spring framework, I added some new dependencies extracted 
from http://www.ja-sig.org/svn/cas3/trunk/pom.xml and the errors disappeared.
But now the missing classes are from apache : 
org.apache.commons.dbcp.BasicDataSource and I dont know what dependency to add.
Here is the message from catalina.out :

2010-05-11 12:32:27,045 ERROR [org.springframework.web.context.ContextLoader] - 
<Context initialization failed>
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'servicesManager' defined in ServletContext resource 
[/WEB-INF/spring-configuration/applicationContext.xml]: Cannot resolve 
reference to bean 'serviceRegistryDao' while setting constructor argument; 
nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'serviceRegistryDao' defined in ServletContext 
resource [/WEB-INF/deployerConfigContext.xml]: Cannot resolve reference to bean 
'entityManagerFactory' while setting bean property 'entityManagerFactory'; 
nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'entityManagerFactory' defined in ServletContext 
resource [/WEB-INF/deployerConfigContext.xml]: Cannot resolve reference to bean 
'dataSource' while setting bean property 'dataSource'; nested exception is 
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find 
class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'dataSource' 
defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]; nested 
exception is java.lang.ClassNotFoundException: 
org.apache.commons.dbcp.BasicDataSource



I think I am missing something, in the process. I follow the documentation 
http://www.ja-sig.org/wiki/display/CASUM/LDAP 
and the only modification of the configuration concerns 
deployerConfigContext.xml file where two beans are added
<bean id="contextSource" 
class="org.springframework.ldap.core.support.LdapContextSource">
...
<bean class="org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler" >
...
Is there another documentation to read in order to deploy cas with 
FastBindLdapAuthenticationHandler ?

Thanks for your help.

Scott Battaglia a écrit : 

Try adding the repository for JBoss (I believe its repository.jboss.org/maven2) 
to your pom file.

You can see an example here:
http://www.ja-sig.org/svn/cas3/trunk/pom.xml



On Mon, May 10, 2010 at 11:29 AM, Bernard Debord <[email protected]> 
wrote:

Hello,

I'm following the Best Practice "Setting Up CAS Locally using the Maven2 WAR 
Overlay Method 
<http://wiki/display/CASUM/Best+Practice+-+Setting+Up+CAS+Locally+using+the+Maven2+WAR+Overlay+Method>
 ".

All works fine till the "Replace the Default Authentication Method with 
Something Else".

At this step, I would like to use LDAP authentification method ; I choose the 
"FastBindLdapAuthenticationHandler".

My pom.xml is following :

        <?xml version="1.0" encoding="UTF-8"?>
        <project xmlns="http://maven.apache.org/POM/4.0.0"; 
<http://maven.apache.org/POM/4.0.0> 
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
<http://www.w3.org/2001/XMLSchema-instance> 
                 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd"; 
<http://maven.apache.org/POM/4.0.0http:/maven.apache.org/xsd/maven-4.0.0.xsd> >
                <modelVersion>4.0.0</modelVersion>
                <groupId>edu.university.cas</groupId>
                <artifactId>local-cas</artifactId>
                <packaging>war</packaging>
                <version>1.0-SNAPSHOT</version>
        
                <build>
                        <plugins>
                                <plugin>
                                     <artifactId>maven-war-plugin</artifactId>
                                     <configuration>
                                         <warName>cas</warName>
                                     </configuration>
                                </plugin>
                        </plugins>
                </build>
        
                <dependencies>
                        <dependency>
                                <groupId>org.jasig.cas</groupId>
                                <artifactId>cas-server-webapp</artifactId>
                                <version>${cas.version}</version>
                                <type>war</type>
                                <scope>runtime</scope>
                        </dependency>
        
                        <dependency>
                               <groupId>org.jasig.cas</groupId>
                               <artifactId>cas-server-support-ldap</artifactId>
                               <version>${cas.version}</version>
                        </dependency>
        
                </dependencies>
        
                <properties>
                     <cas.version>3.4.2</cas.version>
                </properties>
        
                <repositories>
                     <repository>
                          <id>ja-sig</id>
                          
<url>http://oss.sonatype.org/content/repositories/releases/</url>
                     </repository>
                </repositories>
        </project>


Then mvn clean package results in :

        [INFO] 
------------------------------------------------------------------------
        [ERROR] BUILD ERROR
        [INFO] 
------------------------------------------------------------------------
        [INFO] Failed to resolve artifact.
        
        Missing:
        ----------
        1) org.hibernate:hibernate-core:jar:3.5.0-CR-2
        
          Try downloading the file manually from the project website.
        
          Then, install it using the command: 
              mvn install:install-file -DgroupId=org.hibernate 
-DartifactId=hibernate-core -Dversion=3.5.0-CR-2 -Dpackaging=jar 
-Dfile=/path/to/file
        
          Alternatively, if you host your own repository you can deploy the 
file there: 
              mvn deploy:deploy-file -DgroupId=org.hibernate 
-DartifactId=hibernate-core -Dversion=3.5.0-CR-2 -Dpackaging=jar 
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
        
          Path to dependency: 
                1) edu.university.cas:local-cas:war:1.0-SNAPSHOT
                2) org.jasig.cas:cas-server-support-ldap:jar:3.4.2
                3) org.jasig.cas:cas-server-core:jar:3.4.2
                4) org.hibernate:hibernate-annotations:jar:3.5.0-CR-2
                5) org.hibernate:hibernate-core:jar:3.5.0-CR-2
        
        2) org.hibernate:hibernate-commons-annotations:jar:3.2.0.Beta1
        
          Try downloading the file manually from the project website.
        
          Then, install it using the command: 
              mvn install:install-file -DgroupId=org.hibernate 
-DartifactId=hibernate-commons-annotations -Dversion=3.2.0.Beta1 
-Dpackaging=jar -Dfile=/path/to/file
        
          Alternatively, if you host your own repository you can deploy the 
file there: 
              mvn deploy:deploy-file -DgroupId=org.hibernate 
-DartifactId=hibernate-commons-annotations -Dversion=3.2.0.Beta1 
-Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
        
          Path to dependency: 
                1) edu.university.cas:local-cas:war:1.0-SNAPSHOT
                2) org.jasig.cas:cas-server-support-ldap:jar:3.4.2
                3) org.jasig.cas:cas-server-core:jar:3.4.2
                4) org.hibernate:hibernate-annotations:jar:3.5.0-CR-2
                5) org.hibernate:hibernate-commons-annotations:jar:3.2.0.Beta1
        
        3) org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0-CR-1
        
          Try downloading the file manually from the project website.
        
          Then, install it using the command: 
              mvn install:install-file 
-DgroupId=org.hibernate.javax.persistence -DartifactId=hibernate-jpa-2.0-api 
-Dversion=1.0.0-CR-1 -Dpackaging=jar -Dfile=/path/to/file
        
          Alternatively, if you host your own repository you can deploy the 
file there: 
              mvn deploy:deploy-file -DgroupId=org.hibernate.javax.persistence 
-DartifactId=hibernate-jpa-2.0-api -Dversion=1.0.0-CR-1 -Dpackaging=jar 
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
        
          Path to dependency: 
                1) edu.university.cas:local-cas:war:1.0-SNAPSHOT
                2) org.jasig.cas:cas-server-support-ldap:jar:3.4.2
                3) org.jasig.cas:cas-server-core:jar:3.4.2
                4) org.hibernate:hibernate-annotations:jar:3.5.0-CR-2
                5) 
org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0-CR-1
        
        ----------
        3 required artifacts are missing.
        
        for artifact: 
          edu.university.cas:local-cas:war:1.0-SNAPSHOT
        
        from the specified remote repositories:
          ja-sig (http://oss.sonatype.org/content/repositories/releases/),
          central (http://repo1.maven.org/maven2)
        
        
        
        [INFO] 
------------------------------------------------------------------------
        [INFO] For more information, run Maven with the -e switch
        [INFO] 
------------------------------------------------------------------------
        [INFO] Total time: 10 seconds
        [INFO] Finished at: Mon May 10 17:22:21 CEST 2010
        [INFO] Final Memory: 11M/28M
        [INFO] 
------------------------------------------------------------------------



If I try to use version 3.1.1 for cas-server-support-ldap maven buid the projet 
but the deployement fails in tomcat6 because of some missing class.

Thanks for your help.



-- 
______________________________________________________________________
 
 Bernard DEBORD
 D.S.I. Grenoble Universités
 351 av. de la bibliothèque  38400 St Martin d'Hères
 Tél: (33 0)4 56 52 90 53   Fax: (33 0)4 56 52 90 01
______________________________________________________________________ 
-- 
You are currently subscribed to [email protected] as: 
[email protected]
 
 
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

 

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user






-- 
______________________________________________________________________
 
 Bernard DEBORD
 D.S.I. Grenoble Universités
 351 av. de la bibliothèque  38400 St Martin d'Hères
 Tél: (33 0)4 56 52 90 53   Fax: (33 0)4 56 52 90 01
______________________________________________________________________ 
-- 

You are currently subscribed to [email protected] as: 
[email protected]

To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to