mod_auth_cas: CAS behind proxy

19 messages Options
Embed this post
Permalink
Volker Krebs

mod_auth_cas: CAS behind proxy

Reply Threaded More More options
Print post
Permalink
Hello,
I've set up my Apache using mod_auth_cas, everything works fine, great
module. Thank you for that!
But when my CAS moves behind a web-proxy I get an error
[error] [client 192.168.4.158] MOD_AUTH_CAS: connect() failed to
https://cas.example.com/sso/login?service=http%3a%2f%2fgeier%2fvk

The Problem is, that I need a https_proxy varaible to connect to
https://cas.example.com/. But I have no clue where to configure it in
apache or mod_auth_cas. I've tried setting the environment variable
https_proxy and http_proxy but apache or mod_auth_cas seem not to be
interested.
Any Ideas ?

Thanks
_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas
Matthew Jones-7

Building CAS

Reply Threaded More More options
Print post
Permalink
Up until now all I have been doing is deploying CAS from the downloaded
.war file and adding the Spring LDAP jars manually. I now want to move
to being able to build a custom .war file that contains the required
LDAP jars and then move on to writing a custom authentication handler
for our combined X509 certificates and username /pasword.

I have installed maven2 and already have the CAS 3.3 download as that's
what I have deployed to our test system. Is that sufficient for what I
want to do? Is there any basic guide for novices starting along this line?

I do have eclipse installed although I haven't used it for anything
related to CAS although I have seen using Eclipse mentioned. Is this the
recommended approach? I'm after the simplest approach to set this up so
I'm happy to follow any reasonable approach especially as this isn't in
my normal working set currently.

All help and advice gratefully received.

Thanks

--
Matthew Jones
Interactive Data Managed Solutions Ltd
-----------------------------------------------------------------------
Registered in England Company Number 3691868
Registered Office: Fitzroy House, 13-17 Epworth Street, London, EC2A 4DL
Tel: +44 (0)1242 694133 | Fax: +44 (0)1242 694109
[hidden email]
http://www.interactivedata-ms.com/694133

This message (including any files transmitted with it) may contain
confidential and/or proprietary information, is the property of
Interactive Data Corporation and/or its subsidiaries, and is directed
only to the addressee(s). If you are not the designated recipient or
have reason to believe you received this message in error, please delete
this message from your system and notify the sender immediately. An
unintended recipient's disclosure, copying, distribution, or use of this
message or any attachments is prohibited and may be unlawful.
Interactive Data (Europe) Ltd Registered No. 949387 England Registered
Office: Fitzroy House 13-17 Epworth Street. London. EC2A 4DL



_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas

smime.p7s (3K) Download Attachment
Phil Ames-2

Re: mod_auth_cas: CAS behind proxy

Reply Threaded More More options
Print post
Permalink
In reply to this post by Volker Krebs
Hi Volker,
Sorry for the delay in responding to you.  Unfortunately at this time,
mod_auth_cas does not support proxy usage for ticket validation.  It
is a feature that might be added when we get around to using libcurl
(or some other HTTP library) to perform the ticket validation.  In the
meantime, you might be able to modify the code to manually perform the
HTTP 'CONNECT' operation but I don't know if that will suit your
needs.

HTH,
-Phil

On Mon, Oct 6, 2008 at 9:28 AM, Volker Krebs <[hidden email]> wrote:

> Hello,
> I've set up my Apache using mod_auth_cas, everything works fine, great
> module. Thank you for that!
> But when my CAS moves behind a web-proxy I get an error
> [error] [client 192.168.4.158] MOD_AUTH_CAS: connect() failed to
> https://cas.example.com/sso/login?service=http%3a%2f%2fgeier%2fvk
>
> The Problem is, that I need a https_proxy varaible to connect to
> https://cas.example.com/. But I have no clue where to configure it in
> apache or mod_auth_cas. I've tried setting the environment variable
> https_proxy and http_proxy but apache or mod_auth_cas seem not to be
> interested.
> Any Ideas ?
>
> Thanks
> _______________________________________________
> Yale CAS mailing list
> [hidden email]
> http://tp.its.yale.edu/mailman/listinfo/cas
>
_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas
Thai Nguyen

Re: Building CAS

Reply Threaded More More options
Print post
Permalink
In reply to this post by Matthew Jones-7
Hi Matthew,

Maven2 and CAS-3.3 are all you need.
Here is what I did:

o I used Eclispe but after installing the Maven plug-in, eclipse
treats all my projects as Maven projects and if it could not find
pom.xml in a project, it complains about it. So I removed the plug-in
and use Eclispe as a editor. I know the purpose of the plug-in is to
eliminate the manual process as I will described below and more. But
for now I will not use it until I have more time to figure it out.
Hopefully, someone can have some input on this.

o When you untar the CAS-3.3 you will find the directory
cas-server-webapp, use that directory to create a Java project in
Eclipse.
NOTE: If you have mvn in your PATH, you can go to the
cas-server-webapp and run the command: mvn package
First time you run, Maven will download some files (you need internet
connection)
It should success building and create cas-server-webapp/target/cas.war file.
This should be the same as CAS-3.3/modules/cas-server-webapp-3.3.war
file that include in the download

To modify CAS to support authenticate against LDAP:
All files mention below are relative to the cas-server-webapp directory
o Modify pom.xml file and add:
----------------------------------------------
<dependency>
                        <groupId>org.jasig.cas</groupId>
                        <artifactId>cas-server-support-ldap</artifactId>
                        <version>${project.version}</version>
</dependency>
---------------------------------------------
in between the <dependencies>

o Modify src/main/webapp/WEB-INF/deployerConfigContext.xml and replace:
  org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler
with
  org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler

and add:
------------------------------------------------
<bean id="contextSource"
class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
                <property name="pool" value="true" />
                <property name="urls">
                        <list>
                                <value>ldap://your-ldap-server:389</value>
                        </list>
                </property>
                <property name="baseEnvironmentProperties">
                        <map>
                                <entry>
                                        <key>
                                                <value>java.naming.security.authentication</value>
                                        </key>
                                        <value>simple</value></entry></map></property>
                <property name="userName">
                        <value>your-cn-of-the-access-or-anonymous</value></property>
                <property name="password">
                        <value>depend-on-anonymous-access</value>
                </property>
        </bean>
----------------------------------------------------------
in between the <beans>

o Now if you go back the prompt and run: mvn package again, maven will
download the spring ldap jar files for you and include in the newly
build cas.war

Hope that help! (please update if you found any trouble)

Thai Nguyen

On Tue, Oct 7, 2008 at 4:29 AM, Matthew Jones
<[hidden email]> wrote:

> Up until now all I have been doing is deploying CAS from the downloaded .war
> file and adding the Spring LDAP jars manually. I now want to move to being
> able to build a custom .war file that contains the required LDAP jars and
> then move on to writing a custom authentication handler for our combined
> X509 certificates and username /pasword.
>
> I have installed maven2 and already have the CAS 3.3 download as that's what
> I have deployed to our test system. Is that sufficient for what I want to
> do? Is there any basic guide for novices starting along this line?
>
> I do have eclipse installed although I haven't used it for anything related
> to CAS although I have seen using Eclipse mentioned. Is this the recommended
> approach? I'm after the simplest approach to set this up so I'm happy to
> follow any reasonable approach especially as this isn't in my normal working
> set currently.
>
> All help and advice gratefully received.
>
> Thanks
>
> --
> Matthew Jones
> Interactive Data Managed Solutions Ltd
> -----------------------------------------------------------------------
> Registered in England Company Number 3691868
> Registered Office: Fitzroy House, 13-17 Epworth Street, London, EC2A 4DL
> Tel: +44 (0)1242 694133 | Fax: +44 (0)1242 694109
> [hidden email]
> http://www.interactivedata-ms.com/694133
>
> This message (including any files transmitted with it) may contain
> confidential and/or proprietary information, is the property of Interactive
> Data Corporation and/or its subsidiaries, and is directed only to the
> addressee(s). If you are not the designated recipient or have reason to
> believe you received this message in error, please delete this message from
> your system and notify the sender immediately. An unintended recipient's
> disclosure, copying, distribution, or use of this message or any attachments
> is prohibited and may be unlawful.
> Interactive Data (Europe) Ltd Registered No. 949387 England Registered
> Office: Fitzroy House 13-17 Epworth Street. London. EC2A 4DL
>
>
> _______________________________________________
> Yale CAS mailing list
> [hidden email]
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas
Matt Smith-21

Re: mod_auth_cas: CAS behind proxy

Reply Threaded More More options
Print post
Permalink
In reply to this post by Volker Krebs
Currently, mod_auth_cas performs the service validation via direct
socket calls, not an HTTP library.  So, the HTTP capabilities are
limited to a very basic HTTP/1.0 GET .  There is no support for
proxies or anything fancy.

We have discussed the possibility of using libcurl, which would offer
much functionality at the expense of a new dependency, but have not
had the time to do anything beyond bugfixes in a while.

-Matt

On Mon, Oct 6, 2008 at 9:28 AM, Volker Krebs <[hidden email]> wrote:

> Hello,
> I've set up my Apache using mod_auth_cas, everything works fine, great
> module. Thank you for that!
> But when my CAS moves behind a web-proxy I get an error
> [error] [client 192.168.4.158] MOD_AUTH_CAS: connect() failed to
> https://cas.example.com/sso/login?service=http%3a%2f%2fgeier%2fvk
>
> The Problem is, that I need a https_proxy varaible to connect to
> https://cas.example.com/. But I have no clue where to configure it in
> apache or mod_auth_cas. I've tried setting the environment variable
> https_proxy and http_proxy but apache or mod_auth_cas seem not to be
> interested.
> Any Ideas ?
>
> Thanks
> _______________________________________________
> Yale CAS mailing list
> [hidden email]
> http://tp.its.yale.edu/mailman/listinfo/cas
>



--
[hidden email]
Key ID:D6EEC5B5
_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas
Volker Krebs

Re: mod_auth_cas: CAS behind proxy

Reply Threaded More More options
Print post
Permalink
In reply to this post by Phil Ames-2
Ok, thank you.
I'll figure out a solution with our sys admin.

Phil Ames schrieb:

> Hi Volker,
> Sorry for the delay in responding to you.  Unfortunately at this time,
> mod_auth_cas does not support proxy usage for ticket validation.  It
> is a feature that might be added when we get around to using libcurl
> (or some other HTTP library) to perform the ticket validation.  In the
> meantime, you might be able to modify the code to manually perform the
> HTTP 'CONNECT' operation but I don't know if that will suit your
> needs.
>
> HTH,
> -Phil
>
> On Mon, Oct 6, 2008 at 9:28 AM, Volker Krebs <[hidden email]> wrote:
>> Hello,
>> I've set up my Apache using mod_auth_cas, everything works fine, great
>> module. Thank you for that!
>> But when my CAS moves behind a web-proxy I get an error
>> [error] [client 192.168.4.158] MOD_AUTH_CAS: connect() failed to
>> https://cas.example.com/sso/login?service=http%3a%2f%2fgeier%2fvk
>>
>> The Problem is, that I need a https_proxy varaible to connect to
>> https://cas.example.com/. But I have no clue where to configure it in
>> apache or mod_auth_cas. I've tried setting the environment variable
>> https_proxy and http_proxy but apache or mod_auth_cas seem not to be
>> interested.
>> Any Ideas ?
>>
>> Thanks

_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas
Matthew Jones-7

Re: Building CAS

Reply Threaded More More options
Print post
Permalink
In reply to this post by Thai Nguyen
Hi Thai,

I have skipped the Eclipse part and am trying just to build from the
command line. I have edited the pom.xml and deployerContextConfig.xml
files appropriately for the CAS I wish to deploy (that I have running
having patched the deployed .war file that I downloaded). I am using
OpenLDAP I'm using the "ordinary" LDAP binder rather than the fast one.

After running mvn package in the appropriate directory I get a cas.war
file in the target sub-directory and I then try to deploy that. When
this is deployed, it does indeed appear to have added the Spring LDAP
.jar files that I previously added manually but the .war file doesn't
deploy successfully.

Anyway, the "highlights" of catalina.out are as follows and I really
don't understand the one about cas.log. It is there and is owned by
Tomcat. This is the same Tomcat instance that I have the downloaded war
file deployed on and edited. Indeed, I can still start this CAS server
and it still appears to function correctly (it is under
/cas-server-webapp-3.3 in the Tomcat manager rather than my built one
which is under /cas)

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: cas.log (Permission denied)
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: cas.log (Permission denied)

2008-10-06 17:35:00,692 ERROR
[org.springframework.web.context.ContextLoader] - <Context
initialization failed>
java.lang.NoClassDefFoundError: org/springframework/core/SmartClassLoader
     at java.lang.ClassLoader.defineClass1(Native Method)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
     at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
2008-10-06 17:35:00,701 FATAL
[org.jasig.cas.web.init.SafeContextLoaderListener] -
<SafeContextLoaderListener:
The Spring ContextLoaderListener we wrap threw on contextInitialized.
But for our having caught this error, the web application context would
not have initialized.>
java.lang.NoClassDefFoundError: org/springframework/core/SmartClassLoader

SafeContextLoaderListener:
The Spring ContextLoaderListener we wrap threw on contextInitialized.
But for our having caught this error, the web application context would
not have initialized.
java.lang.NoClassDefFoundError: org/springframework/core/SmartClassLoader

2008-10-06 17:35:00,709 ERROR
[org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cas]] -
<SafeContextLoaderListener:
The Spring ContextLoaderListener we wrap threw on contextInitialized.
But for our having caught this error, the web application context would
not have initialized.>
java.lang.NoClassDefFoundError: org/springframework/core/SmartClassLoader

2008-10-06 17:35:00,742 ERROR
[org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cas]] -
<Exception starting filter springSecurityFilterChain>
java.lang.NoClassDefFoundError:
org/springframework/beans/PropertyAccessorFactory
     at
org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:165)
2008-10-06 17:35:00,755 ERROR
[org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cas]] -
<Exception starting filter CAS Client Info Logging Filter>
java.lang.NoClassDefFoundError:
org/springframework/beans/PropertyAccessorFactory
     at
org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:165)
Oct 6, 2008 5:35:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Oct 6, 2008 5:35:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/cas] startup failed due to previous errors
Oct 6, 2008 5:35:00 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive cas-server-webapp-3.3.war
2008-10-06 17:35:08,938 INFO
[org.jasig.cas.web.flow.AuthenticationViaFormAction] - <FormObjectClass
not set.  Using default class of
org.jasig.cas.authentication.principal.UsernamePasswordCredentials with
formObjectName credentials and validator
org.jasig.cas.validation.UsernamePasswordCredentialsValidator.>

All of which makes me think I have missed something fundemental in my
configuration somewhere. I am trying to build the war file on Ubuntu
8.04 AMD64 with the following:
# mvn --version
Maven version: 2.0.8
Java version: 1.6.0_06
OS name: "linux" version: "2.6.24-19-generic" arch: "amd64" Family: "unix"

The last part of the output from the mvn package command run the
cas-server-webapp is as follows:

[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 14 seconds
[INFO] Finished at: Thu Oct 09 15:13:22 BST 2008
[INFO] Final Memory: 21M/52M
[INFO]
------------------------------------------------------------------------

which implies it worked. I have assumed that I don't actually need any
of the Eclipse part for this to work.

> Maven2 and CAS-3.3 are all you need.
> Here is what I did:
>
> o I used Eclispe but after installing the Maven plug-in, eclipse
> treats all my projects as Maven projects and if it could not find
> pom.xml in a project, it complains about it. So I removed the plug-in
> and use Eclispe as a editor. I know the purpose of the plug-in is to
> eliminate the manual process as I will described below and more. But
> for now I will not use it until I have more time to figure it out.
> Hopefully, someone can have some input on this.
>
> o When you untar the CAS-3.3 you will find the directory
> cas-server-webapp, use that directory to create a Java project in
> Eclipse.
> NOTE: If you have mvn in your PATH, you can go to the
> cas-server-webapp and run the command: mvn package
> First time you run, Maven will download some files (you need internet
> connection)
> It should success building and create cas-server-webapp/target/cas.war file.
> This should be the same as CAS-3.3/modules/cas-server-webapp-3.3.war
> file that include in the download
>
> To modify CAS to support authenticate against LDAP:
> All files mention below are relative to the cas-server-webapp directory
> o Modify pom.xml file and add:
> ----------------------------------------------
> <dependency>
> <groupId>org.jasig.cas</groupId>
> <artifactId>cas-server-support-ldap</artifactId>
> <version>${project.version}</version>
> </dependency>
> ---------------------------------------------
> in between the <dependencies>
>
> o Modify src/main/webapp/WEB-INF/deployerConfigContext.xml and replace:
>   org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler
> with
>   org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler
>
> and add:
> ------------------------------------------------
> <bean id="contextSource"
> class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
> <property name="pool" value="true" />
> <property name="urls">
> <list>
> <value>ldap://your-ldap-server:389</value>
> </list>
> </property>
> <property name="baseEnvironmentProperties">
> <map>
> <entry>
> <key>
> <value>java.naming.security.authentication</value>
> </key>
> <value>simple</value></entry></map></property>
> <property name="userName">
> <value>your-cn-of-the-access-or-anonymous</value></property>
> <property name="password">
> <value>depend-on-anonymous-access</value>
> </property>
> </bean>
> ----------------------------------------------------------
> in between the <beans>
>
> o Now if you go back the prompt and run: mvn package again, maven will
> download the spring ldap jar files for you and include in the newly
> build cas.war
>
> Hope that help! (please update if you found any trouble)
>
> Thai Nguyen
>
> On Tue, Oct 7, 2008 at 4:29 AM, Matthew Jones
> <[hidden email]> wrote:
>> Up until now all I have been doing is deploying CAS from the downloaded .war
>> file and adding the Spring LDAP jars manually. I now want to move to being
>> able to build a custom .war file that contains the required LDAP jars and
>> then move on to writing a custom authentication handler for our combined
>> X509 certificates and username /pasword.
>>
>> I have installed maven2 and already have the CAS 3.3 download as that's what
>> I have deployed to our test system. Is that sufficient for what I want to
>> do? Is there any basic guide for novices starting along this line?
>>
>> I do have eclipse installed although I haven't used it for anything related
>> to CAS although I have seen using Eclipse mentioned. Is this the recommended
>> approach? I'm after the simplest approach to set this up so I'm happy to
>> follow any reasonable approach especially as this isn't in my normal working
>> set currently.
>>
>> All help and advice gratefully received.
>>
>> Thanks
--
Matthew Jones
Interactive Data Managed Solutions Ltd
-----------------------------------------------------------------------
Registered in England Company Number 3691868
Registered Office: Fitzroy House, 13-17 Epworth Street, London, EC2A 4DL
Tel: +44 (0)1242 694133 | Fax: +44 (0)1242 694109
[hidden email]
http://www.interactivedata-ms.com/694133

This message (including any files transmitted with it) may contain
confidential and/or proprietary information, is the property of
Interactive Data Corporation and/or its subsidiaries, and is directed
only to the addressee(s). If you are not the designated recipient or
have reason to believe you received this message in error, please delete
this message from your system and notify the sender immediately. An
unintended recipient's disclosure, copying, distribution, or use of this
message or any attachments is prohibited and may be unlawful.
Interactive Data (Europe) Ltd Registered No. 949387 England Registered
Office: Fitzroy House 13-17 Epworth Street. London. EC2A 4DL



_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas

smime.p7s (3K) Download Attachment
Scott Battaglia-2

Re: Building CAS

Reply Threaded More More options
Print post
Permalink
Try using Maven 2.0.9 to build. You're pulling in multiple Spring versions.

Also, set write permissions on that cas log or directory for the Tomact user.
-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia


On Thu, Oct 9, 2008 at 10:20 AM, Matthew Jones <[hidden email]> wrote:
Hi Thai,

I have skipped the Eclipse part and am trying just to build from the command line. I have edited the pom.xml and deployerContextConfig.xml files appropriately for the CAS I wish to deploy (that I have running having patched the deployed .war file that I downloaded). I am using OpenLDAP I'm using the "ordinary" LDAP binder rather than the fast one.

After running mvn package in the appropriate directory I get a cas.war file in the target sub-directory and I then try to deploy that. When this is deployed, it does indeed appear to have added the Spring LDAP .jar files that I previously added manually but the .war file doesn't deploy successfully.

Anyway, the "highlights" of catalina.out are as follows and I really don't understand the one about cas.log. It is there and is owned by Tomcat. This is the same Tomcat instance that I have the downloaded war file deployed on and edited. Indeed, I can still start this CAS server and it still appears to function correctly (it is under /cas-server-webapp-3.3 in the Tomcat manager rather than my built one which is under /cas)

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: cas.log (Permission denied)
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: cas.log (Permission denied)

2008-10-06 17:35:00,692 ERROR [org.springframework.web.context.ContextLoader] - <Context initialization failed>
java.lang.NoClassDefFoundError: org/springframework/core/SmartClassLoader
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
2008-10-06 17:35:00,701 FATAL [org.jasig.cas.web.init.SafeContextLoaderListener] - <SafeContextLoaderListener:
The Spring ContextLoaderListener we wrap threw on contextInitialized.
But for our having caught this error, the web application context would not have initialized.>
java.lang.NoClassDefFoundError: org/springframework/core/SmartClassLoader

SafeContextLoaderListener:
The Spring ContextLoaderListener we wrap threw on contextInitialized.
But for our having caught this error, the web application context would not have initialized.
java.lang.NoClassDefFoundError: org/springframework/core/SmartClassLoader

2008-10-06 17:35:00,709 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cas]] - <SafeContextLoaderListener:
The Spring ContextLoaderListener we wrap threw on contextInitialized.
But for our having caught this error, the web application context would not have initialized.>
java.lang.NoClassDefFoundError: org/springframework/core/SmartClassLoader

2008-10-06 17:35:00,742 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cas]] - <Exception starting filter springSecurityFilterChain>
java.lang.NoClassDefFoundError: org/springframework/beans/PropertyAccessorFactory
   at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:165)
2008-10-06 17:35:00,755 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cas]] - <Exception starting filter CAS Client Info Logging Filter>
java.lang.NoClassDefFoundError: org/springframework/beans/PropertyAccessorFactory
   at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:165)
Oct 6, 2008 5:35:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Oct 6, 2008 5:35:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/cas] startup failed due to previous errors
Oct 6, 2008 5:35:00 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive cas-server-webapp-3.3.war
2008-10-06 17:35:08,938 INFO [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <FormObjectClass not set.  Using default class of org.jasig.cas.authentication.principal.UsernamePasswordCredentials with formObjectName credentials and validator org.jasig.cas.validation.UsernamePasswordCredentialsValidator.>

All of which makes me think I have missed something fundemental in my configuration somewhere. I am trying to build the war file on Ubuntu 8.04 AMD64 with the following:
# mvn --version
Maven version: 2.0.8
Java version: 1.6.0_06
OS name: "linux" version: "2.6.24-19-generic" arch: "amd64" Family: "unix"

The last part of the output from the mvn package command run the cas-server-webapp is as follows:

[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14 seconds
[INFO] Finished at: Thu Oct 09 15:13:22 BST 2008
[INFO] Final Memory: 21M/52M
[INFO] ------------------------------------------------------------------------

which implies it worked. I have assumed that I don't actually need any of the Eclipse part for this to work.


Maven2 and CAS-3.3 are all you need.
Here is what I did:

o I used Eclispe but after installing the Maven plug-in, eclipse
treats all my projects as Maven projects and if it could not find
pom.xml in a project, it complains about it. So I removed the plug-in
and use Eclispe as a editor. I know the purpose of the plug-in is to
eliminate the manual process as I will described below and more. But
for now I will not use it until I have more time to figure it out.
Hopefully, someone can have some input on this.

o When you untar the CAS-3.3 you will find the directory
cas-server-webapp, use that directory to create a Java project in
Eclipse.
NOTE: If you have mvn in your PATH, you can go to the
cas-server-webapp and run the command: mvn package
First time you run, Maven will download some files (you need internet
connection)
It should success building and create cas-server-webapp/target/cas.war file.
This should be the same as CAS-3.3/modules/cas-server-webapp-3.3.war
file that include in the download

To modify CAS to support authenticate against LDAP:
All files mention below are relative to the cas-server-webapp directory
o Modify pom.xml file and add:
----------------------------------------------
<dependency>
                       <groupId>org.jasig.cas</groupId>
                       <artifactId>cas-server-support-ldap</artifactId>
                       <version>${project.version}</version>
</dependency>
---------------------------------------------
in between the <dependencies>

o Modify src/main/webapp/WEB-INF/deployerConfigContext.xml and replace:
 org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler
with
 org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler

and add:
------------------------------------------------
<bean id="contextSource"
class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
               <property name="pool" value="true" />
               <property name="urls">
                       <list>
                               <value>ldap://your-ldap-server:389</value>
                       </list>
               </property>
               <property name="baseEnvironmentProperties">
                       <map>
                               <entry>
                                       <key>
                                               <value>java.naming.security.authentication</value>
                                       </key>
                                       <value>simple</value></entry></map></property>
               <property name="userName">
                       <value>your-cn-of-the-access-or-anonymous</value></property>
               <property name="password">
                       <value>depend-on-anonymous-access</value>
               </property>
       </bean>
----------------------------------------------------------
in between the <beans>

o Now if you go back the prompt and run: mvn package again, maven will
download the spring ldap jar files for you and include in the newly
build cas.war

Hope that help! (please update if you found any trouble)

Thai Nguyen

On Tue, Oct 7, 2008 at 4:29 AM, Matthew Jones
<[hidden email]> wrote:
Up until now all I have been doing is deploying CAS from the downloaded .war
file and adding the Spring LDAP jars manually. I now want to move to being
able to build a custom .war file that contains the required LDAP jars and
then move on to writing a custom authentication handler for our combined
X509 certificates and username /pasword.

I have installed maven2 and already have the CAS 3.3 download as that's what
I have deployed to our test system. Is that sufficient for what I want to
do? Is there any basic guide for novices starting along this line?

I do have eclipse installed although I haven't used it for anything related
to CAS although I have seen using Eclipse mentioned. Is this the recommended
approach? I'm after the simplest approach to set this up so I'm happy to
follow any reasonable approach especially as this isn't in my normal working
set currently.

All help and advice gratefully received.

Thanks

--
Matthew Jones
Interactive Data Managed Solutions Ltd
-----------------------------------------------------------------------
Registered in England Company Number 3691868
Registered Office: Fitzroy House, 13-17 Epworth Street, London, EC2A 4DL
Tel: +44 (0)1242 694133 | Fax: +44 (0)1242 694109
[hidden email]
http://www.interactivedata-ms.com/694133

This message (including any files transmitted with it) may contain confidential and/or proprietary information, is the property of Interactive Data Corporation and/or its subsidiaries, and is directed only to the addressee(s). If you are not the designated recipient or have reason to believe you received this message in error, please delete this message from your system and notify the sender immediately. An unintended recipient's disclosure, copying, distribution, or use of this message or any attachments is prohibited and may be unlawful.
Interactive Data (Europe) Ltd Registered No. 949387 England Registered Office: Fitzroy House 13-17 Epworth Street. London. EC2A 4DL


_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas



_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas
Matthew Jones-7

Re: Building CAS

Reply Threaded More More options
Print post
Permalink
> Try using Maven 2.0.9 to build. You're pulling in multiple Spring versions.

Damn! I've seen you write that before and should have doubled checked.
Then again, it is my first use of maven. Anyway, I've got 2.0.9 and
libcommons-cli-java-1.1-3 which it needed and have installed them.

I did a mvn clean and a mvn package and re-deployed cas.war to the
server without success but I'll have to look at the logs tomorrow.

> Also, set write permissions on that cas log or directory for the Tomact
> user.

That confused me. There is nothing wrong with the permission on those
files. I've had that sort of problem before but they have the correct
ownership & permissions. Indeed, I even truncated both cas.log and
catalina.out before restarting tomcat so they were there and empty and
then get information written to them.

>
> On Thu, Oct 9, 2008 at 10:20 AM, Matthew Jones <
> [hidden email]> wrote:
>
>> Hi Thai,
>>
>> I have skipped the Eclipse part and am trying just to build from the
>> command line. I have edited the pom.xml and deployerContextConfig.xml files
>> appropriately for the CAS I wish to deploy (that I have running having
>> patched the deployed .war file that I downloaded). I am using OpenLDAP I'm
>> using the "ordinary" LDAP binder rather than the fast one.
>>
>> After running mvn package in the appropriate directory I get a cas.war file
>> in the target sub-directory and I then try to deploy that. When this is
>> deployed, it does indeed appear to have added the Spring LDAP .jar files
>> that I previously added manually but the .war file doesn't deploy
>> successfully.
>>
>> Anyway, the "highlights" of catalina.out are as follows and I really don't
>> understand the one about cas.log. It is there and is owned by Tomcat. This
>> is the same Tomcat instance that I have the downloaded war file deployed on
>> and edited. Indeed, I can still start this CAS server and it still appears
>> to function correctly (it is under /cas-server-webapp-3.3 in the Tomcat
>> manager rather than my built one which is under /cas)
>>
>> log4j:ERROR setFile(null,true) call failed.
>> java.io.FileNotFoundException: cas.log (Permission denied)
>> log4j:ERROR setFile(null,true) call failed.
>> java.io.FileNotFoundException: cas.log (Permission denied)
>>
>> 2008-10-06 17:35:00,692 ERROR
>> [org.springframework.web.context.ContextLoader] - <Context initialization
>> failed>
>> java.lang.NoClassDefFoundError: org/springframework/core/SmartClassLoader
>>    at java.lang.ClassLoader.defineClass1(Native Method)
>>    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>>    at
>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>> 2008-10-06 17:35:00,701 FATAL
>> [org.jasig.cas.web.init.SafeContextLoaderListener] -
>> <SafeContextLoaderListener:
>> The Spring ContextLoaderListener we wrap threw on contextInitialized.
>> But for our having caught this error, the web application context would not
>> have initialized.>
>> java.lang.NoClassDefFoundError: org/springframework/core/SmartClassLoader
>>
>> SafeContextLoaderListener:
>> The Spring ContextLoaderListener we wrap threw on contextInitialized.
>> But for our having caught this error, the web application context would not
>> have initialized.
>> java.lang.NoClassDefFoundError: org/springframework/core/SmartClassLoader
>>
>> 2008-10-06 17:35:00,709 ERROR
>> [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cas]] -
>> <SafeContextLoaderListener:
>> The Spring ContextLoaderListener we wrap threw on contextInitialized.
>> But for our having caught this error, the web application context would not
>> have initialized.>
>> java.lang.NoClassDefFoundError: org/springframework/core/SmartClassLoader
>>
>> 2008-10-06 17:35:00,742 ERROR
>> [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cas]] -
>> <Exception starting filter springSecurityFilterChain>
>> java.lang.NoClassDefFoundError:
>> org/springframework/beans/PropertyAccessorFactory
>>    at
>> org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:165)
>> 2008-10-06 17:35:00,755 ERROR
>> [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cas]] -
>> <Exception starting filter CAS Client Info Logging Filter>
>> java.lang.NoClassDefFoundError:
>> org/springframework/beans/PropertyAccessorFactory
>>    at
>> org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:165)
>> Oct 6, 2008 5:35:00 PM org.apache.catalina.core.StandardContext start
>> SEVERE: Error filterStart
>> Oct 6, 2008 5:35:00 PM org.apache.catalina.core.StandardContext start
>> SEVERE: Context [/cas] startup failed due to previous errors
>> Oct 6, 2008 5:35:00 PM org.apache.catalina.startup.HostConfig deployWAR
>> INFO: Deploying web application archive cas-server-webapp-3.3.war
>> 2008-10-06 17:35:08,938 INFO
>> [org.jasig.cas.web.flow.AuthenticationViaFormAction] - <FormObjectClass not
>> set.  Using default class of
>> org.jasig.cas.authentication.principal.UsernamePasswordCredentials with
>> formObjectName credentials and validator
>> org.jasig.cas.validation.UsernamePasswordCredentialsValidator.>
>>
>> All of which makes me think I have missed something fundemental in my
>> configuration somewhere. I am trying to build the war file on Ubuntu 8.04
>> AMD64 with the following:
>> # mvn --version
>> Maven version: 2.0.8
>> Java version: 1.6.0_06
>> OS name: "linux" version: "2.6.24-19-generic" arch: "amd64" Family: "unix"
>>
>> The last part of the output from the mvn package command run the
>> cas-server-webapp is as follows:
>>
>> [INFO] BUILD SUCCESSFUL
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 14 seconds
>> [INFO] Finished at: Thu Oct 09 15:13:22 BST 2008
>> [INFO] Final Memory: 21M/52M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>> which implies it worked. I have assumed that I don't actually need any of
>> the Eclipse part for this to work.
>>
>>
>>  Maven2 and CAS-3.3 are all you need.
>>> Here is what I did:
>>>
>>> o I used Eclispe but after installing the Maven plug-in, eclipse
>>> treats all my projects as Maven projects and if it could not find
>>> pom.xml in a project, it complains about it. So I removed the plug-in
>>> and use Eclispe as a editor. I know the purpose of the plug-in is to
>>> eliminate the manual process as I will described below and more. But
>>> for now I will not use it until I have more time to figure it out.
>>> Hopefully, someone can have some input on this.
>>>
>>> o When you untar the CAS-3.3 you will find the directory
>>> cas-server-webapp, use that directory to create a Java project in
>>> Eclipse.
>>> NOTE: If you have mvn in your PATH, you can go to the
>>> cas-server-webapp and run the command: mvn package
>>> First time you run, Maven will download some files (you need internet
>>> connection)
>>> It should success building and create cas-server-webapp/target/cas.war
>>> file.
>>> This should be the same as CAS-3.3/modules/cas-server-webapp-3.3.war
>>> file that include in the download
>>>
>>> To modify CAS to support authenticate against LDAP:
>>> All files mention below are relative to the cas-server-webapp directory
>>> o Modify pom.xml file and add:
>>> ----------------------------------------------
>>> <dependency>
>>>                        <groupId>org.jasig.cas</groupId>
>>>                        <artifactId>cas-server-support-ldap</artifactId>
>>>                        <version>${project.version}</version>
>>> </dependency>
>>> ---------------------------------------------
>>> in between the <dependencies>
>>>
>>> o Modify src/main/webapp/WEB-INF/deployerConfigContext.xml and replace:
>>>
>>>  org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler
>>> with
>>>  org.jasig.cas.adaptors.ldap.FastBindLdapAuthenticationHandler
>>>
>>> and add:
>>> ------------------------------------------------
>>> <bean id="contextSource"
>>> class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
>>>                <property name="pool" value="true" />
>>>                <property name="urls">
>>>                        <list>
>>>                                <value>ldap://your-ldap-server:389</value>
>>>                        </list>
>>>                </property>
>>>                <property name="baseEnvironmentProperties">
>>>                        <map>
>>>                                <entry>
>>>                                        <key>
>>>
>>>  <value>java.naming.security.authentication</value>
>>>                                        </key>
>>>
>>>  <value>simple</value></entry></map></property>
>>>                <property name="userName">
>>>
>>>  <value>your-cn-of-the-access-or-anonymous</value></property>
>>>                <property name="password">
>>>                        <value>depend-on-anonymous-access</value>
>>>                </property>
>>>        </bean>
>>> ----------------------------------------------------------
>>> in between the <beans>
>>>
>>> o Now if you go back the prompt and run: mvn package again, maven will
>>> download the spring ldap jar files for you and include in the newly
>>> build cas.war
>>>
>>> Hope that help! (please update if you found any trouble)
>>>
>>> Thai Nguyen
>>>
>>> On Tue, Oct 7, 2008 at 4:29 AM, Matthew Jones
>>> <[hidden email]> wrote:
>>>
>>>> Up until now all I have been doing is deploying CAS from the downloaded
>>>> .war
>>>> file and adding the Spring LDAP jars manually. I now want to move to
>>>> being
>>>> able to build a custom .war file that contains the required LDAP jars and
>>>> then move on to writing a custom authentication handler for our combined
>>>> X509 certificates and username /pasword.
>>>>
>>>> I have installed maven2 and already have the CAS 3.3 download as that's
>>>> what
>>>> I have deployed to our test system. Is that sufficient for what I want to
>>>> do? Is there any basic guide for novices starting along this line?
>>>>
>>>> I do have eclipse installed although I haven't used it for anything
>>>> related
>>>> to CAS although I have seen using Eclipse mentioned. Is this the
>>>> recommended
>>>> approach? I'm after the simplest approach to set this up so I'm happy to
>>>> follow any reasonable approach especially as this isn't in my normal
>>>> working
>>>> set currently.
>>>>
>>>> All help and advice gratefully received.
>>>>
>>>> Thanks
>>>>
>> --
>> Matthew Jones
>> Interactive Data Managed Solutions Ltd
>> -----------------------------------------------------------------------
>> Registered in England Company Number 3691868
>> Registered Office: Fitzroy House, 13-17 Epworth Street, London, EC2A 4DL
>> Tel: +44 (0)1242 694133 | Fax: +44 (0)1242 694109
>> [hidden email]
>> http://www.interactivedata-ms.com/694133
>>
>> This message (including any files transmitted with it) may contain
>> confidential and/or proprietary information, is the property of Interactive
>> Data Corporation and/or its subsidiaries, and is directed only to the
>> addressee(s). If you are not the designated recipient or have reason to
>> believe you received this message in error, please delete this message from
>> your system and notify the sender immediately. An unintended recipient's
>> disclosure, copying, distribution, or use of this message or any attachments
>> is prohibited and may be unlawful.
>> Interactive Data (Europe) Ltd Registered No. 949387 England Registered
>> Office: Fitzroy House 13-17 Epworth Street. London. EC2A 4DL
>>
>>
>> _______________________________________________
>> Yale CAS mailing list
>> [hidden email]
>> http://tp.its.yale.edu/mailman/listinfo/cas
>>
>>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Yale CAS mailing list
> [hidden email]
> http://tp.its.yale.edu/mailman/listinfo/cas

--
Matthew Jones
Interactive Data Managed Solutions Ltd
-----------------------------------------------------------------------
Registered in England Company Number 3691868
Registered Office: Fitzroy House, 13-17 Epworth Street, London, EC2A 4DL
Tel: +44 (0)1242 694133 | Fax: +44 (0)1242 694109
[hidden email]
http://www.interactivedata-ms.com/694133

This message (including any files transmitted with it) may contain
confidential and/or proprietary information, is the property of
Interactive Data Corporation and/or its subsidiaries, and is directed
only to the addressee(s). If you are not the designated recipient or
have reason to believe you received this message in error, please delete
this message from your system and notify the sender immediately. An
unintended recipient's disclosure, copying, distribution, or use of this
message or any attachments is prohibited and may be unlawful.
Interactive Data (Europe) Ltd Registered No. 949387 England Registered
Office: Fitzroy House 13-17 Epworth Street. London. EC2A 4DL



_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas

smime.p7s (3K) Download Attachment
Kim Cary

Re: Building CAS

Reply Threaded More More options
Print post
Permalink
On Oct 9, 2008, at 9:19 AM, Matthew Jones wrote:

> That confused me. There is nothing wrong with the permission on  
> those files. I've had that sort of problem before but they have the  
> correct ownership & permissions. Indeed, I even truncated both  
> cas.log and catalina.out before restarting tomcat so they were there  
> and empty and then get information written to them.

Make sure they're logging where you think they are... pardon me if you  
already covered that issue.

Its trying to write them to a subdir of the Java home directory on my  
system and I'm like NOPE! So, I hardcode the path to the tomcat log  
dir in each instance. I do that in log4j.properties, um,

% find . -name "*log4j*" -print
./webapps/cas/WEB-INF/classes/log4j.properties

yah, that's where it is. It's kinda lame that log4j doesn't have an  
easy way to read ENV variables so that it could understand  
CATALINA_HOME or CATALINA_BASE so I have to put the full path to where  
I want cas.log in the .properties file.

_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas
Thai Nguyen

Re: Building CAS

Reply Threaded More More options
Print post
Permalink
Hi Kim,

You can do this:

log4j.appender.logfile.File=${catalina.home}/logs/cas.log

and that will put cas.log in the same directory as catalina.out

Cheers,

Thai

On Thu, Oct 9, 2008 at 11:02 AM, Kim Cary <[hidden email]> wrote:

> On Oct 9, 2008, at 9:19 AM, Matthew Jones wrote:
>
>> That confused me. There is nothing wrong with the permission on
>> those files. I've had that sort of problem before but they have the
>> correct ownership & permissions. Indeed, I even truncated both
>> cas.log and catalina.out before restarting tomcat so they were there
>> and empty and then get information written to them.
>
> Make sure they're logging where you think they are... pardon me if you
> already covered that issue.
>
> Its trying to write them to a subdir of the Java home directory on my
> system and I'm like NOPE! So, I hardcode the path to the tomcat log
> dir in each instance. I do that in log4j.properties, um,
>
> % find . -name "*log4j*" -print
> ./webapps/cas/WEB-INF/classes/log4j.properties
>
> yah, that's where it is. It's kinda lame that log4j doesn't have an
> easy way to read ENV variables so that it could understand
> CATALINA_HOME or CATALINA_BASE so I have to put the full path to where
> I want cas.log in the .properties file.
>
> _______________________________________________
> Yale CAS mailing list
> [hidden email]
> http://tp.its.yale.edu/mailman/listinfo/cas
>
_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas
Matthew Jones-7

Re: Building CAS

Reply Threaded More More options
Print post
Permalink
In reply to this post by Matthew Jones-7
I am still unable to successfully deploy the CAS server I have tried to
build using Maven2. I enclose the details of my building and the errors
from the logs when I try to run it. Please can anyone spot what I have
missed out or forgotten to do? The LDAP authentication is identical to
that of the downloaded .war file that previously had running.

Here is a find showing the files that I have changed under the
cas-server-webapp directory where I run the build from:

# find . -newer src -type f -print
./src/main/webapp/images/logo_IDC.jpg
./src/main/webapp/css/cas.css
./src/main/webapp/WEB-INF/classes/log4j.properties
./src/main/webapp/WEB-INF/deployerConfigContext.xml
./src/main/webapp/WEB-INF/view/jsp/default/ui/includes/bottom.jsp
./pom.xml

I have hacked in a logo into the default scheme rather than properly
skinning it. Other than that, I have changed the pom.xml and
deployerConfixContext.xml files to use our LDAP server for
authentication and put the correct value into log4j.properties so that
cas.log appears in the same place as catalina.out (thus fixing the file
create errors)

Version information:

# mvn --version
Maven version: 2.0.9
Java version: 1.6.0_06
OS name: "linux" version: "2.6.24-19-generic" arch: "amd64" Family: "unix"

Now here is the build

# mvn package
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building JA-SIG CAS Web Application
[INFO]    task-segment: [package]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading:
http://developer.ja-sig.org/maven2/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.pom
Downloading:
http://repo1.maven.org/maven2/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.pom
Downloading:
http://developer.ja-sig.org/maven2/org/opensaml/opensaml/1.1b/opensaml-1.1b.pom
Downloading:
http://repo1.maven.org/maven2/org/opensaml/opensaml/1.1b/opensaml-1.1b.pom
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[cas-server-webapp] in
[/home/dj/workspace/cas-server-3.3/cas-server-webapp/target/cas-server-webapp-3.3]
[INFO] Processing war project
[INFO] Webapp assembled in[1132 msecs]
[INFO] Building war:
/home/dj/workspace/cas-server-3.3/cas-server-webapp/target/cas.war
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive
invocation.
[INFO] No goals needed for project - skipping
[INFO] [source:jar {execution: attach-sources}]
[INFO] Building jar:
/home/dj/workspace/cas-server-3.3/cas-server-webapp/target/cas-server-webapp-3.3-sources.jar
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 15 seconds
[INFO] Finished at: Fri Oct 10 11:17:25 BST 2008
[INFO] Final Memory: 19M/47M
[INFO]
------------------------------------------------------------------------

I then deploy the created file target/cas.war onto the server using the
Tomcat Web Application Manager on the server (running CentOS 5.2, Tomcat
5.5.23 and Sun Java JVM 1.6.0_06-b02). Prior to doing this I have
un-deployed any old versions of CAS that were running, stopped Tomcat
and truncated the log files. I then start Tomcat again and check that it
is running correctly. No errors in catalina.out and nothing in cas.log.

The message displayed in the Tomcat Web Application Manager is 'OK' and
the cas application appears at /cas but is not running.

Here is the contents of catalina.out from the start until the first
error, I then remove the traceback information. The resulting errors are
repeated too.

Using CATALINA_BASE:   /usr/share/tomcat5
Using CATALINA_HOME:   /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JRE_HOME:
Oct 7, 2008 5:08:23 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance
in production environments was not found on the java.library.path:
/usr/java/jdk1.6.0_06/jre/lib/i386/client:/usr/java/jdk1.6.0_06/jre/lib/i386:/usr/java/jdk1.6.0_06/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Oct 7, 2008 5:08:23 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 7, 2008 5:08:24 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8443
Oct 7, 2008 5:08:24 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2969 ms
Oct 7, 2008 5:08:24 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 7, 2008 5:08:24 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
Oct 7, 2008 5:08:24 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Oct 7, 2008 5:08:26 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Oct 7, 2008 5:08:26 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Oct 7, 2008 5:08:27 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Oct 7, 2008 5:08:27 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Oct 7, 2008 5:08:27 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
[org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string:
News / Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param
name: paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
http://jakarta.apache.org]]
Oct 7, 2008 5:08:27 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 7, 2008 5:08:27 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
Oct 7, 2008 5:08:27 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 7, 2008 5:08:27 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/93  config=null
Oct 7, 2008 5:08:27 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Oct 7, 2008 5:08:28 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3514 ms
Oct 7, 2008 5:25:05 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Associated with Deployer
'Catalina:type=Deployer,host=localhost'
Oct 7, 2008 5:25:05 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Global resources are available
Oct 7, 2008 5:25:05 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
Oct 7, 2008 5:25:45 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive cas.war
2008-10-07 17:25:52,210 ERROR
[org.springframework.web.context.ContextLoader] - <Context
initialization failed>
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name '_authenticationManager': Cannot resolve reference to
bean 'casAuthenticationProvider' while setting bean property 'providers'
with key [0]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'casAuthenticationProvider' defined in ServletContext
resource [/WEB-INF/spring-configuration/securityContext.xml]: Cannot
resolve reference to bean 'userDetailsService' while setting bean
property 'userDetailsService'; nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for
bean with name 'userDetailsService' defined in ServletContext resource
[/WEB-INF/deployerConfigContext.xml]; nested exception is
java.lang.ClassNotFoundException:
org.acegisecurity.userdetails.memory.InMemoryDaoImpl

Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'casAuthenticationProvider' defined in
ServletContext resource
[/WEB-INF/spring-configuration/securityContext.xml]: Cannot resolve
reference to bean 'userDetailsService' while setting bean property
'userDetailsService'; nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for
bean with name 'userDetailsService' defined in ServletContext resource
[/WEB-INF/deployerConfigContext.xml]; nested exception is
java.lang.ClassNotFoundException:
org.acegisecurity.userdetails.memory.InMemoryDaoImpl

2008-10-07 17:25:52,220 FATAL
[org.jasig.cas.web.init.SafeContextLoaderListener] -
<SafeContextLoaderListener:
The Spring ContextLoaderListener we wrap threw on contextInitialized.
But for our having caught this error, the web application context would
not have initialized.>
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name '_authenticationManager': Cannot resolve reference to
bean 'casAuthenticationProvider' while setting bean property 'providers'
with key [0]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'casAuthenticationProvider' defined in ServletContext
resource [/WEB-INF/spring-configuration/securityContext.xml]: Cannot
resolve reference to bean 'userDetailsService' while setting bean
property 'userDetailsService'; nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for
bean with name 'userDetailsService' defined in ServletContext resource
[/WEB-INF/deployerConfigContext.xml]; nested exception is
java.lang.ClassNotFoundException:
org.acegisecurity.userdetails.memory.InMemoryDaoImpl

Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'casAuthenticationProvider' defined in
ServletContext resource
[/WEB-INF/spring-configuration/securityContext.xml]: Cannot resolve
reference to bean 'userDetailsService' while setting bean property
'userDetailsService'; nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for
bean with name 'userDetailsService' defined in ServletContext resource
[/WEB-INF/deployerConfigContext.xml]; nested exception is
java.lang.ClassNotFoundException:
org.acegisecurity.userdetails.memory.InMemoryDaoImpl

Caused by:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for
bean with name 'userDetailsService' defined in ServletContext resource
[/WEB-INF/deployerConfigContext.xml]; nested exception is
java.lang.ClassNotFoundException:
SafeContextLoaderListener:
The Spring ContextLoaderListener we wrap threw on contextInitialized.
But for our having caught this error, the web application context would
not have initialized.
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name '_authenticationManager': Cannot resolve reference to
bean 'casAuthenticationProvider' while setting bean property 'providers'
with key [0]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'casAuthenticationProvider' defined in ServletContext
resource [/WEB-INF/spring-configuration/securityContext.xml]: Cannot
resolve reference to bean 'userDetailsService' while setting bean
property 'userDetailsService'; nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for
bean with name 'userDetailsService' defined in ServletContext resource
[/WEB-INF/deployerConfigContext.xml]; nested exception is
java.lang.ClassNotFoundException:

SEVERE: Error filterStart
Oct 7, 2008 5:25:52 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/cas] startup failed due to previous errors
Oct 7, 2008 5:25:52 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'

cas.log seems to have pretty much the same information in it starting
with the following:

2008-10-07 17:25:52,210 ERROR
[org.springframework.web.context.ContextLoader] - Context initialization
failed
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name '_authenticationManager': Cannot resolve reference to
bean 'casAuthenticationProvider' while setting bean property 'providers'
with key [0]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'casAuthenticationProvider' defined in ServletContext
resource [/WEB-INF/spring-configuration/securityContext.xml]: Cannot
resolve reference to bean 'userDetailsService' while setting bean
property 'userDetailsService'; nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for
bean with name 'userDetailsService' defined in ServletContext resource
[/WEB-INF/deployerConfigContext.xml]; nested exception is
[/WEB-INF/spring-configuration/securityContext.xml]: Cannot resolve
reference to bean 'userDetailsService' while setting bean property
'userDetailsService'; nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for
bean with name 'userDetailsService' defined in ServletContext resource
[/WEB-INF/deployerConfigContext.xml]; nested exception is
java.lang.ClassNotFoundException: --


All help gratefully received.

Thanks

--
Matthew Jones
Interactive Data Managed Solutions Ltd
-----------------------------------------------------------------------
Registered in England Company Number 3691868
Registered Office: Fitzroy House, 13-17 Epworth Street, London, EC2A 4DL
Tel: +44 (0)1242 694133 | Fax: +44 (0)1242 694109
[hidden email]
http://www.interactivedata-ms.com/694133

This message (including any files transmitted with it) may contain
confidential and/or proprietary information, is the property of
Interactive Data Corporation and/or its subsidiaries, and is directed
only to the addressee(s). If you are not the designated recipient or
have reason to believe you received this message in error, please delete
this message from your system and notify the sender immediately. An
unintended recipient's disclosure, copying, distribution, or use of this
message or any attachments is prohibited and may be unlawful.
Interactive Data (Europe) Ltd Registered No. 949387 England Registered
Office: Fitzroy House 13-17 Epworth Street. London. EC2A 4DL



_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas

smime.p7s (3K) Download Attachment
David Whitehurst

Re: Building CAS

Reply Threaded More More options
Print post
Permalink
Matthew:

Hi.  I've been implementing a CAS solution using 3.1.1 and LDAP to an
Active Directory and unless you're a CAS expert I would recommend that
you do things in steps.

>From your stacktrace, it's evident that you haven't configured
something properly.  If you have the time, you should back up on
customizing anything until you've successfully deployed CAS with the
InMemoryDaoImpl (without LDAP) and been able to navigate to /cas/login
and get a successful banner.

If you do not want to do things in steps, you need to start with the
trace.  Find the culprit Spring bean and start there.  It's not
obvious from the trace what you've done wrong.  I'll say from
experience that once you get CAS to work in it's default
configuration, LDAP is next and it can be difficult.  I think too that
everyone's situation is always a little different than the how-to's
that you find in the wiki.  Or, you need to chose the right
configuration for your house.

Post your deployerConfigContext.xml and cas.properties here and I'll
try to help.

David

On 10/10/08, Matthew Jones <[hidden email]> wrote:

> I am still unable to successfully deploy the CAS server I have tried to
> build using Maven2. I enclose the details of my building and the errors from
> the logs when I try to run it. Please can anyone spot what I have missed out
> or forgotten to do? The LDAP authentication is identical to that of the
> downloaded .war file that previously had running.
>
> Here is a find showing the files that I have changed under the
> cas-server-webapp directory where I run the build from:
>
> # find . -newer src -type f -print
> ./src/main/webapp/images/logo_IDC.jpg
> ./src/main/webapp/css/cas.css
> ./src/main/webapp/WEB-INF/classes/log4j.properties
> ./src/main/webapp/WEB-INF/deployerConfigContext.xml
> ./src/main/webapp/WEB-INF/view/jsp/default/ui/includes/bottom.jsp
> ./pom.xml
>
> I have hacked in a logo into the default scheme rather than properly
> skinning it. Other than that, I have changed the pom.xml and
> deployerConfixContext.xml files to use our LDAP server for authentication
> and put the correct value into log4j.properties so that cas.log appears in
> the same place as catalina.out (thus fixing the file create errors)
>
> Version information:
>
> # mvn --version
> Maven version: 2.0.9
> Java version: 1.6.0_06
> OS name: "linux" version: "2.6.24-19-generic" arch: "amd64" Family: "unix"
>
> Now here is the build
>
> # mvn package
> [INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building JA-SIG CAS Web Application
> [INFO]    task-segment: [package]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> Downloading:
> http://developer.ja-sig.org/maven2/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.pom
> Downloading:
> http://repo1.maven.org/maven2/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.pom
> Downloading:
> http://developer.ja-sig.org/maven2/org/opensaml/opensaml/1.1b/opensaml-1.1b.pom
> Downloading:
> http://repo1.maven.org/maven2/org/opensaml/opensaml/1.1b/opensaml-1.1b.pom
> [INFO] [compiler:compile]
> [INFO] No sources to compile
> [INFO] [resources:testResources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:testCompile]
> [INFO] No sources to compile
> [INFO] [surefire:test]
> [INFO] No tests to run.
> [INFO] [war:war]
> [INFO] Packaging webapp
> [INFO] Assembling webapp[cas-server-webapp] in
> [/home/dj/workspace/cas-server-3.3/cas-server-webapp/target/cas-server-webapp-3.3]
> [INFO] Processing war project
> [INFO] Webapp assembled in[1132 msecs]
> [INFO] Building war:
> /home/dj/workspace/cas-server-3.3/cas-server-webapp/target/cas.war
> [INFO] Preparing source:jar
> [WARNING] Removing: jar from forked lifecycle, to prevent recursive
> invocation.
> [INFO] No goals needed for project - skipping
> [INFO] [source:jar {execution: attach-sources}]
> [INFO] Building jar:
> /home/dj/workspace/cas-server-3.3/cas-server-webapp/target/cas-server-webapp-3.3-sources.jar
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 15 seconds
> [INFO] Finished at: Fri Oct 10 11:17:25 BST 2008
> [INFO] Final Memory: 19M/47M
> [INFO]
> ------------------------------------------------------------------------
>
> I then deploy the created file target/cas.war onto the server using the
> Tomcat Web Application Manager on the server (running CentOS 5.2, Tomcat
> 5.5.23 and Sun Java JVM 1.6.0_06-b02). Prior to doing this I have
> un-deployed any old versions of CAS that were running, stopped Tomcat and
> truncated the log files. I then start Tomcat again and check that it is
> running correctly. No errors in catalina.out and nothing in cas.log.
>
> The message displayed in the Tomcat Web Application Manager is 'OK' and the
> cas application appears at /cas but is not running.
>
> Here is the contents of catalina.out from the start until the first error, I
> then remove the traceback information. The resulting errors are repeated
> too.
>
> Using CATALINA_BASE:   /usr/share/tomcat5
> Using CATALINA_HOME:   /usr/share/tomcat5
> Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
> Using JRE_HOME:
> Oct 7, 2008 5:08:23 PM
> org.apache.catalina.core.AprLifecycleListener
> lifecycleEvent
> INFO: The Apache Tomcat Native library which allows optimal performance in
> production environments was not found on the java.library.path:
> /usr/java/jdk1.6.0_06/jre/lib/i386/client:/usr/java/jdk1.6.0_06/jre/lib/i386:/usr/java/jdk1.6.0_06/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
> Oct 7, 2008 5:08:23 PM
> org.apache.coyote.http11.Http11BaseProtocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> Oct 7, 2008 5:08:24 PM
> org.apache.coyote.http11.Http11BaseProtocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8443
> Oct 7, 2008 5:08:24 PM org.apache.catalina.startup.Catalina
> load
> INFO: Initialization processed in 2969 ms
> Oct 7, 2008 5:08:24 PM
> org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Oct 7, 2008 5:08:24 PM
> org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
> Oct 7, 2008 5:08:24 PM
> org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> Oct 7, 2008 5:08:26 PM
> org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextInitialized()
> Oct 7, 2008 5:08:26 PM
> org.apache.catalina.core.ApplicationContext log
> INFO: SessionListener: contextInitialized()
> Oct 7, 2008 5:08:27 PM
> org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextInitialized()
> Oct 7, 2008 5:08:27 PM
> org.apache.catalina.core.ApplicationContext log
> INFO: SessionListener: contextInitialized()
> Oct 7, 2008 5:08:27 PM
> org.apache.catalina.core.ApplicationContext log
> INFO: org.apache.webapp.balancer.BalancerFilter: init():
> ruleChain: [org.apache.webapp.balancer.RuleChain:
> [org.apache.webapp.balancer.rules.URLStringMatchRule:
> Target string: News / Redirect URL: http://www.cnn.com],
> [org.apache.webapp.balancer.rules.RequestParameterRule:
> Target param name: paramName / Target param value: paramValue / Redirect
> URL: http://www.yahoo.com],
> [org.apache.webapp.balancer.rules.AcceptEverythingRule:
> Redirect URL: http://jakarta.apache.org]]
> Oct 7, 2008 5:08:27 PM
> org.apache.coyote.http11.Http11BaseProtocol start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> Oct 7, 2008 5:08:27 PM
> org.apache.coyote.http11.Http11BaseProtocol start
> INFO: Starting Coyote HTTP/1.1 on http-8443
> Oct 7, 2008 5:08:27 PM org.apache.jk.common.ChannelSocket
> init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> Oct 7, 2008 5:08:27 PM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/93  config=null
> Oct 7, 2008 5:08:27 PM
> org.apache.catalina.storeconfig.StoreLoader load
> INFO: Find registry server-registry.xml at classpath resource
> Oct 7, 2008 5:08:28 PM org.apache.catalina.startup.Catalina
> start
> INFO: Server startup in 3514 ms
> Oct 7, 2008 5:25:05 PM
> org.apache.catalina.core.ApplicationContext log
> INFO: HTMLManager: init: Associated with Deployer
> 'Catalina:type=Deployer,host=localhost'
> Oct 7, 2008 5:25:05 PM
> org.apache.catalina.core.ApplicationContext log
> INFO: HTMLManager: init: Global resources are available
> Oct 7, 2008 5:25:05 PM
> org.apache.catalina.core.ApplicationContext log
> INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
> Oct 7, 2008 5:25:45 PM
> org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive cas.war
> 2008-10-07 17:25:52,210 ERROR
> [org.springframework.web.context.ContextLoader] - <Context
> initialization failed>
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name '_authenticationManager': Cannot resolve
> reference to bean 'casAuthenticationProvider' while setting bean property
> 'providers' with key [0]; nested exception is
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'casAuthenticationProvider' defined in
> ServletContext resource
> [/WEB-INF/spring-configuration/securityContext.xml]:
> Cannot resolve reference to bean 'userDetailsService' while setting bean
> property 'userDetailsService'; nested exception is
> org.springframework.beans.factory.CannotLoadBeanClassException:
> Cannot find class
> [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> for bean with name 'userDetailsService' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]; nested exception is
> java.lang.ClassNotFoundException:
> org.acegisecurity.userdetails.memory.InMemoryDaoImpl
>
> Caused by:
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'casAuthenticationProvider' defined in
> ServletContext resource
> [/WEB-INF/spring-configuration/securityContext.xml]:
> Cannot resolve reference to bean 'userDetailsService' while setting bean
> property 'userDetailsService'; nested exception is
> org.springframework.beans.factory.CannotLoadBeanClassException:
> Cannot find class
> [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> for bean with name 'userDetailsService' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]; nested exception is
> java.lang.ClassNotFoundException:
> org.acegisecurity.userdetails.memory.InMemoryDaoImpl
>
> 2008-10-07 17:25:52,220 FATAL
> [org.jasig.cas.web.init.SafeContextLoaderListener] -
> <SafeContextLoaderListener:
> The Spring ContextLoaderListener we wrap threw on contextInitialized.
> But for our having caught this error, the web application context would not
> have initialized.>
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name '_authenticationManager': Cannot resolve
> reference to bean 'casAuthenticationProvider' while setting bean property
> 'providers' with key [0]; nested exception is
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'casAuthenticationProvider' defined in
> ServletContext resource
> [/WEB-INF/spring-configuration/securityContext.xml]:
> Cannot resolve reference to bean 'userDetailsService' while setting bean
> property 'userDetailsService'; nested exception is
> org.springframework.beans.factory.CannotLoadBeanClassException:
> Cannot find class
> [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> for bean with name 'userDetailsService' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]; nested exception is
> java.lang.ClassNotFoundException:
> org.acegisecurity.userdetails.memory.InMemoryDaoImpl
>
> Caused by:
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'casAuthenticationProvider' defined in
> ServletContext resource
> [/WEB-INF/spring-configuration/securityContext.xml]:
> Cannot resolve reference to bean 'userDetailsService' while setting bean
> property 'userDetailsService'; nested exception is
> org.springframework.beans.factory.CannotLoadBeanClassException:
> Cannot find class
> [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> for bean with name 'userDetailsService' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]; nested exception is
> java.lang.ClassNotFoundException:
> org.acegisecurity.userdetails.memory.InMemoryDaoImpl
>
> Caused by:
> org.springframework.beans.factory.CannotLoadBeanClassException:
> Cannot find class
> [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> for bean with name 'userDetailsService' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]; nested exception is
> java.lang.ClassNotFoundException:
> SafeContextLoaderListener:
> The Spring ContextLoaderListener we wrap threw on contextInitialized.
> But for our having caught this error, the web application context would not
> have initialized.
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name '_authenticationManager': Cannot resolve
> reference to bean 'casAuthenticationProvider' while setting bean property
> 'providers' with key [0]; nested exception is
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'casAuthenticationProvider' defined in
> ServletContext resource
> [/WEB-INF/spring-configuration/securityContext.xml]:
> Cannot resolve reference to bean 'userDetailsService' while setting bean
> property 'userDetailsService'; nested exception is
> org.springframework.beans.factory.CannotLoadBeanClassException:
> Cannot find class
> [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> for bean with name 'userDetailsService' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]; nested exception is
> java.lang.ClassNotFoundException:
>
> SEVERE: Error filterStart
> Oct 7, 2008 5:25:52 PM
> org.apache.catalina.core.StandardContext start
> SEVERE: Context [/cas] startup failed due to previous errors
> Oct 7, 2008 5:25:52 PM
> org.apache.catalina.core.ApplicationContext log
> INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
>
> cas.log seems to have pretty much the same information in it starting with
> the following:
>
> 2008-10-07 17:25:52,210 ERROR
> [org.springframework.web.context.ContextLoader] - Context
> initialization failed
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name '_authenticationManager': Cannot resolve
> reference to bean 'casAuthenticationProvider' while setting bean property
> 'providers' with key [0]; nested exception is
> org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'casAuthenticationProvider' defined in
> ServletContext resource
> [/WEB-INF/spring-configuration/securityContext.xml]:
> Cannot resolve reference to bean 'userDetailsService' while setting bean
> property 'userDetailsService'; nested exception is
> org.springframework.beans.factory.CannotLoadBeanClassException:
> Cannot find class
> [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> for bean with name 'userDetailsService' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]; nested exception is
> [/WEB-INF/spring-configuration/securityContext.xml]:
> Cannot resolve reference to bean 'userDetailsService' while setting bean
> property 'userDetailsService'; nested exception is
> org.springframework.beans.factory.CannotLoadBeanClassException:
> Cannot find class
> [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> for bean with name 'userDetailsService' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]; nested exception is
> java.lang.ClassNotFoundException: --
>
>
> All help gratefully received.
>
>
> Thanks
>
> --
> Matthew Jones
> Interactive Data Managed Solutions Ltd
> -----------------------------------------------------------------------
> Registered in England Company Number 3691868
> Registered Office: Fitzroy House, 13-17 Epworth Street, London, EC2A 4DL
> Tel: +44 (0)1242 694133 | Fax: +44 (0)1242 694109
> [hidden email]
> http://www.interactivedata-ms.com/694133
>
> This message (including any files transmitted with it) may contain
> confidential and/or proprietary information, is the property of Interactive
> Data Corporation and/or its subsidiaries, and is directed only to the
> addressee(s). If you are not the designated recipient or have reason to
> believe you received this message in error, please delete this message from
> your system and notify the sender immediately. An unintended recipient's
> disclosure, copying, distribution, or use of this message or any attachments
> is prohibited and may be unlawful.
> Interactive Data (Europe) Ltd Registered No. 949387 England Registered
> Office: Fitzroy House 13-17 Epworth Street. London. EC2A 4DL
>
>
> _______________________________________________
> Yale CAS mailing list
> [hidden email]
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
>
_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas
David Whitehurst

Re: Building CAS

Reply Threaded More More options
Print post
Permalink
Also, did you configure the Maven build of the CAS server to include
the LDAP authentication module?  If you didn't, I still recommend that
you deploy CAS unaltered first and then customize.


David

On 10/10/08, David Whitehurst <[hidden email]> wrote:

> Matthew:
>
> Hi.  I've been implementing a CAS solution using 3.1.1 and LDAP to an
> Active Directory and unless you're a CAS expert I would recommend that
> you do things in steps.
>
> From your stacktrace, it's evident that you haven't configured
> something properly.  If you have the time, you should back up on
> customizing anything until you've successfully deployed CAS with the
> InMemoryDaoImpl (without LDAP) and been able to navigate to /cas/login
> and get a successful banner.
>
> If you do not want to do things in steps, you need to start with the
> trace.  Find the culprit Spring bean and start there.  It's not
> obvious from the trace what you've done wrong.  I'll say from
> experience that once you get CAS to work in it's default
> configuration, LDAP is next and it can be difficult.  I think too that
> everyone's situation is always a little different than the how-to's
> that you find in the wiki.  Or, you need to chose the right
> configuration for your house.
>
> Post your deployerConfigContext.xml and cas.properties here and I'll
> try to help.
>
> David
>
> On 10/10/08, Matthew Jones <[hidden email]> wrote:
> > I am still unable to successfully deploy the CAS server I have tried to
> > build using Maven2. I enclose the details of my building and the errors from
> > the logs when I try to run it. Please can anyone spot what I have missed out
> > or forgotten to do? The LDAP authentication is identical to that of the
> > downloaded .war file that previously had running.
> >
> > Here is a find showing the files that I have changed under the
> > cas-server-webapp directory where I run the build from:
> >
> > # find . -newer src -type f -print
> > ./src/main/webapp/images/logo_IDC.jpg
> > ./src/main/webapp/css/cas.css
> > ./src/main/webapp/WEB-INF/classes/log4j.properties
> > ./src/main/webapp/WEB-INF/deployerConfigContext.xml
> > ./src/main/webapp/WEB-INF/view/jsp/default/ui/includes/bottom.jsp
> > ./pom.xml
> >
> > I have hacked in a logo into the default scheme rather than properly
> > skinning it. Other than that, I have changed the pom.xml and
> > deployerConfixContext.xml files to use our LDAP server for authentication
> > and put the correct value into log4j.properties so that cas.log appears in
> > the same place as catalina.out (thus fixing the file create errors)
> >
> > Version information:
> >
> > # mvn --version
> > Maven version: 2.0.9
> > Java version: 1.6.0_06
> > OS name: "linux" version: "2.6.24-19-generic" arch: "amd64" Family: "unix"
> >
> > Now here is the build
> >
> > # mvn package
> > [INFO] Scanning for projects...
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Building JA-SIG CAS Web Application
> > [INFO]    task-segment: [package]
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] [resources:resources]
> > [INFO] Using default encoding to copy filtered resources.
> > Downloading:
> > http://developer.ja-sig.org/maven2/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.pom
> > Downloading:
> > http://repo1.maven.org/maven2/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.pom
> > Downloading:
> > http://developer.ja-sig.org/maven2/org/opensaml/opensaml/1.1b/opensaml-1.1b.pom
> > Downloading:
> > http://repo1.maven.org/maven2/org/opensaml/opensaml/1.1b/opensaml-1.1b.pom
> > [INFO] [compiler:compile]
> > [INFO] No sources to compile
> > [INFO] [resources:testResources]
> > [INFO] Using default encoding to copy filtered resources.
> > [INFO] [compiler:testCompile]
> > [INFO] No sources to compile
> > [INFO] [surefire:test]
> > [INFO] No tests to run.
> > [INFO] [war:war]
> > [INFO] Packaging webapp
> > [INFO] Assembling webapp[cas-server-webapp] in
> > [/home/dj/workspace/cas-server-3.3/cas-server-webapp/target/cas-server-webapp-3.3]
> > [INFO] Processing war project
> > [INFO] Webapp assembled in[1132 msecs]
> > [INFO] Building war:
> > /home/dj/workspace/cas-server-3.3/cas-server-webapp/target/cas.war
> > [INFO] Preparing source:jar
> > [WARNING] Removing: jar from forked lifecycle, to prevent recursive
> > invocation.
> > [INFO] No goals needed for project - skipping
> > [INFO] [source:jar {execution: attach-sources}]
> > [INFO] Building jar:
> > /home/dj/workspace/cas-server-3.3/cas-server-webapp/target/cas-server-webapp-3.3-sources.jar
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] BUILD SUCCESSFUL
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Total time: 15 seconds
> > [INFO] Finished at: Fri Oct 10 11:17:25 BST 2008
> > [INFO] Final Memory: 19M/47M
> > [INFO]
> > ------------------------------------------------------------------------
> >
> > I then deploy the created file target/cas.war onto the server using the
> > Tomcat Web Application Manager on the server (running CentOS 5.2, Tomcat
> > 5.5.23 and Sun Java JVM 1.6.0_06-b02). Prior to doing this I have
> > un-deployed any old versions of CAS that were running, stopped Tomcat and
> > truncated the log files. I then start Tomcat again and check that it is
> > running correctly. No errors in catalina.out and nothing in cas.log.
> >
> > The message displayed in the Tomcat Web Application Manager is 'OK' and the
> > cas application appears at /cas but is not running.
> >
> > Here is the contents of catalina.out from the start until the first error, I
> > then remove the traceback information. The resulting errors are repeated
> > too.
> >
> > Using CATALINA_BASE:   /usr/share/tomcat5
> > Using CATALINA_HOME:   /usr/share/tomcat5
> > Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
> > Using JRE_HOME:
> > Oct 7, 2008 5:08:23 PM
> > org.apache.catalina.core.AprLifecycleListener
> > lifecycleEvent
> > INFO: The Apache Tomcat Native library which allows optimal performance in
> > production environments was not found on the java.library.path:
> > /usr/java/jdk1.6.0_06/jre/lib/i386/client:/usr/java/jdk1.6.0_06/jre/lib/i386:/usr/java/jdk1.6.0_06/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
> > Oct 7, 2008 5:08:23 PM
> > org.apache.coyote.http11.Http11BaseProtocol init
> > INFO: Initializing Coyote HTTP/1.1 on http-8080
> > Oct 7, 2008 5:08:24 PM
> > org.apache.coyote.http11.Http11BaseProtocol init
> > INFO: Initializing Coyote HTTP/1.1 on http-8443
> > Oct 7, 2008 5:08:24 PM org.apache.catalina.startup.Catalina
> > load
> > INFO: Initialization processed in 2969 ms
> > Oct 7, 2008 5:08:24 PM
> > org.apache.catalina.core.StandardService start
> > INFO: Starting service Catalina
> > Oct 7, 2008 5:08:24 PM
> > org.apache.catalina.core.StandardEngine start
> > INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
> > Oct 7, 2008 5:08:24 PM
> > org.apache.catalina.core.StandardHost start
> > INFO: XML validation disabled
> > Oct 7, 2008 5:08:26 PM
> > org.apache.catalina.core.ApplicationContext log
> > INFO: ContextListener: contextInitialized()
> > Oct 7, 2008 5:08:26 PM
> > org.apache.catalina.core.ApplicationContext log
> > INFO: SessionListener: contextInitialized()
> > Oct 7, 2008 5:08:27 PM
> > org.apache.catalina.core.ApplicationContext log
> > INFO: ContextListener: contextInitialized()
> > Oct 7, 2008 5:08:27 PM
> > org.apache.catalina.core.ApplicationContext log
> > INFO: SessionListener: contextInitialized()
> > Oct 7, 2008 5:08:27 PM
> > org.apache.catalina.core.ApplicationContext log
> > INFO: org.apache.webapp.balancer.BalancerFilter: init():
> > ruleChain: [org.apache.webapp.balancer.RuleChain:
> > [org.apache.webapp.balancer.rules.URLStringMatchRule:
> > Target string: News / Redirect URL: http://www.cnn.com],
> > [org.apache.webapp.balancer.rules.RequestParameterRule:
> > Target param name: paramName / Target param value: paramValue / Redirect
> > URL: http://www.yahoo.com],
> > [org.apache.webapp.balancer.rules.AcceptEverythingRule:
> > Redirect URL: http://jakarta.apache.org]]
> > Oct 7, 2008 5:08:27 PM
> > org.apache.coyote.http11.Http11BaseProtocol start
> > INFO: Starting Coyote HTTP/1.1 on http-8080
> > Oct 7, 2008 5:08:27 PM
> > org.apache.coyote.http11.Http11BaseProtocol start
> > INFO: Starting Coyote HTTP/1.1 on http-8443
> > Oct 7, 2008 5:08:27 PM org.apache.jk.common.ChannelSocket
> > init
> > INFO: JK: ajp13 listening on /0.0.0.0:8009
> > Oct 7, 2008 5:08:27 PM org.apache.jk.server.JkMain start
> > INFO: Jk running ID=0 time=0/93  config=null
> > Oct 7, 2008 5:08:27 PM
> > org.apache.catalina.storeconfig.StoreLoader load
> > INFO: Find registry server-registry.xml at classpath resource
> > Oct 7, 2008 5:08:28 PM org.apache.catalina.startup.Catalina
> > start
> > INFO: Server startup in 3514 ms
> > Oct 7, 2008 5:25:05 PM
> > org.apache.catalina.core.ApplicationContext log
> > INFO: HTMLManager: init: Associated with Deployer
> > 'Catalina:type=Deployer,host=localhost'
> > Oct 7, 2008 5:25:05 PM
> > org.apache.catalina.core.ApplicationContext log
> > INFO: HTMLManager: init: Global resources are available
> > Oct 7, 2008 5:25:05 PM
> > org.apache.catalina.core.ApplicationContext log
> > INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
> > Oct 7, 2008 5:25:45 PM
> > org.apache.catalina.startup.HostConfig deployWAR
> > INFO: Deploying web application archive cas.war
> > 2008-10-07 17:25:52,210 ERROR
> > [org.springframework.web.context.ContextLoader] - <Context
> > initialization failed>
> > org.springframework.beans.factory.BeanCreationException:
> > Error creating bean with name '_authenticationManager': Cannot resolve
> > reference to bean 'casAuthenticationProvider' while setting bean property
> > 'providers' with key [0]; nested exception is
> > org.springframework.beans.factory.BeanCreationException:
> > Error creating bean with name 'casAuthenticationProvider' defined in
> > ServletContext resource
> > [/WEB-INF/spring-configuration/securityContext.xml]:
> > Cannot resolve reference to bean 'userDetailsService' while setting bean
> > property 'userDetailsService'; nested exception is
> > org.springframework.beans.factory.CannotLoadBeanClassException:
> > Cannot find class
> > [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> > for bean with name 'userDetailsService' defined in ServletContext resource
> > [/WEB-INF/deployerConfigContext.xml]; nested exception is
> > java.lang.ClassNotFoundException:
> > org.acegisecurity.userdetails.memory.InMemoryDaoImpl
> >
> > Caused by:
> > org.springframework.beans.factory.BeanCreationException:
> > Error creating bean with name 'casAuthenticationProvider' defined in
> > ServletContext resource
> > [/WEB-INF/spring-configuration/securityContext.xml]:
> > Cannot resolve reference to bean 'userDetailsService' while setting bean
> > property 'userDetailsService'; nested exception is
> > org.springframework.beans.factory.CannotLoadBeanClassException:
> > Cannot find class
> > [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> > for bean with name 'userDetailsService' defined in ServletContext resource
> > [/WEB-INF/deployerConfigContext.xml]; nested exception is
> > java.lang.ClassNotFoundException:
> > org.acegisecurity.userdetails.memory.InMemoryDaoImpl
> >
> > 2008-10-07 17:25:52,220 FATAL
> > [org.jasig.cas.web.init.SafeContextLoaderListener] -
> > <SafeContextLoaderListener:
> > The Spring ContextLoaderListener we wrap threw on contextInitialized.
> > But for our having caught this error, the web application context would not
> > have initialized.>
> > org.springframework.beans.factory.BeanCreationException:
> > Error creating bean with name '_authenticationManager': Cannot resolve
> > reference to bean 'casAuthenticationProvider' while setting bean property
> > 'providers' with key [0]; nested exception is
> > org.springframework.beans.factory.BeanCreationException:
> > Error creating bean with name 'casAuthenticationProvider' defined in
> > ServletContext resource
> > [/WEB-INF/spring-configuration/securityContext.xml]:
> > Cannot resolve reference to bean 'userDetailsService' while setting bean
> > property 'userDetailsService'; nested exception is
> > org.springframework.beans.factory.CannotLoadBeanClassException:
> > Cannot find class
> > [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> > for bean with name 'userDetailsService' defined in ServletContext resource
> > [/WEB-INF/deployerConfigContext.xml]; nested exception is
> > java.lang.ClassNotFoundException:
> > org.acegisecurity.userdetails.memory.InMemoryDaoImpl
> >
> > Caused by:
> > org.springframework.beans.factory.BeanCreationException:
> > Error creating bean with name 'casAuthenticationProvider' defined in
> > ServletContext resource
> > [/WEB-INF/spring-configuration/securityContext.xml]:
> > Cannot resolve reference to bean 'userDetailsService' while setting bean
> > property 'userDetailsService'; nested exception is
> > org.springframework.beans.factory.CannotLoadBeanClassException:
> > Cannot find class
> > [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> > for bean with name 'userDetailsService' defined in ServletContext resource
> > [/WEB-INF/deployerConfigContext.xml]; nested exception is
> > java.lang.ClassNotFoundException:
> > org.acegisecurity.userdetails.memory.InMemoryDaoImpl
> >
> > Caused by:
> > org.springframework.beans.factory.CannotLoadBeanClassException:
> > Cannot find class
> > [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> > for bean with name 'userDetailsService' defined in ServletContext resource
> > [/WEB-INF/deployerConfigContext.xml]; nested exception is
> > java.lang.ClassNotFoundException:
> > SafeContextLoaderListener:
> > The Spring ContextLoaderListener we wrap threw on contextInitialized.
> > But for our having caught this error, the web application context would not
> > have initialized.
> > org.springframework.beans.factory.BeanCreationException:
> > Error creating bean with name '_authenticationManager': Cannot resolve
> > reference to bean 'casAuthenticationProvider' while setting bean property
> > 'providers' with key [0]; nested exception is
> > org.springframework.beans.factory.BeanCreationException:
> > Error creating bean with name 'casAuthenticationProvider' defined in
> > ServletContext resource
> > [/WEB-INF/spring-configuration/securityContext.xml]:
> > Cannot resolve reference to bean 'userDetailsService' while setting bean
> > property 'userDetailsService'; nested exception is
> > org.springframework.beans.factory.CannotLoadBeanClassException:
> > Cannot find class
> > [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> > for bean with name 'userDetailsService' defined in ServletContext resource
> > [/WEB-INF/deployerConfigContext.xml]; nested exception is
> > java.lang.ClassNotFoundException:
> >
> > SEVERE: Error filterStart
> > Oct 7, 2008 5:25:52 PM
> > org.apache.catalina.core.StandardContext start
> > SEVERE: Context [/cas] startup failed due to previous errors
> > Oct 7, 2008 5:25:52 PM
> > org.apache.catalina.core.ApplicationContext log
> > INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
> >
> > cas.log seems to have pretty much the same information in it starting with
> > the following:
> >
> > 2008-10-07 17:25:52,210 ERROR
> > [org.springframework.web.context.ContextLoader] - Context
> > initialization failed
> > org.springframework.beans.factory.BeanCreationException:
> > Error creating bean with name '_authenticationManager': Cannot resolve
> > reference to bean 'casAuthenticationProvider' while setting bean property
> > 'providers' with key [0]; nested exception is
> > org.springframework.beans.factory.BeanCreationException:
> > Error creating bean with name 'casAuthenticationProvider' defined in
> > ServletContext resource
> > [/WEB-INF/spring-configuration/securityContext.xml]:
> > Cannot resolve reference to bean 'userDetailsService' while setting bean
> > property 'userDetailsService'; nested exception is
> > org.springframework.beans.factory.CannotLoadBeanClassException:
> > Cannot find class
> > [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> > for bean with name 'userDetailsService' defined in ServletContext resource
> > [/WEB-INF/deployerConfigContext.xml]; nested exception is
> > [/WEB-INF/spring-configuration/securityContext.xml]:
> > Cannot resolve reference to bean 'userDetailsService' while setting bean
> > property 'userDetailsService'; nested exception is
> > org.springframework.beans.factory.CannotLoadBeanClassException:
> > Cannot find class
> > [org.acegisecurity.userdetails.memory.InMemoryDaoImpl]
> > for bean with name 'userDetailsService' defined in ServletContext resource
> > [/WEB-INF/deployerConfigContext.xml]; nested exception is
> > java.lang.ClassNotFoundException: --
> >
> >
> > All help gratefully received.
> >
> >
> > Thanks
> >
> > --
> > Matthew Jones
> > Interactive Data Managed Solutions Ltd
> > -----------------------------------------------------------------------
> > Registered in England Company Number 3691868
> > Registered Office: Fitzroy House, 13-17 Epworth Street, London, EC2A 4DL
> > Tel: +44 (0)1242 694133 | Fax: +44 (0)1242 694109
> > [hidden email]
> > http://www.interactivedata-ms.com/694133
> >
> > This message (including any files transmitted with it) may contain
> > confidential and/or proprietary information, is the property of Interactive
> > Data Corporation and/or its subsidiaries, and is directed only to the
> > addressee(s). If you are not the designated recipient or have reason to
> > believe you received this message in error, please delete this message from
> > your system and notify the sender immediately. An unintended recipient's
> > disclosure, copying, distribution, or use of this message or any attachments
> > is prohibited and may be unlawful.
> > Interactive Data (Europe) Ltd Registered No. 949387 England Registered
> > Office: Fitzroy House 13-17 Epworth Street. London. EC2A 4DL
> >
> >
> > _______________________________________________
> > Yale CAS mailing list
> > [hidden email]
> > http://tp.its.yale.edu/mailman/listinfo/cas
> >
> >
> >
>
_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas
Matthew Jones-7

Re: Building CAS

Reply Threaded More More options
Print post
Permalink
Hi David,

> Also, did you configure the Maven build of the CAS server to include
> the LDAP authentication module?

I have modified the pom.xml file to include:
         <dependency>
                        <groupId>org.jasig.cas</groupId>
                        <artifactId>cas-server-support-ldap</artifactId>
                        <version>${project.version}</version>
         </dependency>
I am not aware of any additional build (as opposed to deployment)
configuration that I need to do.

> If you didn't, I still recommend that
> you deploy CAS unaltered first and then customize.

I have deployed the war file that is shipped with the 3.3 download and
then configured it to use LDAP and the Spring LDAP jars by manually
copying them. The changes I have made are identical to that system I had
running. The only difference now is that I am trying to build my own war
file and deploy that. I could just run a vanilla build and deploy the
resulting war file and see if that works but I had hoped that I was only
taking a small step. Indeed, I have had to upgrade maven to 2.09 and
then run the build. The log file was a change that I had forgotten about
and easily fixed. The war file I deploy does have the LDAP jars as part
of it which I was told would be added for me having changed to LDAP
authentication. Maven is not a system I have any previous experience
with but have assumed, form what I have been told, should just work once
you have the right version of course. Obviously, I am experiencing some
other basic error which I had hoped would be obvious from the log files.

Do you recommend that I do indeed try and build a vanilla 3.3 war file?
Obviously, that will need the change to the log file location to work
but shouldn't need anything else right?

>> Hi.  I've been implementing a CAS solution using 3.1.1 and LDAP to an
>> Active Directory and unless you're a CAS expert I would recommend that
>> you do things in steps.
>>
>> From your stacktrace, it's evident that you haven't configured
>> something properly.  If you have the time, you should back up on
>> customizing anything until you've successfully deployed CAS with the
>> InMemoryDaoImpl (without LDAP) and been able to navigate to /cas/login
>> and get a successful banner.
>>
>> If you do not want to do things in steps, you need to start with the
>> trace.  Find the culprit Spring bean and start there.  It's not
>> obvious from the trace what you've done wrong.  I'll say from
>> experience that once you get CAS to work in it's default
>> configuration, LDAP is next and it can be difficult.  I think too that
>> everyone's situation is always a little different than the how-to's
>> that you find in the wiki.  Or, you need to chose the right
>> configuration for your house.
>>
>> Post your deployerConfigContext.xml and cas.properties here and I'll
>> try to help.
Attached - deployerConfigContext.xml has obscured URL & OU (hence the
XXX extension).

In reality, I am trying to build a deployable .war file that has our
configuration in having already gone through the "pain" of getting that
  configuration to work. That is, the LDAP authentication handler is
working and with a changed image displayed on the login & logout pages.
This is just the first step on the way to having to write a specific
authentication handler to deal with certificate & username/password
credentials and properly skinning CAS.

Thanks

--
Matthew Jones
Interactive Data Managed Solutions Ltd
-----------------------------------------------------------------------
Registered in England Company Number 3691868
Registered Office: Fitzroy House, 13-17 Epworth Street, London, EC2A 4DL
Tel: +44 (0)1242 694133 | Fax: +44 (0)1242 694109
[hidden email]
http://www.interactivedata-ms.com/694133

This message (including any files transmitted with it) may contain
confidential and/or proprietary information, is the property of
Interactive Data Corporation and/or its subsidiaries, and is directed
only to the addressee(s). If you are not the designated recipient or
have reason to believe you received this message in error, please delete
this message from your system and notify the sender immediately. An
unintended recipient's disclosure, copying, distribution, or use of this
message or any attachments is prohibited and may be unlawful.
Interactive Data (Europe) Ltd Registered No. 949387 England Registered
Office: Fitzroy House 13-17 Epworth Street. London. EC2A 4DL


cas.securityContext.serviceProperties.service=https://localhost:8443/cas/services/j_acegi_cas_security_check
cas.securityContext.casProcessingFilterEntryPoint.loginUrl=https://localhost:8443/cas/login
cas.securityContext.ticketValidator.casServerUrlPrefix=https://localhost:8443/cas

cas.themeResolver.defaultThemeName=default
cas.viewResolver.basename=default_views

host.name=cas

#database.hibernate.dialect=org.hibernate.dialect.OracleDialect
#database.hibernate.dialect=org.hibernate.dialect.MySQLDialect
database.hibernate.dialect=org.hibernate.dialect.HSQLDialect

<?xml version="1.0" encoding="UTF-8"?>
<!--
        | deployerConfigContext.xml centralizes into one file some of the declarative configuration that
        | all CAS deployers will need to modify.
        |
        | This file declares some of the Spring-managed JavaBeans that make up a CAS deployment.  
        | The beans declared in this file are instantiated at context initialization time by the Spring
        | ContextLoaderListener declared in web.xml.  It finds this file because this
        | file is among those declared in the context parameter "contextConfigLocation".
        |
        | By far the most common change you will need to make in this file is to change the last bean
        | declaration to replace the default SimpleTestUsernamePasswordAuthenticationHandler with
        | one implementing your approach for authenticating usernames and passwords.
        +-->
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:p="http://www.springframework.org/schema/p"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
        <!--
                | This bean declares our AuthenticationManager.  The CentralAuthenticationService service bean
                | declared in applicationContext.xml picks up this AuthenticationManager by reference to its id,
                | "authenticationManager".  Most deployers will be able to use the default AuthenticationManager
                | implementation and so do not need to change the class of this bean.  We include the whole
                | AuthenticationManager here in the userConfigContext.xml so that you can see the things you will
                | need to change in context.
                +-->
        <bean id="authenticationManager"
                class="org.jasig.cas.authentication.AuthenticationManagerImpl">
                <!--
                        | This is the List of CredentialToPrincipalResolvers that identify what Principal is trying to authenticate.
                        | The AuthenticationManagerImpl considers them in order, finding a CredentialToPrincipalResolver which
                        | supports the presented credentials.
                        |
                        | AuthenticationManagerImpl uses these resolvers for two purposes.  First, it uses them to identify the Principal
                        | attempting to authenticate to CAS /login .  In the default configuration, it is the DefaultCredentialsToPrincipalResolver
                        | that fills this role.  If you are using some other kind of credentials than UsernamePasswordCredentials, you will need to replace
                        | DefaultCredentialsToPrincipalResolver with a CredentialsToPrincipalResolver that supports the credentials you are
                        | using.
                        |
                        | Second, AuthenticationManagerImpl uses these resolvers to identify a service requesting a proxy granting ticket.
                        | In the default configuration, it is the HttpBasedServiceCredentialsToPrincipalResolver that serves this purpose.
                        | You will need to change this list if you are identifying services by something more or other than their callback URL.
                        +-->
                <property name="credentialsToPrincipalResolvers">
                        <list>
                                <!--
                                        | UsernamePasswordCredentialsToPrincipalResolver supports the UsernamePasswordCredentials that we use for /login
                                        | by default and produces SimplePrincipal instances conveying the username from the credentials.
                                        |
                                        | If you've changed your LoginFormAction to use credentials other than UsernamePasswordCredentials then you will also
                                        | need to change this bean declaration (or add additional declarations) to declare a CredentialsToPrincipalResolver that supports the
                                        | Credentials you are using.
                                        +-->
                                <bean
                                        class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" />
                                <!--
                                        | HttpBasedServiceCredentialsToPrincipalResolver supports HttpBasedCredentials.  It supports the CAS 2.0 approach of
                                        | authenticating services by SSL callback, extracting the callback URL from the Credentials and representing it as a
                                        | SimpleService identified by that callback URL.
                                        |
                                        | If you are representing services by something more or other than an HTTPS URL whereat they are able to
                                        | receive a proxy callback, you will need to change this bean declaration (or add additional declarations).
                                        +-->
                                <bean
                                        class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver" />
                        </list>
                </property>

                <!--
                        | Whereas CredentialsToPrincipalResolvers identify who it is some Credentials might authenticate,
                        | AuthenticationHandlers actually authenticate credentials.  Here we declare the AuthenticationHandlers that
                        | authenticate the Principals that the CredentialsToPrincipalResolvers identified.  CAS will try these handlers in turn
                        | until it finds one that both supports the Credentials presented and succeeds in authenticating.
                        +-->
                <property name="authenticationHandlers">
                        <list>
                                <!--
                                        | This is the authentication handler that authenticates services by means of callback via SSL, thereby validating
                                        | a server side SSL certificate.
                                        +-->
                                <bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
                                        p:httpClient-ref="httpClient" />
                                <!--
                                        | This is the authentication handler specified in the CAS-LDAP documentaion
                                        +-->
                                <bean class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler">
                                        <property name="filter" value="uid=%u" />
                                        <property name="searchBase" value="ou=OUR-OU,dc=interactivedata,dc=com" />
                                        <property name="contextSource" ref="contextSource" />
                                </bean>
                        </list>
                </property>
        </bean>


        <!--
                | This bean defines the security roles for the Services Management application.  Simple deployments can use the in-memory version.
                | More robust deployments will want to use another option, such as the Jdbc version.
       
                | The name of this should remain "userDetailsService" in order for Acegi to find it.
       
                | To use this, you should add an entry similar to the following between the two value tags:
                | battags=notused,ROLE_ADMIN
       
                | where battags is the username you want to grant access to.  You can put one entry per line.
                +-->
        <bean id="userDetailsService" class="org.acegisecurity.userdetails.memory.InMemoryDaoImpl">
                <property name="userMap">
                        <value>
                       
                    </value>
                </property>
        </bean>
       
        <!--
                | Bean that defines the attributes that a service may return.  This example uses the Stub/Mock version.  A real implementation
                | may go against a database or LDAP server.  The id should remain "attributeRepository" though.
                +-->
        <bean id="attributeRepository"
                class="org.jasig.services.persondir.support.StubPersonAttributeDao">
                <property name="backingMap">
                        <map>
                                <entry key="uid" value="uid" />
                                <entry key="eduPersonAffiliation" value="eduPersonAffiliation" />
                                <entry key="groupMembership" value="groupMembership" />
                        </map>
                </property>
        </bean>
       
        <!--
                | Sample, in-memory data store for the ServiceRegistry. A real implementation
                | would probably want to replace this with the JPA-backed ServiceRegistry DAO
                | The name of this bean should remain "serviceRegistryDao".
                +-->
        <bean
                id="serviceRegistryDao"
                class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl" />

        <!--
                | This is the bean specified in the CAS-LDAP documentation
                +-->
        <bean id="contextSource" class="org.jasig.cas.adaptors.ldap.util.AuthenticatedLdapContextSource">
                <property name="pooled" value="true"/>
                <property name="urls">
                        <list>
                                <value>ldaps://OUR-LDAP-SERVER-URL/</value>
                        </list>
                </property>
                <property name="anonymousReadOnly" value="false"/>
                <property name="userName" value="uid=ldapbrowser,ou=idms,dc=interactivedata,dc=com"/>
                <property name="password" value="br0ws3r$"/>
                <!--
                +-->

                <property name="baseEnvironmentProperties">
                        <map>
                                <entry>
                                        <key>
                                                <value>java.naming.security.authentication</value>
                                        </key>
                                        <value>simple</value>
                                </entry>
                        </map>
                </property>
        </bean>

</beans>


_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas

smime.p7s (3K) Download Attachment
David Whitehurst

Re: Building CAS

Reply Threaded More More options
Print post
Permalink
Matthew:

You're having the "CAS-that-I-built-deployment-problem" :-)  That's
why I still recommend you put the logging, the UI, the LDAP, etc.
aside.  Use your newly installed Maven 2.0.9 and build the CAS
download overall.  It automatically pulls the authenticator and builds
a CAS.war for you.  When that deploys, add the logging.  Do it again.
If you're successful, modify the UI for your CAS.war.  Deploy.  Test.

I'm purposely not trying to tell you what the error is.  I want you to
understand how to find the reason why your Spring bean won't
instantiate.  And, when your Spring bean doesn't instantiate, your
application that you built doesn't work.  I'll look over these files
and reply if I see something obvious.  I understand your pain there,
but if you start simple and add you'll be able to ask the list why
"this" configuration for this bean "classA" doesn't instantiate.

Simplify your CAS.war and deploy that successfully.  You're building it.

Let me know that goes,

David

On 10/10/08, Matthew Jones <[hidden email]> wrote:

> Hi David,
>
> > Also, did you configure the Maven build of the CAS server to include
> > the LDAP authentication module?
> >
>
> I have modified the pom.xml file to include:
>        <dependency>
>                        <groupId>org.jasig.cas</groupId>
>
> <artifactId>cas-server-support-ldap</artifactId>
>
> <version>${project.version}</version>
>        </dependency>
> I am not aware of any additional build (as opposed to deployment)
> configuration that I need to do.
>
> > If you didn't, I still recommend that
> > you deploy CAS unaltered first and then customize.
> >
>
> I have deployed the war file that is shipped with the 3.3 download and then
> configured it to use LDAP and the Spring LDAP jars by manually copying them.
> The changes I have made are identical to that system I had running. The only
> difference now is that I am trying to build my own war file and deploy that.
> I could just run a vanilla build and deploy the resulting war file and see
> if that works but I had hoped that I was only taking a small step. Indeed, I
> have had to upgrade maven to 2.09 and then run the build. The log file was a
> change that I had forgotten about and easily fixed. The war file I deploy
> does have the LDAP jars as part of it which I was told would be added for me
> having changed to LDAP authentication. Maven is not a system I have any
> previous experience with but have assumed, form what I have been told,
> should just work once you have the right version of course. Obviously, I am
> experiencing some other basic error which I had hoped would be obvious from
> the log files.
>
> Do you recommend that I do indeed try and build a vanilla 3.3 war file?
> Obviously, that will need the change to the log file location to work but
> shouldn't need anything else right?
>
> >
> > > Hi.  I've been implementing a CAS solution using 3.1.1 and LDAP to an
> > > Active Directory and unless you're a CAS expert I would recommend that
> > > you do things in steps.
> > >
> > > From your stacktrace, it's evident that you haven't configured
> > > something properly.  If you have the time, you should back up on
> > > customizing anything until you've successfully deployed CAS with the
> > > InMemoryDaoImpl (without LDAP) and been able to navigate to /cas/login
> > > and get a successful banner.
> > >
> > > If you do not want to do things in steps, you need to start with the
> > > trace.  Find the culprit Spring bean and start there.  It's not
> > > obvious from the trace what you've done wrong.  I'll say from
> > > experience that once you get CAS to work in it's default
> > > configuration, LDAP is next and it can be difficult.  I think too that
> > > everyone's situation is always a little different than the how-to's
> > > that you find in the wiki.  Or, you need to chose the right
> > > configuration for your house.
> > >
> > > Post your deployerConfigContext.xml and cas.properties here and I'll
> > > try to help.
> > >
> >
>
> Attached - deployerConfigContext.xml has obscured URL & OU (hence the XXX
> extension).
>
> In reality, I am trying to build a deployable .war file that has our
> configuration in having already gone through the "pain" of getting that
> configuration to work. That is, the LDAP authentication handler is working
> and with a changed image displayed on the login & logout pages. This is just
> the first step on the way to having to write a specific authentication
> handler to deal with certificate & username/password credentials and
> properly skinning CAS.
>
>
> Thanks
>
> --
> Matthew Jones
> Interactive Data Managed Solutions Ltd
> -----------------------------------------------------------------------
> Registered in England Company Number 3691868
> Registered Office: Fitzroy House, 13-17 Epworth Street, London, EC2A 4DL
> Tel: +44 (0)1242 694133 | Fax: +44 (0)1242 694109
> [hidden email]
> http://www.interactivedata-ms.com/694133
>
> This message (including any files transmitted with it) may contain
> confidential and/or proprietary information, is the property of Interactive
> Data Corporation and/or its subsidiaries, and is directed only to the
> addressee(s). If you are not the designated recipient or have reason to
> believe you received this message in error, please delete this message from
> your system and notify the sender immediately. An unintended recipient's
> disclosure, copying, distribution, or use of this message or any attachments
> is prohibited and may be unlawful.
> Interactive Data (Europe) Ltd Registered No. 949387 England Registered
> Office: Fitzroy House 13-17 Epworth Street. London. EC2A 4DL
>
>
> cas.securityContext.serviceProperties.service=https://localhost:8443/cas/services/j_acegi_cas_security_check
> cas.securityContext.casProcessingFilterEntryPoint.loginUrl=https://localhost:8443/cas/login
> cas.securityContext.ticketValidator.casServerUrlPrefix=https://localhost:8443/cas
>
> cas.themeResolver.defaultThemeName=default
> cas.viewResolver.basename=default_views
>
> host.name=cas
>
> #database.hibernate.dialect=org.hibernate.dialect.OracleDialect
> #database.hibernate.dialect=org.hibernate.dialect.MySQLDialect
> database.hibernate.dialect=org.hibernate.dialect.HSQLDialect
>
> _______________________________________________
> Yale CAS mailing list
> [hidden email]
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
>
_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas
Scott Battaglia-2

Re: Building CAS

Reply Threaded More More options
Print post
Permalink
In reply to this post by Matthew Jones-7
Matthew,

Looks like you pulled in your old deployerConfigContext.xml?  Would that be correct?  CAS 3.3 uses the latest version of Spring Security (well latest at the time) which replaced org.acegisecurity with org.springframework.security.

You probably just need to update your entries.

-Scott

-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia


On Fri, Oct 10, 2008 at 6:40 AM, Matthew Jones <[hidden email]> wrote:
I am still unable to successfully deploy the CAS server I have tried to build using Maven2. I enclose the details of my building and the errors from the logs when I try to run it. Please can anyone spot what I have missed out or forgotten to do? The LDAP authentication is identical to that of the downloaded .war file that previously had running.

Here is a find showing the files that I have changed under the cas-server-webapp directory where I run the build from:

# find . -newer src -type f -print
./src/main/webapp/images/logo_IDC.jpg
./src/main/webapp/css/cas.css
./src/main/webapp/WEB-INF/classes/log4j.properties
./src/main/webapp/WEB-INF/deployerConfigContext.xml
./src/main/webapp/WEB-INF/view/jsp/default/ui/includes/bottom.jsp
./pom.xml

I have hacked in a logo into the default scheme rather than properly skinning it. Other than that, I have changed the pom.xml and deployerConfixContext.xml files to use our LDAP server for authentication and put the correct value into log4j.properties so that cas.log appears in the same place as catalina.out (thus fixing the file create errors)

Version information:

# mvn --version
Maven version: 2.0.9

Java version: 1.6.0_06
OS name: "linux" version: "2.6.24-19-generic" arch: "amd64" Family: "unix"

Now here is the build

# mvn package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building JA-SIG CAS Web Application
[INFO]    task-segment: [package]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading: http://developer.ja-sig.org/maven2/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.pom
Downloading: http://repo1.maven.org/maven2/org/apache/santuario/xmlsec/1.4.0/xmlsec-1.4.0.pom
Downloading: http://developer.ja-sig.org/maven2/org/opensaml/opensaml/1.1b/opensaml-1.1b.pom
Downloading: http://repo1.maven.org/maven2/org/opensaml/opensaml/1.1b/opensaml-1.1b.pom
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[cas-server-webapp] in [/home/dj/workspace/cas-server-3.3/cas-server-webapp/target/cas-server-webapp-3.3]
[INFO] Processing war project
[INFO] Webapp assembled in[1132 msecs]
[INFO] Building war: /home/dj/workspace/cas-server-3.3/cas-server-webapp/target/cas.war
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] No goals needed for project - skipping
[INFO] [source:jar {execution: attach-sources}]
[INFO] Building jar: /home/dj/workspace/cas-server-3.3/cas-server-webapp/target/cas-server-webapp-3.3-sources.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15 seconds
[INFO] Finished at: Fri Oct 10 11:17:25 BST 2008
[INFO] Final Memory: 19M/47M
[INFO] ------------------------------------------------------------------------

I then deploy the created file target/cas.war onto the server using the Tomcat Web Application Manager on the server (running CentOS 5.2, Tomcat 5.5.23 and Sun Java JVM 1.6.0_06-b02). Prior to doing this I have un-deployed any old versions of CAS that were running, stopped Tomcat and truncated the log files. I then start Tomcat again and check that it is running correctly. No errors in catalina.out and nothing in cas.log.

The message displayed in the Tomcat Web Application Manager is 'OK' and the cas application appears at /cas but is not running.

Here is the contents of catalina.out from the start until the first error, I then remove the traceback information. The resulting errors are repeated too.

Using CATALINA_BASE:   /usr/share/tomcat5
Using CATALINA_HOME:   /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JRE_HOME:
Oct 7, 2008 5:08:23 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_06/jre/lib/i386/client:/usr/java/jdk1.6.0_06/jre/lib/i386:/usr/java/jdk1.6.0_06/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Oct 7, 2008 5:08:23 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Oct 7, 2008 5:08:24 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8443
Oct 7, 2008 5:08:24 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2969 ms
Oct 7, 2008 5:08:24 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 7, 2008 5:08:24 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
Oct 7, 2008 5:08:24 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Oct 7, 2008 5:08:26 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Oct 7, 2008 5:08:26 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Oct 7, 2008 5:08:27 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Oct 7, 2008 5:08:27 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Oct 7, 2008 5:08:27 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
Oct 7, 2008 5:08:27 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 7, 2008 5:08:27 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
Oct 7, 2008 5:08:27 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 7, 2008 5:08:27 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/93  config=null
Oct 7, 2008 5:08:27 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Oct 7, 2008 5:08:28 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3514 ms
Oct 7, 2008 5:25:05 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Associated with Deployer 'Catalina:type=Deployer,host=localhost'
Oct 7, 2008 5:25:05 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: init: Global resources are available
Oct 7, 2008 5:25:05 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
Oct 7, 2008 5:25:45 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive cas.war
2008-10-07 17:25:52,210 ERROR [org.springframework.web.context.ContextLoader] - <Context initialization failed>
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_authenticationManager': Cannot resolve reference to bean 'casAuthenticationProvider' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casAuthenticationProvider' defined in ServletContext resource [/WEB-INF/spring-configuration/securityContext.xml]: Cannot resolve reference to bean 'userDetailsService' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for bean with name 'userDetailsService' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]; nested exception is java.lang.ClassNotFoundException: org.acegisecurity.userdetails.memory.InMemoryDaoImpl
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casAuthenticationProvider' defined in ServletContext resource [/WEB-INF/spring-configuration/securityContext.xml]: Cannot resolve reference to bean 'userDetailsService' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for bean with name 'userDetailsService' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]; nested exception is java.lang.ClassNotFoundException: org.acegisecurity.userdetails.memory.InMemoryDaoImpl

2008-10-07 17:25:52,220 FATAL [org.jasig.cas.web.init.SafeContextLoaderListener] - <SafeContextLoaderListener:

The Spring ContextLoaderListener we wrap threw on contextInitialized.
But for our having caught this error, the web application context would not have initialized.>
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_authenticationManager': Cannot resolve reference to bean 'casAuthenticationProvider' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casAuthenticationProvider' defined in ServletContext resource [/WEB-INF/spring-configuration/securityContext.xml]: Cannot resolve reference to bean 'userDetailsService' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for bean with name 'userDetailsService' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]; nested exception is java.lang.ClassNotFoundException: org.acegisecurity.userdetails.memory.InMemoryDaoImpl
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casAuthenticationProvider' defined in ServletContext resource [/WEB-INF/spring-configuration/securityContext.xml]: Cannot resolve reference to bean 'userDetailsService' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for bean with name 'userDetailsService' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]; nested exception is java.lang.ClassNotFoundException: org.acegisecurity.userdetails.memory.InMemoryDaoImpl

Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for bean with name 'userDetailsService' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]; nested exception is java.lang.ClassNotFoundException:

SafeContextLoaderListener:
The Spring ContextLoaderListener we wrap threw on contextInitialized.
But for our having caught this error, the web application context would not have initialized.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_authenticationManager': Cannot resolve reference to bean 'casAuthenticationProvider' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casAuthenticationProvider' defined in ServletContext resource [/WEB-INF/spring-configuration/securityContext.xml]: Cannot resolve reference to bean 'userDetailsService' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for bean with name 'userDetailsService' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]; nested exception is java.lang.ClassNotFoundException:

SEVERE: Error filterStart
Oct 7, 2008 5:25:52 PM org.apache.catalina.core.StandardContext start

SEVERE: Context [/cas] startup failed due to previous errors
Oct 7, 2008 5:25:52 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'

cas.log seems to have pretty much the same information in it starting with the following:

2008-10-07 17:25:52,210 ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_authenticationManager': Cannot resolve reference to bean 'casAuthenticationProvider' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casAuthenticationProvider' defined in ServletContext resource [/WEB-INF/spring-configuration/securityContext.xml]: Cannot resolve reference to bean 'userDetailsService' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for bean with name 'userDetailsService' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]; nested exception is
[/WEB-INF/spring-configuration/securityContext.xml]: Cannot resolve reference to bean 'userDetailsService' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.acegisecurity.userdetails.memory.InMemoryDaoImpl] for bean with name 'userDetailsService' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]; nested exception is java.lang.ClassNotFoundException: --


All help gratefully received.


Thanks

--
Matthew Jones
Interactive Data Managed Solutions Ltd
-----------------------------------------------------------------------
Registered in England Company Number 3691868
Registered Office: Fitzroy House, 13-17 Epworth Street, London, EC2A 4DL
Tel: +44 (0)1242 694133 | Fax: +44 (0)1242 694109
[hidden email]
http://www.interactivedata-ms.com/694133

This message (including any files transmitted with it) may contain confidential and/or proprietary information, is the property of Interactive Data Corporation and/or its subsidiaries, and is directed only to the addressee(s). If you are not the designated recipient or have reason to believe you received this message in error, please delete this message from your system and notify the sender immediately. An unintended recipient's disclosure, copying, distribution, or use of this message or any attachments is prohibited and may be unlawful.
Interactive Data (Europe) Ltd Registered No. 949387 England Registered Office: Fitzroy House 13-17 Epworth Street. London. EC2A 4DL


_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas



_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas
Matthew Jones-7

Re: Building CAS

Reply Threaded More More options
Print post
Permalink
In reply to this post by David Whitehurst
Hi David,

> You're having the "CAS-that-I-built-deployment-problem" :-)  That's
> why I still recommend you put the logging, the UI, the LDAP, etc.
> aside.  Use your newly installed Maven 2.0.9 and build the CAS
> download overall.  It automatically pulls the authenticator and builds
> a CAS.war for you.  When that deploys, add the logging.  Do it again.
> If you're successful, modify the UI for your CAS.war.  Deploy.  Test.

All those done and all work
Next I modified the pom.xml file and it still works and the sping LDAP
jars are pulled in and appear in the libs folder.
Next, I edited deployerContextConfig.xml first just adding
AuthenticatedLdapContextSource without enabling it as the authentication
handler and then enabling it.

On each occasion, I stopped Tomcat (after un-deploying) and cleared the
log files so I could see that there were no errors. So I ended up
producing the correctly configured & working .war file.

When I was differencing my deployer config with one from one of my the
previous installs, I finally saw the difference in the file (which I
have just seen that Scott diagnosed, thanks Scott). I had obviously
managed to pull a 3.2.1 config file into my 3.3 tree. (I think I know
why that happened too, someone switched off my 3.3 test server!)

> I'm purposely not trying to tell you what the error is.  I want you to
> understand how to find the reason why your Spring bean won't
> instantiate.  And, when your Spring bean doesn't instantiate, your
> application that you built doesn't work.  I'll look over these files
> and reply if I see something obvious.  I understand your pain there,
> but if you start simple and add you'll be able to ask the list why
> "this" configuration for this bean "classA" doesn't instantiate.
>
> Simplify your CAS.war and deploy that successfully.  You're building it.

I'm not sure I am that much the wiser but I got to deploy my war file
loads of times and it does now work.

Thanks

--
Matthew Jones
Interactive Data Managed Solutions Ltd
-----------------------------------------------------------------------
Registered in England Company Number 3691868
Registered Office: Fitzroy House, 13-17 Epworth Street, London, EC2A 4DL
Tel: +44 (0)1242 694133 | Fax: +44 (0)1242 694109
[hidden email]
http://www.interactivedata-ms.com/694133

This message (including any files transmitted with it) may contain
confidential and/or proprietary information, is the property of
Interactive Data Corporation and/or its subsidiaries, and is directed
only to the addressee(s). If you are not the designated recipient or
have reason to believe you received this message in error, please delete
this message from your system and notify the sender immediately. An
unintended recipient's disclosure, copying, distribution, or use of this
message or any attachments is prohibited and may be unlawful.
Interactive Data (Europe) Ltd Registered No. 949387 England Registered
Office: Fitzroy House 13-17 Epworth Street. London. EC2A 4DL



_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas

smime.p7s (3K) Download Attachment
Scott Battaglia-2

Re: Building CAS

Reply Threaded More More options
Print post
Permalink
We probably need to do a better job of documenting when something changes in the deployerConfigContext.xml.  For the most part it doesn't change between releases, but when Spring Security changes their package name, it does :-)

If you can think of a good spot, let me know.

-Scott

-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia


On Fri, Oct 10, 2008 at 12:22 PM, Matthew Jones <[hidden email]> wrote:
Hi David,


You're having the "CAS-that-I-built-deployment-problem" :-)  That's
why I still recommend you put the logging, the UI, the LDAP, etc.
aside.  Use your newly installed Maven 2.0.9 and build the CAS
download overall.  It automatically pulls the authenticator and builds
a CAS.war for you.  When that deploys, add the logging.  Do it again.
If you're successful, modify the UI for your CAS.war.  Deploy.  Test.

All those done and all work
Next I modified the pom.xml file and it still works and the sping LDAP jars are pulled in and appear in the libs folder.
Next, I edited deployerContextConfig.xml first just adding AuthenticatedLdapContextSource without enabling it as the authentication handler and then enabling it.

On each occasion, I stopped Tomcat (after un-deploying) and cleared the log files so I could see that there were no errors. So I ended up producing the correctly configured & working .war file.

When I was differencing my deployer config with one from one of my the previous installs, I finally saw the difference in the file (which I have just seen that Scott diagnosed, thanks Scott). I had obviously managed to pull a 3.2.1 config file into my 3.3 tree. (I think I know why that happened too, someone switched off my 3.3 test server!)


I'm purposely not trying to tell you what the error is.  I want you to
understand how to find the reason why your Spring bean won't
instantiate.  And, when your Spring bean doesn't instantiate, your
application that you built doesn't work.  I'll look over these files
and reply if I see something obvious.  I understand your pain there,
but if you start simple and add you'll be able to ask the list why
"this" configuration for this bean "classA" doesn't instantiate.

Simplify your CAS.war and deploy that successfully.  You're building it.

I'm not sure I am that much the wiser but I got to deploy my war file loads of times and it does now work.


Thanks

--
Matthew Jones
Interactive Data Managed Solutions Ltd
-----------------------------------------------------------------------
Registered in England Company Number 3691868
Registered Office: Fitzroy House, 13-17 Epworth Street, London, EC2A 4DL
Tel: +44 (0)1242 694133 | Fax: +44 (0)1242 694109
[hidden email]
http://www.interactivedata-ms.com/694133

This message (including any files transmitted with it) may contain confidential and/or proprietary information, is the property of Interactive Data Corporation and/or its subsidiaries, and is directed only to the addressee(s). If you are not the designated recipient or have reason to believe you received this message in error, please delete this message from your system and notify the sender immediately. An unintended recipient's disclosure, copying, distribution, or use of this message or any attachments is prohibited and may be unlawful.
Interactive Data (Europe) Ltd Registered No. 949387 England Registered Office: Fitzroy House 13-17 Epworth Street. London. EC2A 4DL


_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas



_______________________________________________
Yale CAS mailing list
[hidden email]
http://tp.its.yale.edu/mailman/listinfo/cas