Hi Guillaume, > For example* :** …Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'contextSource' is defined…* * * Okay. The cause of that specifically is that there's no bean named "contextSource" defined. :)* *
So you've got this bean declaring the LDAP authentication handler: <bean class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler" p:filter="sAMAccountName=%u" p:searchBase="cn=cas.user,dc=bordeaux,dc=archi,dc=fr" p:contextSource-ref="contextSource" p:ignorePartialResultException="true" /> So far so good. But this bean had a dependency on another bean named "contextSource. That's what the p:contextSource-ref="contextSource" is saying. It's saying there's a setContextSource() method on the BindLdapAuthenticationHandler instance and we want Spring to call that setter, injecting in the bean named "contextSource". (Spring knows it's a reference to a bean because of the "-ref" in the property name.). It's dense but one gets used it it surprisingly fast. Anyway. One immediate problem with your deployerConfigContext.xml is that there *isn't* a bean named "contextSource" for Spring to find and inject. Hence the error message you're getting. You need to define a bean named "contextSource" that is an LDAP context source. See "Define a Context Source" in this documentation: https://wiki.jasig.org/display/CASUM/LDAP . Hope this helps, Andrew On Wed, Dec 12, 2012 at 6:37 AM, Guillaume Dépinay < guillaume.depi...@bordeaux.archi.fr> wrote: > Hello,**** > > Thanks for so quick answers.**** > > ** ** > > Under the dependency under pom.xml ** ** > > <dependency> <groupId>${project.groupId}</groupId> > <artifactId>cas-server-support-ldap</artifactId> > <version>${project.version}</version> </dependency>**** > > Change the following**** > > ${project.version} to 3.4.11 and rebuild your project**** > > ** ** > > I did dit but nothing change.**** > > ** ** > > As said by M. Addison, there’s issues to fix when tomcat deploy.**** > > It seems to be wrong bean and context source declarations in > deployerConfigContext.xml. **** > > For example* :** …Caused by: > org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean > named 'contextSource' is defined…* > > I’m pretty young with xml (more than in English ☺ ) so I check further in > logs, give tries with what I’ll find and I tell you.**** > > ** ** > > Why 3.4.11 ?**** > > Because when I tried first time it to deploy cas, it was the last stable > version.**** > > Also, I followed a tutorial with this one so I thought it ‘ll be better to > keep the same version.**** > > ** ** > > ** ** > > Thanks again for help.**** > > Good day**** > > ** ** > > ** ** > > De : Farzan Qureshi [mailto:fqure...@rosmini.school.nz] ** ** > > Envoyé : mardi 11 décembre 2012 19:05**** > > À : cas-user@lists.jasig.org**** > > Objet : Re: [cas-user] HTTP status 404**** > > ** ** > > Hi,**** > > Under the dependency under pom.xml ** ** > > <dependency> <groupId>${project.groupId}</groupId> > <artifactId>cas-server-support-ldap</artifactId> > <version>${project.version}</version> </dependency>**** > > Change the following**** > > ${project.version} to 3.4.11 and rebuild your project with**** > > mvn clean install **** > > Just wondering why you are not running current version of CAS that is > 3.5.1.**** > > I configured my CAS few days ago with my ldap. Let us know if you need > further help.**** > > I followed instructions on following link**** > > > https://wiki.jasig.org/display/CASU/Best+Practice+-+Setting+Up+CAS+Locally+using+the+Maven2+WAR+Overlay+Method > **** > > Farzan Qureshi **** > > ------------------**** > > Rosmini College**** > > Network Administrator & Helpdesk support **** > > Sent from my SIII**** > > Hye,**** > > ** ** > > I'm new to CAS and I try to make it work in our school.**** > > Everything's work fine in demo version.**** > > ** ** > > So I make changes in deployerConfigContext.xml and pom.xml to authenticate > with our Active Directory.**** > > ** ** > > When I build my project I got the message BUILD SUCCESS.**** > > Then I copy cas.war in /var/lib/tomcat6/webapps and reload tomcat deamon.* > *** > > ** ** > > My issue is when I try to reconnect with my browser, I get 404 error :**** > > ---------------------**** > > HTTP Status 404 -**** > > type Status report**** > > message description The requested resource () is not available.**** > > ---------------------**** > > ** ** > > So, I put back original files, build again and everything's back to normal > (demo).**** > > I guess it's something wrong in my conf but I 've been searching 3 days > for nothing. If someone s' got a clue, I 'll be thankful.**** > > ** ** > > The modifications I made :**** > > In cas-server-3.4.11/cas-server-webapp/pom.xml I declare ldap dependency : > **** > > --------------------**** > > <dependency>**** > > <groupId>${project.groupId}</groupId>**** > > <artifactId>cas-server-support-ldap</artifactId>**** > > <version>${project.version}</version>**** > > </dependency>**** > > ---------------------**** > > ** ** > > In > cas-server-3.4.11/cas-server-webapp/src/main/webapp/WEB-INF/deployerConfigContext > I add bean adaptatorLdap and ldap context.**** > > ** ** > > ---------------------**** > > <property name="authenticationHandlers">**** > > <list>**** > > <bean > class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler" > **** > > p:httpClient-ref="httpClient" />** > ** > > ** ** > > <bean > class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler"**** > > p:filter="sAMAccountName=%u"**** > > > p:searchBase="cn=cas-user,dc=bordeaux,dc=archi,dc=fr"**** > > > p:contextSource-ref="contextSource"**** > > > p:ignorePartialResultException="true" />**** > > </list>**** > > </property>**** > > ** ** > > ** ** > > <bean id="auditTrailManager" > class="com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager" >* > *** > > <bean id="contextSource" > class="org.springframework.ldap.core.support.LdapContextSource">**** > > <property name="pooled" value="false"/>**** > > <property name="url" value="ldap:// > 192.168.190.5:389" />**** > > <property name="userDn" > value="cn=cas-user,cn=Users,dc=bordeaux,dc=archi,dc=fr"/>**** > > <property name="password" value="P@ssword"/>**** > > <property name="baseEnvironmentProperties">**** > > <map>**** > > <entry > key="com.sun.jndi.ldap.connect.timeout" value="3000" />**** > > <entry > key="com.sun.jndi.ldap.read.timeout" value="3000" />**** > > <entry > key="java.naming.security.authentication" value="simple" />**** > > </map>**** > > </property>**** > > </bean>**** > > </bean>**** > > ---------------------**** > > ** ** > > Here's the documentation I've been follow for AD authentication => > http://www.artduweb.com/tutoriels/cas-sso**** > > ** ** > > My conf :**** > > Centos 6 x86 VM Ware**** > > CAS 3.4.11**** > > Apache-maven 3.0.4**** > > Tomcat 6**** > > Open JDK 1.6**** > > ** ** > > Thanks for any idea and good evening.**** > > ** ** > > __________________________________________**** > > ** ** > > Guillaume DEPINAY**** > > Service Informatique**** > > ENSAP Bordeaux**** > > 740 cours de la Libération**** > > BP 70109 - 33405 Talence cedex**** > > Tel : 33 (0) 5.57.35.11.43**** > > Mel : guillaume.depi...@bordeaux.archi.fr**** > > Web : http://www.bordeaux.archi.fr**** > > ___________________________________________**** > > ** ** > > ** ** > > ** ** > > --**** > > You are currently subscribed to cas-user@lists.jasig.org as: > fqure...@rosmini.school.nz**** > > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/cas-user**** > > ** ** > > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify the system manager ( > ad...@rosmini.school.nz). Please note that any views or opinions > presented in this email are solely those of the author and do not > necessarily represent those of the company. Finally, the recipient should > check this email and any attachments for the presence of viruses. Rosmini > College accepts no liability for any damage caused by any virus transmitted > by this email. **** > > -- **** > > You are currently subscribed to cas-user@lists.jasig.org as: > guillaume.depi...@bordeaux.archi.fr**** > > 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: ape...@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-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