HttpBasedServiceCredentialsAuthenticationHandler [CAS-444]bug
Scott Battaglia
scott.battaglia at gmail.com
Thu Apr 26 23:35:57 EDT 2007
Your problem actually is CAS bug CAS-444. If you look at your stack trace
you will see:
"Invocation of init method failed; nested exception is
java.lang.IllegalArgumentException: Note, this behavior has changed from the
CAS 3.0.6 behavior. You now MUST specify an instance of HttpClient. Before
it would create an instance for you."
All you need to do is copy in the definition for the
HttpBasedServiceCredentialsAuthenticationHandler from 3.0.7 which includes a
reference to HttpClient and replace the definition in your current
deployerConfigContext.xml.
That should it.
-Scott
On 4/26/07, Rodriguez, Unai <Unai.Rodriguez at behringer.com> wrote:
>
> Hey Scott,
>
> Yeah you are right. Allow me to clarify my situation.
>
> In order to install CAS Server 3.0.7 I went through the following steps:
>
> 1) Download and unpack the file:
> http://www.ja-sig.org/downloads/cas/cas-server-3.0.7.tar.gz
>
> 2) Get the necessary jar files and put them under the "localPlugins/lib/"
> directory:
> cas-server-ldap-3.0.7.jar
> spring-ldap-1.1.2.jar
> ldapbp-1.0.jar (I got this one based on one of your responses within this
> thread -- THANKS)
>
> 3) Configure "webapp/WEB-INF/deployerConfigContext.xml". (I am using the
> same configuration in my working CAS 3.0.5 installation)
>
> 4) Build and deploy
>
> 5) I get the same error as Gaetan:
>
>
> ----------------------------------------------------------------------------------------
>
> 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?
>
> Before placing CAS in production, you should change this page to present a
> UI appropriate for the case where the CAS web application is fundamentally
> broken. Perhaps "Sorry, CAS is currently unavailable." with some links to
> your user support information.
>
> The Throwable encountered at context listener initialization was:
>
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'centralAuthenticationService' defined in ServletContext
> resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
> 'authenticationManager' while setting bean property 'authenticationManager';
> nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'authenticationManager' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]: Cannot create inner bean '
> org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler#181ed9e'
> of type [
> org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler]
> while setting bean property 'authenticationHandlers' with key [0]; nested
> exception is org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name '
> org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler#181ed9e'
> defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]:
> Invocation of init method failed; nested exception is
> java.lang.IllegalArgumentException: Note, this behavior has changed from
> the CAS 3.0.6 behavior. You now MUST specify an instance of HttpClient.
> Before it would create an instance for you.
>
> The Throwable encountered at dispatcher servlet initialization was:
>
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'centralAuthenticationService' defined in ServletContext
> resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
> 'authenticationManager' while setting bean property 'authenticationManager';
> nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'authenticationManager' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]: Cannot create inner bean '
> org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler#181ed9e'
> of type [
> org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler]
> while setting bean property 'authenticationHandlers' with key [0]; nested
> exception is org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name '
> org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler#181ed9e'
> defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]:
> Invocation of init method failed; nested exception is
> java.lang.IllegalArgumentException: Note, this behavior has changed from
> the CAS 3.0.6 behavior. You now MUST specify an instance of HttpClient.
> Before it would create an instance for you.
>
> ----------------------------------------------------------------------------------------
>
> The reason why I included all these other jar files is because it seemed
> that someone was missing so I included all the jars from:
> spring-ldap-bin-with-dependencies-1.1.2.zip
>
> I am using right now CAS 3.0.5. It worked fine. Am I missing something?
>
> Thank all you guys so much!!!
>
>
>
>
> Kind Regards,
>
> RODRIGUEZ, Unai
>
>
> ________________________________
>
> From: cas-bounces at tp.its.yale.edu [mailto:cas-bounces at tp.its.yale.edu] On
> Behalf Of Scott Battaglia
> Sent: Thursday, April 26, 2007 8:10 PM
> To: Yale CAS mailing list
> Subject: Re: HttpBasedServiceCredentialsAuthenticationHandler [CAS-444]bug
>
>
> That's not the actual exception. There should be more than that
> that. However, it looks like you have two ldapbp jars in your lib
> folder. You're also adding additional Spring jars that don't need to be
> there as the project includes Spring.
>
> -Scott
>
>
> On 4/26/07, Rodriguez, Unai <Unai.Rodriguez at behringer.com> wrote:
>
> Dear Gaetan,
>
> I found the same error as you:
>
> "org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name..."
>
> This is currently the contents of my localPlugins/lib folder:
>
> #ls -l /opt/cas-server-3.0.7/localPlugins/lib/
> total 1848
> -rw-r--r-- 1 root root 13431 2007-04-26 09:32
> cas-server-ldap-3.0.7.jar
> -rw-r--r-- 1 root root 559366 2007-04-26 15:55
> commons-collections.jar
> -rw-r--r-- 1 root root 207723 2007-04-26 15:55 commons-lang.jar
> -rw-r--r-- 1 root root 38015 2007-04-26 15:55
> commons-logging.jar
> -rw-r--r-- 1 root root 49437 2007-02-02 21:47 ldapbp-1.0.jar
> -rw-r--r-- 1 root root 49437 2007-04-26 15:55 ldapbp.jar
> -rw-r--r-- 1 root root 71 2007-02-02 04:39 README.txt
> -rw-r--r-- 1 root root 373325 2007-04-26 15:55 spring-beans.jar
> -rw-r--r-- 1 root root 122078 2007-04-26 15:55 spring-context.jar
> -rw-r--r-- 1 root root 172430 2007-04-26 15:55 spring-core.jar
> -rw-r--r-- 1 root root 123817 2007-04-26 15:55 spring-dao.jar
> -rw-r--r-- 1 root root 110756 2007-04-26 15:55
> spring-ldap-1.1.2.jar
>
> 1) Could you please list the files on your localPlugins/lib
> directory?
>
> 2) Is there any other place where you include .jar files?
>
> Kind Regards,
>
> RODRIGUEZ, Unai
>
>
>
> ________________________________
>
> From: cas-bounces at tp.its.yale.edu <mailto:
> cas-bounces at tp.its.yale.edu> [mailto:cas-bounces at tp.its.yale.edu] On
> Behalf Of Gaetan Dardy
> Sent: Thursday, April 26, 2007 2:35 PM
> To: Yale CAS mailing list
> Subject: Re: HttpBasedServiceCredentialsAuthenticationHandler
> [CAS-444]bug
>
>
> That's what I feared.
> Thanks for all.
>
> Gaëtan.
>
>
> Scott Battaglia a écrit :
>
> The Spring LDAP distribution should include all of the
> necessary jars for Spring LDAP. "ant war" would not have caught it as all
> of the items have already been compiled.
>
> Glad to hear it worked for you!
> -Scott
>
>
> On 4/25/07, Gaetan Dardy <gdardy at free.fr> wrote:
>
> Damned ! It works.
>
> Where are the documentation's pages i've missed !!
> I thought the 'ant war' wouldn't have been
> successful if files were missing...
> Is there a way to check dependencies ?
>
> And yes, this has nothing to do with 444, but at
> first, i had also a problem with my 'deployerConfigContext.xml' ;-)
>
> Thanks for your help and the fantastic job you
> (and the team) are doing here.
> This mailing list is more efficient and faster
> than most of the (costly) hotlines I know.
>
> Gaetan.
>
> Scott Battaglia a écrit :
>
> Gaetan,
>
> This has nothing to do with CAS-444. It
> means you're missing one JAR file :-) Try including this jar:
>
> http://developer.ja-sig.org/maven2/com/sun/jndi/ldap/ldapbp/1.0/ldapbp-1.0.jar<
> http://developer.ja-sig.org/maven2/com/sun/jndi/ldap/ldapbp/1.0/ldapbp-1.0.jar
> > <
> http://developer.ja-sig.org/maven2/com/sun/jndi/ldap/ldapbp/1.0/ldapbp-1.0.jar<
> http://developer.ja-sig.org/maven2/com/sun/jndi/ldap/ldapbp/1.0/ldapbp-1.0.jar>
> >
>
> -Scott
>
>
> On 4/25/07, Gaetan Dardy <gdardy at free.fr>
> wrote:
>
> Hi again,
>
> I've used the '
> deployerConfigContext.xml' in webapp/WEB-INF and configured it. The error
> changes but it still doesn't work.
> So i've drop down the 3.0.7 and
> tried again the 3.0.5 with both 'fast bind' and 'search'. It works well.
> Then, I started all over from
> scratch (and used 'spring-ldap-1.1.2.jar' and ' cas-server-ldap-3.0.7.jar
> ').
> And I still have the message
> below. I'm feeling such a fool !
>
> Thnaks for your help.
>
> Gaetan.
>
>
> ------------------------------------------------------------------------------
>
>
> The Throwable encountered at
> context listener initialization was:
>
>
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'centralAuthenticationService' defined in ServletContext
> resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
> 'authenticationManager' while setting bean property 'authenticationManager';
> nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'authenticationManager' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]: Cannot create inner bean '
> org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler#41dde0' of
> type [org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler] while
> setting bean property 'authenticationHandlers' with key [1]; nested
> exception is org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name '
> org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler#41dde0'
> defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]:
> Cannot resolve reference to bean 'contextSource' while setting bean property
> 'contextSource'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'contextSource' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]: Instantiation of bean failed; nested
> exception is java.lang.NoClassDefFoundError:
> com.sun.jndi.ldap.ctl.ResponseControlFactory
>
> The Throwable encountered at
> dispatcher servlet initialization was:
>
>
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'centralAuthenticationService' defined in ServletContext
> resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
> 'authenticationManager' while setting bean property 'authenticationManager';
> nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'authenticationManager' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]: Cannot create inner bean '
> org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler#41dde0' of
> type [org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler] while
> setting bean property 'authenticationHandlers' with key [1]; nested
> exception is org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name '
> org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler#41dde0'
> defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]:
> Cannot resolve reference to bean 'contextSource' while setting bean property
> 'contextSource'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'contextSource' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]: Instantiation of bean failed; nested
> exception is java.lang.NoClassDefFoundError:
> com.sun.jndi.ldap.ctl.ResponseControlFactory
>
>
>
> Scott Battaglia a écrit :
>
> That is just a sample of
> how to configure ldap handlers. The config
> file in webapp/WEB-INF is
> the production config. Configure your LDAP
> stuff in that.
>
> -Scott
>
> On 4/18/07, Gaetan Dardy
>
> <gdardy at free.fr> <mailto:
> gdardy at free.fr <mailto:gdardy at free.fr> > wrote:
>
>
> I've used the "
> deployerConfigContext.xml" located in
> adaptors/ldap/target/classes
> and customized it :
> I've modified the
> "
> org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler
> " bean
>
> and the next one i.e.
> "contextSource".
> (I've also compared it to
> the one in the "cas-server-3.0.7/target
> directory/cas-
> server-ldap-3.0.7.jar".
> What puzzled me is that
> the error is exactly the same as
>
> 3.0.7 RC2 release.
>
> I read carefully the LDAP
> part of the Server Deployment 's documentation
> (
>
>
> http://www.ja-sig.org/products/cas/server/ldapauthhandler/index.html <
> http://www.ja-sig.org/products/cas/server/ldapauthhandler/index.html> <
> http://www.ja-sig.org/products/cas/server/ldapauthhandler/index.html> )
> and i've tried both
> fastbind and search-and-bind authentication with
> the same result.
>
> Does it help ?
>
> Gaëtan.
>
> Scott Battaglia a écrit :
>
>
>
>
> What exactly are you
> experiencing? CAS-444 means you are now required
> to inject an instance of
> HttpClient into the
> HttpBasedServiceCredentaislAuthenticationHandler
> which the default
> deployerConfigContext.xml
>
> does for you.
>
> -Scott
>
> On 4/18/07, *Gaetan Dardy*
> <gdardy at free.fr
>
> <mailto: gdardy at free.fr>
> <mailto:gdardy at free.fr> >
> wrote:
>
> Hi,
>
> I had successfully
> tested CAS 3.0.5 with a LDAP authentication
> handler.
> Since I switched to
> the final 3.0.7, I'm still having the
>
>
> HttpBasedServiceCredentialsAuthenticationHandler
> trouble
> ([CAS-444] bug).
> I read all the release
> notes and documentation I've found, but I'm
> unable to make it
> work.
>
> Am I the only one ?
>
>
> Is there something I
> missed ?
>
> Best regards,
>
> Gaëtan Dardy.
>
>
> _______________________________________________
> Yale CAS mailing list
>
>
> cas at tp.its.yale.edu<mailto:
> cas at tp.its.yale.edu <mailto:cas at tp.its.yale.edu> > <mailto:
> cas at tp.its.yale.edu> <mailto:cas at tp.its.yale.edu>
>
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
>
>
> --
> -Scott Battaglia
>
> LinkedIn:
> http://www.linkedin.com/in/scottbattaglia
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> Yale CAS mailing list
>
>
> cas at tp.its.yale.edu<mailto:
> cas at tp.its.yale.edu> <mailto:cas at tp.its.yale.edu>
>
> http://tp.its.yale.edu/mailman/listinfo/cas <
> http://tp.its.yale.edu/mailman/listinfo/cas>
>
>
>
>
>
>
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu <mailto:
> cas at tp.its.yale.edu>
>
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
>
>
>
>
> --
> -Scott Battaglia
>
> LinkedIn:
> http://www.linkedin.com/in/scottbattaglia <
> http://www.linkedin.com/in/scottbattaglia <
> http://www.linkedin.com/in/scottbattaglia> >
> ________________________________
>
>
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
>
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas <
> http://tp.its.yale.edu/mailman/listinfo/cas>
>
>
>
>
>
>
> --
> -Scott Battaglia
>
> LinkedIn: http://www.linkedin.com/in/scottbattaglia
> ________________________________
>
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas <
> http://tp.its.yale.edu/mailman/listinfo/cas>
>
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
>
>
>
> --
> -Scott Battaglia
>
> LinkedIn: http://www.linkedin.com/in/scottbattaglia <
> http://www.linkedin.com/in/scottbattaglia>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>
--
-Scott Battaglia
LinkedIn: http://www.linkedin.com/in/scottbattaglia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas/attachments/20070426/74519d77/attachment.html
More information about the cas
mailing list