Hello,

I am having an issue when I add cas-server-support-json-service-registry to 
my cas-gradle-overlay project.
Imho it has something to do with the defaultTemplateResolver.

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 isorg.
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,

-- 
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/34ab9655-7abb-4eae-90d4-299a741e88e2%40apereo.org.
For more options, visit https://groups.google.com/a/apereo.org/d/optout.

Reply via email to