having difficulty with dependencies when upgrading to CAS 5.2.0

1,087 views
Skip to first unread message

crdaudt

unread,
Dec 8, 2017, 1:37:31 PM12/8/17
to CAS Community
I am attempting to update from CAS 5.1.4 to 5.2.0 in our test environment, but am having dependency issues.  The maven build works without errors, but I receive the following WARN message in cas.log when I deploy and start tomcat:

2017-12-08 08:54:56,387 WARN [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'casReportsConfiguration': Unsatisfied dependency expressed through field 'authenticationSystemSupport'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultAuthenticationSystemSupport' defined in class path resource [org/apereo/cas/config/CasCoreAuthenticationSupportConfiguration.class]: Unsatisfied dependency expressed through method 'defaultAuthenticationSystemSupport' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticationTransactionManager' defined in class path resource [org/apereo/cas/config/CasCoreAuthenticationConfiguration.class]: Unsatisfied dependency expressed through method 'authenticationTransactionManager' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'casAuthenticationManager' defined in class path resource [org/apereo/cas/config/CasCoreAuthenticationConfiguration.class]: Unsatisfied dependency expressed through method 'casAuthenticationManager' parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationEventExecutionPlan' defined in class path resource [org/apereo/cas/config/CasCoreAuthenticationConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apereo.cas.authentication.AuthenticationEventExecutionPlan]: Factory method 'authenticationEventExecutionPlan' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapAuthenticationHandlers' defined in class path resource [org/apereo/cas/config/LdapAuthenticationConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.util.Collection]: Factory method 'ldapAuthenticationHandlers' threw exception; nested exception is java.lang.NoSuchMethodError: org.ldaptive.ConnectionConfig.setConnectTimeout(Ljava/time/Duration;)V>

Then I receive an ERROR message that my Application startup failed.

I did not have these WARN and ERROR messages with v5.1.4.  I am not sure how to track this down.

Attached are the first 82 lines of my cas.log file, my pom.xml file for CAS 5.2.0, and my working pom.xml file used to build CAS 5.1.4.

Any ideas?


cas.log
pom.xml
pom.xml--before_update_to_cas_5.2.0_on_20171206

crdaudt

unread,
Dec 12, 2017, 11:17:31 AM12/12/17
to CAS Community
Just a quick addendum:  I tried deleting the repositories in my .m2 directory prior to performing a maven build in order to make sure that preexisting repos were not the cause of my issue.  I am still having the same issue.
Thanks in advance to anyone who can assist with some ideas.

David Curry

unread,
Dec 12, 2017, 11:29:24 AM12/12/17
to cas-...@apereo.org
Just a thought...

When you went from 5.1.4 to 5.2.0, did you update the Maven overlay template from GitHub and then re-apply your local changes, or did you just update ${cas.version}?

In my (limited) experience, just updating the version doesn't always work, and it's better to update from the repo every time a new version comes out.

--Dave



--

DAVID A. CURRY, CISSP
DIRECTOR OF INFORMATION SECURITY
INFORMATION TECHNOLOGY

71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
+1 212 229-5300 x4728david...@newschool.edu

The New School


--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/bbbd7035-fa1b-4829-9ceb-84a8394d710f%40apereo.org.

crdaudt

unread,
Dec 13, 2017, 8:50:48 AM12/13/17
to CAS Community
I updated from the repo.  My guess is that I missed something in doing so, but I have not been able to figure out what I missed.  Thanks Dave.


On Tuesday, December 12, 2017 at 11:29:24 AM UTC-5, David Curry wrote:
Just a thought...

When you went from 5.1.4 to 5.2.0, did you update the Maven overlay template from GitHub and then re-apply your local changes, or did you just update ${cas.version}?

In my (limited) experience, just updating the version doesn't always work, and it's better to update from the repo every time a new version comes out.

--Dave
On Tue, Dec 12, 2017 at 11:17 AM, crdaudt <crd...@taylor.edu> wrote:
Just a quick addendum:  I tried deleting the repositories in my .m2 directory prior to performing a maven build in order to make sure that preexisting repos were not the cause of my issue.  I am still having the same issue.
Thanks in advance to anyone who can assist with some ideas.

On Friday, December 8, 2017 at 1:37:31 PM UTC-5, crdaudt wrote:
I am attempting to update from CAS 5.1.4 to 5.2.0 in our test environment, but am having dependency issues.  The maven build works without errors, but I receive the following WARN message in cas.log when I deploy and start tomcat:

2017-12-08 08:54:56,387 WARN [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'casReportsConfiguration': Unsatisfied dependency expressed through field 'authenticationSystemSupport'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultAuthenticationSystemSupport' defined in class path resource [org/apereo/cas/config/CasCoreAuthenticationSupportConfiguration.class]: Unsatisfied dependency expressed through method 'defaultAuthenticationSystemSupport' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticationTransactionManager' defined in class path resource [org/apereo/cas/config/CasCoreAuthenticationConfiguration.class]: Unsatisfied dependency expressed through method 'authenticationTransactionManager' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'casAuthenticationManager' defined in class path resource [org/apereo/cas/config/CasCoreAuthenticationConfiguration.class]: Unsatisfied dependency expressed through method 'casAuthenticationManager' parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationEventExecutionPlan' defined in class path resource [org/apereo/cas/config/CasCoreAuthenticationConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apereo.cas.authentication.AuthenticationEventExecutionPlan]: Factory method 'authenticationEventExecutionPlan' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapAuthenticationHandlers' defined in class path resource [org/apereo/cas/config/LdapAuthenticationConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.util.Collection]: Factory method 'ldapAuthenticationHandlers' threw exception; nested exception is java.lang.NoSuchMethodError: org.ldaptive.ConnectionConfig.setConnectTimeout(Ljava/time/Duration;)V>

Then I receive an ERROR message that my Application startup failed.

I did not have these WARN and ERROR messages with v5.1.4.  I am not sure how to track this down.

Attached are the first 82 lines of my cas.log file, my pom.xml file for CAS 5.2.0, and my working pom.xml file used to build CAS 5.1.4.

Any ideas?


--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

David Curry

unread,
Dec 13, 2017, 8:58:04 AM12/13/17
to cas-...@apereo.org
I did have one issue where the warn/error-level messages in the logs were more confusing than helpful, but setting the global log level to "debug" gave me enough additional insight to figure it out.

Line 11 or so in etc/cas/config/log4j2.xml:

<Property name="cas.log.level" >debug</Property>

Might help... can't hurt... good luck.

--Dave


--

DAVID A. CURRY, CISSP
DIRECTOR OF INFORMATION SECURITY
INFORMATION TECHNOLOGY

71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
+1 212 229-5300 x4728david...@newschool.edu

The New School


To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/5374cf0a-d310-40a7-b4c1-ac0d2627c8da%40apereo.org.

crdaudt

unread,
Dec 14, 2017, 11:30:31 AM12/14/17
to CAS Community
Changing the cas.log.level property to debug in etc/cas/config/log4j2.xml did not provide any additional information that was helpful.  I have attached a copy of part of the cas.log file with debug enabled.
Thanks Dave.  Any other ideas?


On Wednesday, December 13, 2017 at 8:58:04 AM UTC-5, David Curry wrote:
I did have one issue where the warn/error-level messages in the logs were more confusing than helpful, but setting the global log level to "debug" gave me enough additional insight to figure it out.

Line 11 or so in etc/cas/config/log4j2.xml:

<Property name="cas.log.level" >debug</Property>

Might help... can't hurt... good luck.

--Dave

cas-debug.log

David Curry

unread,
Dec 14, 2017, 12:13:26 PM12/14/17
to cas-...@apereo.org
This is PURE speculation, but I see this dependency in your 5.2 pom.xml:

        <dependency>
            <groupId>org.ldaptive</groupId>
            <artifactId>ldaptive-unboundid</artifactId>
            <version>1.0</version>
        </dependency>

What is that?

I cannot find any mention of it in the CAS documentation searching for "ldaptive-unboundid", which makes me think it might not be something you actually need. Although I see it was in your 5.1.4 pom.xml too... so maybe it's something you used to need and now you don't? What happens if you delete it or comment it out?

I do see this mention of UnboundId in the CAS docs with a completely different dependency:


but I don't know anything about UnboundId or SCIM, so I have no clue whether this is even relevant. Does it make sense to try that instead?

If the ldaptive-unboundid dependency is something you need (and I do see some other folks on the mailing list have it in their pom.xml files as well), I do see one post that has a version number newer than yours (1.2.1 instead of 1.0):


And a quick Google search for "maven ldaptive-unboundid" suggests that 1.2.3 is the most current version... Maybe some update to the ldaptive libraries behind the scenes requires that you now include a newer version of that library?

As I say, that's all speculation on my part, but since the errors you're getting seem to be coming from the LDAP area... it's a thought?

--Dave
 




--

DAVID A. CURRY, CISSP
DIRECTOR OF INFORMATION SECURITY
INFORMATION TECHNOLOGY

71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
+1 212 229-5300 x4728david...@newschool.edu

The New School


--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/81ff0b71-1ab9-4a9b-b17d-6ef3c79a64e7%40apereo.org.

Adam Causey

unread,
Dec 14, 2017, 2:41:54 PM12/14/17
to cas-...@apereo.org
Most of the unsatisfied dependency problems that I have encountered with Maven have dealt with thinking that I am using a newer version of a dependency when in fact it is getting overridden by an older dependency. If you're using Eclipse or other IDE that has a Dependency Hierarchy view when viewing the POM I would take advantage of that. Make sure none of your dependencies are overriding newer ones that CAS 5.2 is pulling in and expecting.

I also second David Curry's idea that you might try removing or updating the version of the ldaptive-unboundid artifact to the latest version or even try removing it as a test to see if the error message goes away or changes.
​​

​-Adam​


To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.

David Curry

unread,
Dec 14, 2017, 3:04:48 PM12/14/17
to cas-...@apereo.org
Adam's advice reminded me that you can ask Maven (even without an IDE) to give you a dependency tree:

./mvnw dependency:tree -Dverbose

Redirect the output to a file; there'll be a lot of it. It's not real easy to read, but when you're really stuck...


--Dave


--

DAVID A. CURRY, CISSP
DIRECTOR OF INFORMATION SECURITY
INFORMATION TECHNOLOGY

71 FIFTH AVE., 9TH FL., NEW YORK, NY 10003
+1 212 229-5300 x4728david...@newschool.edu

The New School


--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.

crdaudt

unread,
Dec 18, 2017, 1:38:58 PM12/18/17
to CAS Community
Removing the dependency with the org.ldaptive groupId and ldaptive-unboundid artifactId solved my issue.  Thank you, David, for steering my on the right track.

Now
I have another issue related to my cas.serviceRegistry.config.location property setting not working, but I will post that in a separate post.

Carl
 

On Thursday, December 14, 2017 at 3:04:48 PM UTC-5, David Curry wrote:
Adam's advice reminded me that you can ask Maven (even without an IDE) to give you a dependency tree:

./mvnw dependency:tree -Dverbose

Redirect the output to a file; there'll be a lot of it. It's not real easy to read, but when you're really stuck...


--Dave

On Thu, Dec 14, 2017 at 2:41 PM, Adam Causey <apca...@vcu.edu> wrote:
Most of the unsatisfied dependency problems that I have encountered with Maven have dealt with thinking that I am using a newer version of a dependency when in fact it is getting overridden by an older dependency. If you're using Eclipse or other IDE that has a Dependency Hierarchy view when viewing the POM I would take advantage of that. Make sure none of your dependencies are overriding newer ones that CAS 5.2 is pulling in and expecting.

I also second David Curry's idea that you might try removing or updating the version of the ldaptive-unboundid artifact to the latest version or even try removing it as a test to see if the error message goes away or changes.
​​

​-Adam​

On Thu, Dec 14, 2017 at 12:13 PM, David Curry <david...@newschool.edu> wrote:
This is PURE speculation, but I see this dependency in your 5.2 pom.xml:

        <dependency>
            <groupId>org.ldaptive</groupId>
            <artifactId>ldaptive-unboundid</artifactId>
            <version>1.0</version>
        </dependency>

What is that?

I cannot find any mention of it in the CAS documentation searching for "ldaptive-unboundid", which makes me think it might not be something you actually need. Although I see it was in your 5.1.4 pom.xml too... so maybe it's something you used to need and now you don't? What happens if you delete it or comment it out?

I do see this mention of UnboundId in the CAS docs with a completely different dependency:


but I don't know anything about UnboundId or SCIM, so I have no clue whether this is even relevant. Does it make sense to try that instead?

If the ldaptive-unboundid dependency is something you need (and I do see some other folks on the mailing list have it in their pom.xml files as well), I do see one post that has a version number newer than yours (1.2.1 instead of 1.0):


And a quick Google search for "maven ldaptive-unboundid" suggests that 1.2.3 is the most current version... Maybe some update to the ldaptive libraries behind the scenes requires that you now include a newer version of that library?

As I say, that's all speculation on my part, but since the errors you're getting seem to be coming from the LDAP area... it's a thought?

--Dave
Reply all
Reply to author
Forward
0 new messages