Thanks Misagh. That worked. Looks like an opensaml dependency in
cas-server-core pom.xml was causing joda-time 1.6.2. Added an exclusion to it
and added a Joda-time 2.1 dependancy and everything works now.
Dependency in cas-server-core pom.xml
<!-- Added Joda-time dependancy -->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml</artifactId>
<version>2.5.1-1</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</exclusion>
</exclusions>
</dependency>
Snippet from mvn dependency:tree
[INFO] +- org.opensaml:opensaml:jar:2.5.1-1:compile
[INFO] | +- org.opensaml:openws:jar:1.4.2-1:compile
[INFO] | | +- org.opensaml:xmltooling:jar:1.3.2-1:compile
[INFO] | | | +- org.slf4j:log4j-over-slf4j:jar:1.6.1:compile
[INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.6.1:compile
[INFO] | | | +- joda-time:joda-time:jar:1.6.2:compile
[INFO] | | | +- org.bouncycastle:bcprov-jdk15:jar:1.45:compile
[INFO] | | | +- ca.juliusdavies:not-yet-commons-ssl:jar:0.3.9:compile
[INFO] | | | \- net.jcip:jcip-annotations:jar:1.0:compile
[INFO] | | \- commons-httpclient:commons-httpclient:jar:3.1:compile
Thanks,
---
Abhijit
-----Original Message-----
From: Misagh Moayyed [mailto:[email protected]]
Sent: Tuesday, October 16, 2012 10:19 AM
To: [email protected]
Subject: RE: [cas-user] CAS 3.5.1 lppe LDAP
From the command line, execute: "mvn dependency:tree" and examine which
dependencies get resolved and exclude as needed.
-Misagh
> -----Original Message-----
> From: Abhijit Gaikwad [mailto:[email protected]]
> Sent: Tuesday, October 16, 2012 6:28 AM
> To: [email protected]
> Subject: RE: [cas-user] CAS 3.5.1 lppe LDAP
>
> Looks like something is creating a dependency for joda-time-1.6.2.jar
> while the cas-server-support-ldap is specifying joda-time 2.1. When I
> delete the joda-time-1.6.2.jar from lib and restart tomcat it works
> fine. Haven't figured out what is using the 1.6 yet as I couldn't find
> a dependency for it anywhere. Will figure it out.
>
> Thanks,
> Abhijit
>
> -----Original Message-----
> From: Abhijit [mailto:[email protected]]
> Sent: Monday, October 15, 2012 4:46 PM
> To: [email protected]
> Subject: [cas-user] CAS 3.5.1 lppe LDAP
>
>
> Hello,
> I am working on setting up CAS 3.5.1 using waroverlay method. I have
> mysql connection and basic LDAP authentication working correctly
> (using
> org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler)
>
> But when I try to follow the lppe instructions and use <ref
> bean="lppeEnabledLdapAuthenticationHandler" /> I get an error when it
> tries to read the password expiration date.
>
> Looks like for some reason it does not like the Datatime.parse()
> function in LdapPasswordPolicyEnforcement.java line 394 (final
> DateTime date = new DateTime(DateTime.parse(ldapResult, fmt),
> DEFAULT_TIME_ZONE);) It gives java.lang.NoSuchMethodError.
>
> Any ideas what I should do?
>
> Full trace:
> org.springframework.web.util.NestedServletException: Handler
> processing failed; nested exception is java.lang.NoSuchMethodError:
> org.joda.time.DateTime.parse(Ljava/lang/String;)L
> org/joda/time/DateTime;
> at
> org.springframework.web.servlet.DispatcherServlet.doDispatch(Dispatche
> rServle
> t.java:972)
> at
> org.springframework.web.servlet.DispatcherServlet.doService(Dispatcher
> Servlet
> .java:852)
> at
> org.springframework.web.servlet.FrameworkServlet.processRequest(Framew
> orkServ
> let.java:882)
> at
> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServl
> et.java
> :789)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at
> org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody2(SafeD
> ispatch
> erServlet.java:128)
> at
> org.jasig.cas.web.init.SafeDispatcherServlet.service_aroundBody3$advic
> e(SafeD
> ispatcherServlet.java:57)
> at
> org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherSer
> vlet.ja
> va:1)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
> cationF
> ilterChain.java:290)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
> lterCha
> in.java:206)
> at
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInterna
> l(Chara
> cterEncodingFilter.java:88)
> at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRe
> questFi
> lter.java:76)
> at
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(De
> legatin
> gFilterProxy.java:346)
> at
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(Delegati
> ngFilte
> rProxy.java:259)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
> cationF
> ilterChain.java:235)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
> lterCha
> in.java:206)
> at
> com.github.inspektr.common.web.ClientInfoThreadLocalFilter.doFilter(Cl
> ientInf
> oThreadLocalFilter.java:63)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
> cationF
> ilterChain.java:235)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
> lterCha
> in.java:206)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
> lve.jav
> a:233)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
> lve.jav
> a:191)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
> 109)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proces
> s(Http1
> 1Protocol.java:588)
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
> at java.lang.Thread.run(Thread.java:679)
>
>
> Caused by: java.lang.NoSuchMethodError:
> org.joda.time.DateTime.parse(Ljava/lang/String;)Lorg/joda/time/DateTime;
> at
> org.jasig.cas.adaptors.ldap.LdapPasswordPolicyEnforcer.formatDateByPat
> tern(Ld
> apPasswordPolicyEnforcer.java:398)
> at
> org.jasig.cas.adaptors.ldap.LdapPasswordPolicyEnforcer.getExpirationDa
> teToUse
> (LdapPasswordPolicyEnforcer.java:420)
> at
> org.jasig.cas.adaptors.ldap.LdapPasswordPolicyEnforcer.getNumberOfDays
> ToPassw
> ordExpirationDate(LdapPasswordPolicyEnforcer.java:227)
> at
> org.jasig.cas.web.flow.PasswordPolicyEnforcementAction.doExecute(Passw
> ordPoli
> cyEnforcementAction.java:120)
> at
> org.springframework.webflow.action.AbstractAction.execute(AbstractActi
> on.java
> :188)
> at
> org.springframework.webflow.execution.ActionExecutor.execute(ActionExe
> cutor.j
> ava:51)
> at
> org.springframework.webflow.action.EvaluateAction.doExecute(EvaluateAc
> tion.ja
> va:77)
> at
> org.springframework.webflow.action.AbstractAction.execute(AbstractActi
> on.java
> :188)
> at
> org.springframework.webflow.execution.AnnotatedAction.execute(Annotate
> dAction
> .java:145)
> at
> org.springframework.webflow.execution.ActionExecutor.execute(ActionExe
> cutor.j
> ava:51)
> at
> org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:101)
> at org.springframework.webflow.engine.State.enter(State.java:194)
> at
> org.springframework.webflow.engine.Transition.execute(Transition.java:227)
> at
> org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(Flow
> Executi
> onImpl.java:393)
> at
> org.springframework.webflow.engine.impl.RequestControlContextImpl.exec
> ute(Req
> uestControlContextImpl.java:214)
> at
> org.springframework.webflow.engine.TransitionableState.handleEvent(Tra
> nsition
> ableState.java:119)
> at
> org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555)
> at
> org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(
> FlowExe
> cutionImpl.java:388)
> at
> org.springframework.webflow.engine.impl.RequestControlContextImpl.hand
> leEvent
> (RequestControlContextImpl.java:210)
> at
> org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105)
> at org.springframework.webflow.engine.State.enter(State.java:194)
> at
> org.springframework.webflow.engine.Transition.execute(Transition.java:227)
> at
> org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(Flow
> Executi
> onImpl.java:393)
> at
> org.springframework.webflow.engine.impl.RequestControlContextImpl.exec
> ute(Req
> uestControlContextImpl.java:214)
> at
> org.springframework.webflow.engine.TransitionableState.handleEvent(Tra
> nsition
> ableState.java:119)
> at
> org.springframework.webflow.engine.Flow.handleEvent(Flow.java:555)
> at
> org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(
> FlowExe
> cutionImpl.java:388)
> at
> org.springframework.webflow.engine.impl.RequestControlContextImpl.hand
> leEvent
> (RequestControlContextImpl.java:210)
> at
> org.springframework.webflow.engine.ViewState.handleEvent(ViewState.java:232)
> at
> org.springframework.webflow.engine.ViewState.resume(ViewState.java:196)
> at org.springframework.webflow.engine.Flow.resume(Flow.java:545)
> at
> org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowE
> xecutio
> nImpl.java:261)
> at
> org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(
> FlowExe
> cutorImpl.java:169)
> at
> org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(Flow
> Handler
> Adapter.java:183)
> at
> org.springframework.web.servlet.DispatcherServlet.doDispatch(Dispatche
> rServle
> t.java:923)
>
>
> --
> You are currently subscribed to [email protected] as:
> [email protected]
> To unsubscribe, change settings or access archives, see http://www.ja-
> sig.org/wiki/display/JSG/cas-user
>
> --
> You are currently subscribed to [email protected] as:
> [email protected]
> To unsubscribe, change settings or access archives, see http://www.ja-
> sig.org/wiki/display/JSG/cas-user
--
You are currently subscribed to [email protected] as: [email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user