Hello,
I am having an issue when I add cas-server-support-json-service-registry to
my cas-gradle-overlay project.
It loads well:
2016-10-17 10:25:09,134 INFO [org.apereo.cas.web.CasWebApplication] - <The
following profiles are active: native>
2016-10-17 10:25:21,909 INFO [org.apereo.cas.services.
AbstractResourceBasedServiceRegistryDao] - <Watching service registry
directory at /tmp/cas/services>
2016-10-17 10:25:22,273 INFO [org.apereo.cas.services.
DefaultServicesManagerImpl] - <Loaded 3 services from JsonServiceRegistryDao
.>
But then it crashes:
2016-10-17 10:25:25,709 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 'passwordManagementConfiguration': Unsatisfied
dependency expressed through field 'loginFlowDefinitionRegistry'; nested
exception is org.springframework.beans.factory.
UnsatisfiedDependencyException: Error creating bean with name
'casWebflowContextConfiguration': Unsatisfied dependency expressed through
field 'registeredServiceViewResolver'; nested exception is org.
springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'casThemesConfiguration': Unsatisfied dependency
expressed through field 'thymeleafViewResolver'; nested exception is org.
springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name
'org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration$Thymeleaf3Configuration$Thymeleaf3ViewResolverConfiguration'
: Unsatisfied dependency expressed through constructor parameter 1; nested
exception is org.springframework.beans.factory.
UnsatisfiedDependencyException: Error creating bean with name
'org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration$ThymeleafDefaultConfiguration'
: Unsatisfied dependency expressed through constructor parameter 0; nested
exception is org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'defaultTemplateResolver' defined in class path
resource [org/springframework/boot/autoconfigure/thymeleaf/
ThymeleafAutoConfiguration$Thymeleaf3Configuration$DefaultTemplateResolverConfiguration
.class]: Bean instantiation via factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.thymeleaf.spring4.templateresolver.SpringResourceTemplateResolver]:
Factory method 'defaultTemplateResolver' threw exception; nested exception
is java.lang.NullPointerException>
2016-10-17 10:25:25,712 WARN [org.apereo.cas.services.
ServiceRegistryConfigWatcher] - <Directory key is no longer valid. Quitting
watcher service>
Currently targeting:
gradle.version=3.0
sourceCompatibility=1.8
targetCompatibility=1.8
cas.version=5.0.0.RC4-SNAPSHOT
springboot.version=1.4.1.RELEASE
I have added this dependency to build.gradle:
runtime(
"org.apereo.cas:cas-server-support-json-service-registry:${project.'cas.version'}"
)
My cas-gradle-overlay-app/etc/cas/config/application.yml has this setting,
among others.
cas:
serviceRegistry:
watcherEnabled: true
repeatInterval: 120000
startDelay: 15000
initFromJson: true
config:
location: classpath:/services
This folder: cas-gradle-overlay-app/cas/src/main/resources/services
contains this json:
{
"@class" : "org.apereo.cas.services.RegexRegisteredService",
"serviceId" : "testId",
"name" : "testJsonFile",
"id" : 103935657744185,
"evaluationOrder" : 1
}
Any help would be appreciate.
Extra info: I am using LDAP connector and get logged in correctly.
If I am lacking or misunderstanding something please let me know.
Regards,
Facundo Bove
El viernes, 14 de octubre de 2016, 7:02:40 (UTC-3), Philippe MARASSE
escribió:
>
> Hello,
>
> Yes I've excluded classpath:services directory from overlay in order to be
> sure that cas cannot find any service definition in this place.
>
> It worked well until RC4-SNAPSHOT... I've just added services folder in my
> src/main/ressources, a dummy file inside, CAS now starts correctly and
> watch the correct directory. Fine.
>
> Thanks a lot.
> Regards.
>
> Le 07/10/2016 à 17:47, William a écrit :
>
> Philippe, please see my post:
> https://groups.google.com/a/apereo.org/forum/#!topic/cas-user/IXIrh-ZqzrY
>
> Did you perhaps remove the services folder out of
> cas-server-webapp/src/main/resources?
>
> Regards,
>
> Bill Crowell
> --
> 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 [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>.
> Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/
> .
> To view this discussion on the web visit
> https://groups.google.com/a/apereo.org/d/msgid/cas-user/a5b45404-aa9a-4f1f-a58f-9dd4352d2a7e%40apereo.org
>
> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/a5b45404-aa9a-4f1f-a58f-9dd4352d2a7e%40apereo.org?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/a/apereo.org/d/optout.
>
>
> --
> Philippe MARASSE
>
> Responsable pôle Infrastructures - DSIO
> Centre Hospitalier Henri Laborit
> CS 10587 - 370 avenue Jacques Cœur
> 86021 Poitiers Cedex
> Tel : 05.49.44.57.19
>
>
--
CAS gitter chatroom: https://gitter.im/apereo/cas
CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
CAS documentation website: https://apereo.github.io/cas
CAS project website: https://github.com/apereo/cas
---
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/2a5d2936-a12e-4bf8-a746-94e31ace0b37%40apereo.org.
For more options, visit https://groups.google.com/a/apereo.org/d/optout.