FWIW - cas-addons project is not officially supported on CAS 4.x series as 
noted here: https://github.com/Unicon/cas-addons#notice 
<https://github.com/Unicon/cas-addons#notice>

Best,
D.

> On Aug 5, 2015, at 7:11 AM, Nouman Fallouh <[email protected]> wrote:
> 
> I'd used the version 4.0.3 and everything goes fine where I'd integrated the 
> OTP factor in my implementation by using the class `TOTP.java` from the 
> `cas-addons project` in a custom package of mine.
> 
> My problem comes when I tried to use the cas-addons project it self by adding 
> it as a dependency in the `pom.xml` like this:
> 
> <dependency>
>       <groupId>net.unicon.cas</groupId>
>       <artifactId>cas-addons</artifactId>
>       <version>1.17</version>
> </dependency>
> 
> The server starts up nicely but when submitting credentials it fails with an 
> red error message:
> CAS is Unavailable
> 
> There was an error trying to complete your request. Please notify your 
> support desk or try again.
> 
> The tomcat log gives this:
> 
> 05-Aug-2015 13:38:49.488 SEVERE [http-nio-8443-exec-394] 
> org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for 
> servlet [cas] in context with path [/cas] threw exception [Request processing 
> failed; nested exception is 
> org.springframework.webflow.execution.ActionExecutionException: Exception 
> thrown executing [AnnotatedAction@1732d886 targetAction = 
> [EvaluateAction@3c81c920 expression = 
> authenticationViaFormAction.submit(flowRequestContext, flowScope.credential, 
> messageContext), resultExpression = [null]], attributes = map[[empty]]] in 
> state 'realSubmit' of flow 'login' -- action execution attributes were 
> 'map[[empty]]'] with root cause
>  java.lang.NoClassDefFoundError: Could not initialize class 
> org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint
>       at 
> org.springframework.aop.aspectj.AspectJAroundAdvice.lazyGetProceedingJoinPoint(AspectJAroundAdvice.java:79)
> 
> So, where I made it wrong? what's the perfect way to use the cas-addons 
> project where I need from it:
> the TOTP class
> the JSON service registry
> Best regards
> 
> On Mon, Jul 13, 2015 at 5:53 PM, Misagh Moayyed <[email protected] 
> <mailto:[email protected]>> wrote:
> The 4.1 branch is not exactly active and maintained, because the release is 
> not yet available. You’ll need to compare your cas.properties with that of 
> CAS 4.1, find out what’s missing in yours and add them .
> 
> - Misagh
> 
>> On Jul 13, 2015, at 4:19 AM, Nouman Fallouh <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> First, the line #110 in this page:
>> https://github.com/UniconLabs/simple-cas4-overlay-template/blob/4.1/etc/cas.properties
>>  
>> <https://github.com/UniconLabs/simple-cas4-overlay-template/blob/4.1/etc/cas.properties>
>> Shouldn't it be commented !?
>> 
>> Then, I did so and I'd literally followed the instructions there and when 
>> running (mvn clean package) I saw this line:
>> Downloading: 
>> https://oss.sonatype.org/content/repositories/snapshots/org/jasig/cas/cas-server-webapp/4.1.0-SNAPSHOT/cas-server-webapp-4.1.0-20150711.162329-701.war
>>  
>> <https://oss.sonatype.org/content/repositories/snapshots/org/jasig/cas/cas-server-webapp/4.1.0-SNAPSHOT/cas-server-webapp-4.1.0-20150711.162329-701.war>
>> It downloaded this .war file (39329 KB) don't know why?!
>> 
>> Then when trying to deploy it it failed, would you please see this brief 
>> from the log:
>> SLF4J: Class path contains multiple SLF4J bindings.
>> SLF4J: Found binding in 
>> [jar:file:/opt/tomcat8/webapps/cas/WEB-INF/lib/log4j-slf4j-impl-2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: Found binding in 
>> [jar:file:/opt/tomcat8/webapps/cas/WEB-INF/lib/cas-server-core-4.1.0-SNAPSHOT.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings 
>> <http://www.slf4j.org/codes.html#multiple_bindings> for an explanation.
>> SLF4J: Actual binding is of type 
>> [org.apache.logging.slf4j.Log4jLoggerFactory]
>> 2015-07-13 04:58:34,893 INFO [org.jasig.cas.CasEnvironmentContextListener] - 
>> <
>> ******************** Welcome to CAS ********************
>> CAS Version: 4.1.0-SNAPSHOT
>> Java Home: /usr/lib/jvm/java-8-oracle/jre
>> Java Vendor: Oracle Corporation
>> Java Version: 1.8.0_40
>> OS Architecture: amd64
>> OS Name: Linux
>> OS Version: 3.2.0-4-amd64
>> *******************************************************
>> >
>> 2015-07-13 04:58:35,262 WARN 
>> [org.springframework.web.context.support.XmlWebApplicationContext] - 
>> <Exception encountered during context initialization - cancelling refresh 
>> attempt>
>> org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean 
>> definition with name 'cookieCipherExecutor' defined in ServletContext 
>> resource 
>> [/WEB-INF/spring-configuration/ticketGrantingTicketCookieGenerator.xml]: 
>> Could not resolve placeholder 'tgc.encryption.key' in string value 
>> "${tgc.encryption.key}"; nested exception is 
>> java.lang.IllegalArgumentException: Could not resolve placeholder 
>> 'tgc.encryption.key' in string value "${tgc.encryption.key}"
>>  
>> I didn't face such problems in previous versions, I reached a point of 
>> creating my own AuthenticationHandler with additional OTP credentials then 
>> stopped because of the new upgrading of the services management. Now I'm 
>> failing at the first step, this is really annoying me.
>> 
>> Any help is appreciated
>> 
>> Regards
>> 
>> On Sat, Jul 11, 2015 at 1:45 AM, Misagh Moayyed <[email protected] 
>> <mailto:[email protected]>> wrote:
>> See https://github.com/UniconLabs/simple-cas4-overlay-template#configuration 
>> <https://github.com/UniconLabs/simple-cas4-overlay-template#configuration>
>>  
>> 
>> From: Nouman Fallouh [mailto:[email protected] 
>> <mailto:[email protected]>] 
>> Sent: Friday, July 10, 2015 2:47 PM
>> 
>> 
>> To: [email protected] <mailto:[email protected]>
>> Subject: Re: [cas-user] JSON Service Management
>> 
>>  
>> 
>> I've been waiting for the 4.1 version for a while, and I found that a 
>> SNAPSHOT version is here:
>> 
>> (https://github.com/UniconLabs/simple-cas4-overlay-template 
>> <https://github.com/UniconLabs/simple-cas4-overlay-template>) in branch 4.1 
>> so:
>> 
>>  
>> 
>> - I checked out the 4.1 branch, 
>> 
>> - moved the files (cas.properties and log4j.xml) outside to /etc/cas and 
>> 
>> - linked `cas.propertie` in the `propertyFileConfigurer.xml` 
>> 
>> - added the `tgc.encryption.key` and `tgc.signing.key` attributes to the 
>> cas.properties.
>> 
>> - run (mvn clean package)
>> 
>>  
>> 
>> The problem comes when tomcat8 failed to deploy the `cas.war` with error 
>> that spring can't see the /etc/cas/log4j.xml:
>> 
>> java.io.FileNotFountException: ServletContext resource [/etc/cas/log4j.xml] 
>> cannot be resolved to URL because it does not exists.
>> 
>>  
>> 
>> Where might things are wrong?
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>> On Mon, Apr 20, 2015 at 10:37 PM, Misagh Moayyed <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> I’d hand massage the files for now. Changes to the files should be reloaded 
>> by CAS periodically. Once the management app is functional, you can then 
>> simply use the same SNAPSHOT version in your pom to redeploy it.
>> 
>>  
>> 
>> From: Nouman Fallouh [mailto:[email protected] 
>> <mailto:[email protected]>] 
>> Sent: Sunday, April 19, 2015 11:47 PM
>> 
>> 
>> To: [email protected] <mailto:[email protected]>
>> Subject: Re: [cas-user] JSON Service Management
>> 
>>  
>> 
>> I'd read most of the discussions in the link, and to be honest I didn't find 
>> real answer to my problem, what do you suggest? should I wait for the new 
>> release?
>> 
>>  
>> 
>> On Thu, Apr 16, 2015 at 4:29 PM, Misagh Moayyed <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Log doesn’t tell much, but you’re probably affected by this issue and other 
>> related linked issues:
>> 
>> https://github.com/Jasig/cas/issues/496 
>> <https://github.com/Jasig/cas/issues/496>
>>  
>> 
>>  
>> 
>> From: Nouman Fallouh [mailto:[email protected] 
>> <mailto:[email protected]>] 
>> Sent: Thursday, April 16, 2015 4:26 AM
>> 
>> 
>> To: [email protected] <mailto:[email protected]>
>> Subject: Re: [cas-user] JSON Service Management
>> 
>>  
>> 
>> First of all, thanks a lot for your help and support, they were like life 
>> savers.
>> 
>> Secondly, I'm afraid this is not the correct place to ask for issues and 
>> support, so is it? if not please route me there?
>> 
>>  
>> 
>> Now, I've configured the `cas-management-webapp`, from the link you 
>> previously sent, to use my CAS server with JSON service registry. The 
>> settings are the default ones for the services definition directory and the 
>> user is the default "casuser" one.
>> 
>>  
>> 
>> The good thing is I could deploy it correctly but when trying to use it the 
>> following error appears in the management web page:
>> 
>> The CAS management webapp is Unavailable
>> There was an error trying to complete your request. Please notify your 
>> support desk or try again.
>> 
>>  
>> 
>> Attached file contains the `catalina.out` needed log.
>> 
>>  
>> 
>> On Thu, Apr 16, 2015 at 12:26 PM, Misagh Moayyed <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> No you’re not. We just have not kept the 4.1 branch up to date because it’s 
>> still in dev and subject to change.
>> 
>>  
>> 
>> Seems like you’re just missing  a few settings. Compare your cas.properties 
>> with this:
>> 
>> https://github.com/Jasig/cas/blob/master/cas-server-webapp/src/main/webapp/WEB-INF/cas.properties
>>  
>> <https://github.com/Jasig/cas/blob/master/cas-server-webapp/src/main/webapp/WEB-INF/cas.properties>
>>  
>> 
>> and add the missing settings.
>> 
>>  
>> 
>> From: Nouman Fallouh [mailto:[email protected] 
>> <mailto:[email protected]>] 
>> Sent: Thursday, April 16, 2015 2:18 AM
>> 
>> 
>> To: [email protected] <mailto:[email protected]>
>> Subject: Re: [cas-user] JSON Service Management
>> 
>>  
>> 
>> I'm trying to redo things with version 4.1.0-SNAPSHOT so I cloned the CAS 
>> overlay template from here:
>> 
>> https://github.com/UniconLabs/simple-cas4-overlay-template/tree/4.1 
>> <https://github.com/UniconLabs/simple-cas4-overlay-template/tree/4.1>
>> and switched to the branch 4.1, moved the properties files to `/etc/cas41` 
>> and modified the `propertyFileConfigurer.xml` to point to the correct file:
>> 
>> <util:properties id="casProperties" 
>> location="file:/etc/cas41/cas.properties" />
>>     <context:property-placeholder properties-ref="casProperties" />
>> 
>>  
>> 
>> Then mvn clean package works fine but when deploying it failed with the 
>> following exception in the `catalina.out` log file:
>> 
>> ERROR [org.springframework.web.context.ContextLoader] - <Context 
>> initialization failed
>> org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean 
>> definition with name 'cookieCipherExecutor' defined in ServletContext 
>> resource [/WEB-INF/sp
>> ring-configuration/ticketGrantingTicketCookieGenerator.xml]: Could not 
>> resolve placeholder 'tgc.encryption.key' in string value 
>> "${tgc.encryption.key}"; nested exceptio
>> n is java.lang.IllegalArgumentException: Could not resolve placeholder 
>> 'tgc.encryption.key' in string value "${tgc.encryption.key}"
>> 
>> ....
>> 
>> ... 
>> 
>> Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 
>> 'tgc.encryption.key' in string value "${tgc.encryption.key}" 
>> 
>>  
>> 
>> Am I missing something here? cause this is default installation ??!!
>> 
>>  
>> 
>> Best regards
>> 
>>  
>> 
>>  
>> 
>> On Mon, Apr 13, 2015 at 12:56 PM, Misagh Moayyed <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> 4.1.0-SNAPSHOT should work, yes. I can’t exactly comment on the next release 
>> date, but I can tell you we are close. The only major issue pending is the 
>> redesigning of the management webapp and I have been working on that issue 
>> for a while with a UX expert to make it more adopter friendly and 
>> functional. Once that is taken care of, we should be able to proceed forward.
>> 
>>  
>> 
>> From: Nouman Fallouh [mailto:[email protected] 
>> <mailto:[email protected]>] 
>> Sent: Monday, April 13, 2015 2:47 AM
>> To: [email protected] <mailto:[email protected]>
>> Subject: Re: [cas-user] JSON Service Management
>> 
>>  
>> 
>> Yes indeed, I discovered my fault when seeing that the 
>> `JsonServiceRegistryDao` defined in the v4.1.0-SNAPSHOT but not in the one 
>> I'm using v4.0.1.
>> 
>>  
>> 
>> Do you think that if I used the new version v4.1.0-SNAPSHOT in my pom.xml 
>> file might solve my problem?
>> 
>>  
>> 
>> Honestly, I would rather not using alternative solutions, when do you think 
>> the new release might be available? if it's not that long, I could use the 
>> `InMemoryServiceRegistryDaoImpl` instead during this period.
>> 
>>  
>> 
>> Best regards
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>> On Mon, Apr 13, 2015 at 12:02 PM, Misagh Moayyed <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> This is because you are trying to use functionality that does not exist in 
>> CAS4. The docs you reference below are in “development” (as the note at the 
>> top of the page says) and apply to code that not released yet.
>> 
>>  
>> 
>> This is the correct link for CAS 4.0:
>> 
>> http://jasig.github.io/cas/4.0.x/installation/Service-Management.html 
>> <http://jasig.github.io/cas/4.0.x/installation/Service-Management.html>
>>  
>> 
>> This might be a viable option for CAS4 if you are looking for alternative 
>> service registry options:
>> 
>> https://github.com/unicon-cas-addons/cas-addon-yaml-services-registry 
>> <https://github.com/unicon-cas-addons/cas-addon-yaml-services-registry>
>>  
>> 
>> From: Nouman Fallouh [mailto:[email protected] 
>> <mailto:[email protected]>] 
>> Sent: Sunday, April 12, 2015 11:22 PM
>> To: [email protected] <mailto:[email protected]>
>> Subject: [cas-user] JSON Service Management
>> 
>>  
>> 
>> Hi,
>> 
>>  
>> 
>> I'd finished setting up the CAS server v4 and now trying to deploy service 
>> management application.
>> 
>> Therefor I've got the `cas-management-webapp` which by default is shipped 
>> with `JsonServiceRegistryDao` where my CAS server is shipped with 
>> `InMemoryServiceRegistryDaoImpl`.
>> 
>> I want to use the JSON one and I read here:
>> 
>> http://jasig.github.io/cas/development/installation/Service-Management.html#services-registry
>>  
>> <http://jasig.github.io/cas/development/installation/Service-Management.html#services-registry>
>> that this settings should be unified in both applications, so when using the 
>> JSON in the CAS server I got this error when deploying the application in 
>> tomcat v8:
>> 
>>  
>> 
>> 2015-04-12 22:45:40,498 ERROR 
>> [org.springframework.web.context.ContextLoader] - <Context initialization 
>> failed>
>> org.springframework.beans.factory.BeanCreationException: Error creating bean 
>> with name 'ticketRegistryCleaner' defined in ServletContext resource 
>> [/WEB-INF/spring-confi
>> guration/ticketRegistry.xml]: Cannot resolve reference to bean 
>> 'logoutManager' while setting bean property 'logoutManager'; nested 
>> exception is org.springframework.bean
>> s.factory.BeanCreationException: Error creating bean with name 
>> 'logoutManager' defined in ServletContext resource 
>> [/WEB-INF/spring-configuration/applicationContext.xml]
>> : Cannot resolve reference to bean 'servicesManager' while setting 
>> constructor argument; nested exception is 
>> org.springframework.beans.factory.BeanCreationException: Er
>> ror creating bean with name 'servicesManager' defined in ServletContext 
>> resource [/WEB-INF/spring-configuration/applicationContext.xml]: Cannot 
>> resolve reference to bea
>> n 'serviceRegistryDao' while setting constructor argument; nested exception 
>> is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot 
>> find class [org.ja
>> sig.cas.services.JsonServiceRegistryDao] for bean with name 
>> 'serviceRegistryDao' defined in ServletContext resource 
>> [/WEB-INF/deployerConfigContext.xml]; nested excepti
>> on is java.lang.ClassNotFoundException: 
>> org.jasig.cas.services.JsonServiceRegistryDao
>>         at 
>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:326)
>> 
>>  
>> 
>> It looks like it can't see the 
>> `org.jasig.cas.services.JsonServiceRegistryDao` how does this come?
>> 
>>  
>> 
>> I'm really stuck there, any help is appreciated.
>> 
>>  
>> 
>>  
>> -- 
>> You are currently subscribed to [email protected] 
>> <mailto:[email protected]> as: [email protected] 
>> <mailto:[email protected]>
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user 
>> <http://www.ja-sig.org/wiki/display/JSG/cas-user>
>> -- 
>> You are currently subscribed to [email protected] 
>> <mailto:[email protected]> as: [email protected] 
>> <mailto:[email protected]>
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user 
>> <http://www.ja-sig.org/wiki/display/JSG/cas-user>
>>  
>> 
>>  
>> -- 
>> You are currently subscribed to [email protected] 
>> <mailto:[email protected]> as: [email protected] 
>> <mailto:[email protected]>
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user 
>> <http://www.ja-sig.org/wiki/display/JSG/cas-user>
>> -- 
>> You are currently subscribed to [email protected] 
>> <mailto:[email protected]> as: [email protected] 
>> <mailto:[email protected]>
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user 
>> <http://www.ja-sig.org/wiki/display/JSG/cas-user>
>>  
>> 
>>  
>> -- 
>> You are currently subscribed to [email protected] 
>> <mailto:[email protected]> as: [email protected] 
>> <mailto:[email protected]>
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user 
>> <http://www.ja-sig.org/wiki/display/JSG/cas-user>
>> -- 
>> You are currently subscribed to [email protected] 
>> <mailto:[email protected]> as: [email protected] 
>> <mailto:[email protected]>
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user 
>> <http://www.ja-sig.org/wiki/display/JSG/cas-user>
>>  
>> 
>>  
>> -- 
>> You are currently subscribed to [email protected] 
>> <mailto:[email protected]> as: [email protected] 
>> <mailto:[email protected]>
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user 
>> <http://www.ja-sig.org/wiki/display/JSG/cas-user>
>> -- 
>> You are currently subscribed to [email protected] 
>> <mailto:[email protected]> as: [email protected] 
>> <mailto:[email protected]>
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user 
>> <http://www.ja-sig.org/wiki/display/JSG/cas-user>
>>  
>> 
>>  
>> -- 
>> You are currently subscribed to [email protected] 
>> <mailto:[email protected]> as: [email protected] 
>> <mailto:[email protected]>
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user 
>> <http://www.ja-sig.org/wiki/display/JSG/cas-user>
>> -- 
>> You are currently subscribed to [email protected] 
>> <mailto:[email protected]> as: [email protected] 
>> <mailto:[email protected]>
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user 
>> <http://www.ja-sig.org/wiki/display/JSG/cas-user>
>>  
>> 
>>  
>> -- 
>> You are currently subscribed to [email protected] 
>> <mailto:[email protected]> as: [email protected] 
>> <mailto:[email protected]>
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user 
>> <http://www.ja-sig.org/wiki/display/JSG/cas-user>
>> -- 
>> You are currently subscribed to [email protected] 
>> <mailto:[email protected]> as: [email protected] 
>> <mailto:[email protected]>
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user 
>> <http://www.ja-sig.org/wiki/display/JSG/cas-user>
>> -- 
>> You are currently subscribed to [email protected] 
>> <mailto:[email protected]> as: [email protected] 
>> <mailto:[email protected]>
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/cas-user 
>> <http://www.ja-sig.org/wiki/display/JSG/cas-user>
>  -- 
> You are currently subscribed to [email protected] 
> <mailto:[email protected]> as: [email protected] 
> <mailto:[email protected]>
> To unsubscribe, change settings or access archives, see 
> http://www.ja-sig.org/wiki/display/JSG/cas-user 
> <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

Reply via email to