Ok, at the end of the error it says "cannot be located" so might be 
path/permission issue?, make sure 

/etc/cas/templates/ is accessible by tomcat, also instead of 
"file:///etc/cas/templates"  try "file:/etc/cas/templates"

IF you are still getting errors, enable DEBUG mode in log4j2.xml, you may get 
more info.




On Saturday, May 16, 2020 at 7:50:48 PM UTC+5:30, CanaryJudge wrote:
>
> Just changed the value to what you specified below and got the same error:
>
> 2020-05-16 14:04:15,369 WARN 
> [org.apereo.cas.services.web.RegisteredServiceThemeResolver] - <Custom 
> theme [foo] for service 
> [AbstractRegisteredService(serviceId=^(http|https)://.*, name=HTTP and 
> HTTPS, theme=epc, informationUrl=null, privacyUrl=null, responseType=null, 
> id=0, description=This service definition authorizes all application urls 
> that support HTTPS and IMAPS protocols., 
> expirationPolicy=DefaultRegisteredServiceExpirationPolicy(deleteWhenExpired=false,
>  
> notifyWhenDeleted=false, notifyWhenExpired=false, expirationDate=null), 
> acceptableUsagePolicy=DefaultRegisteredServiceAcceptableUsagePolicy(enabled=true,
>  
> messageCode=null, text=null), 
> proxyPolicy=org.apereo.cas.services.RefuseRegisteredServiceProxyPolicy@1, 
> proxyTicketExpirationPolicy=null, proxyGrantingTicketExpirationPolicy=null, 
> serviceTicketExpirationPolicy=null, singleSignOnParticipationPolicy=null, 
> evaluationOrder=10000, 
> usernameAttributeProvider=org.apereo.cas.services.DefaultRegisteredServiceUsernameProvider@87297e2,
>  
> logoutType=BACK_CHANNEL, environments=[], 
> attributeReleasePolicy=ReturnAllowedAttributeReleasePolicy(super=AbstractRegisteredServiceAttributeReleasePolicy(attributeFilter=null,
>  
> principalAttributesRepository=DefaultPrincipalAttributesRepository(), 
> consentPolicy=DefaultRegisteredServiceConsentPolicy(enabled=true, 
> excludedAttributes=null, includeOnlyAttributes=null, order=0), 
> authorizedToReleaseCredentialPassword=false, 
> authorizedToReleaseProxyGrantingTicket=false, 
> excludeDefaultAttributes=false, 
> authorizedToReleaseAuthenticationAttributes=true, 
> principalIdAttribute=null, order=0), allowedAttributes=[]), 
> multifactorPolicy=DefaultRegisteredServiceMultifactorPolicy(multifactorAuthenticationProviders=[],
>  
> failureMode=UNDEFINED, principalAttributeNameTrigger=null, 
> principalAttributeValueToMatch=null, bypassEnabled=false, 
> forceExecution=false, bypassTrustedDeviceEnabled=false, 
> bypassPrincipalAttributeName=null, bypassPrincipalAttributeValue=null, 
> script=null), logo=null, logoutUrl=null, redirectUrl=null, 
> accessStrategy=DefaultRegisteredServiceAccessStrategy(order=0, 
> enabled=true, ssoEnabled=true, unauthorizedRedirectUrl=null, 
> delegatedAuthenticationPolicy=DefaultRegisteredServiceDelegatedAuthenticationPolicy(allowedProviders=[],
>  
> permitUndefined=true, exclusive=false), requireAllAttributes=true, 
> requiredAttributes={}, rejectedAttributes={}, caseInsensitive=false), 
> publicKey=null, 
> authenticationPolicy=DefaultRegisteredServiceAuthenticationPolicy(requiredAuthenticationHandlers=[],
>  
> criteria=null), properties={}, contacts=[])] cannot be located. Falling 
> back to default theme...>
>
> It is almost it is ignoring the “cas.view.template-prefixes…” directive in 
> the cas.properties file.
>
> On May 16, 2020, at 9:56 AM, Root <[email protected] <javascript:>> 
> wrote:
>
> Can you try with this variable?
>
> cas.view.template-prefixes[0]=file:///etc/cas/templates
>
>
>
> On Monday, May 11, 2020 at 8:20:30 AM UTC+5:30, CanaryJudge wrote:
>>
>> CAS Version: 6.2.0-SNAPSHOT
>>
>> Following the directions at:  
>> https://apereo.github.io/cas/6.1.x/ux/User-Interface-Customization-Themes.html
>>
>> File:  /etc/cas/cas.properties
>> ...
>> spring.thymeleaf.encoding=UTF-8
>> spring.thymeleaf.cache=false
>> spring.thymeleaf.prefix=file:///etc/cas/templates
>> cas.view.templatePrefixes=file:///etc/cas/templates
>> …
>>
>> Directory:   /etc/cas/templates/foo/…
>>
>> File:  /etc/cas/templates/foo.properties:
>> cas.standard.css.file=/theme/foo/css/cas.css
>> cas.javascript.file=/theme/foo/js/cas.js
>> cas.admin.css.file=/theme/foo/css/admin.css
>>
>> Error:  
>>
>> 2020-05-11 00:03:46,453 ERROR [org.thymeleaf.TemplateEngine] - 
>> <[THYMELEAF][https-openssl-nio-8443-exec-3] Exception processing template 
>> "casLoginView": Error resolving template [casLoginView], template might not 
>> exist or might not be accessible by any of the configured Template 
>> Resolvers>
>> org.thymeleaf.exceptions.TemplateInputException: Error resolving template 
>> [casLoginView], template might not exist or might not be accessible by any 
>> of the configured Template Resolvers
>> at 
>> org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869)
>>  
>> ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
>> at 
>> org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607)
>>  
>> ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
>> at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098) 
>> ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
>> at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072) 
>> ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
>>
>>
>> If I change the value in cas.properties to:
>> ...
>> spring.thymeleaf.encoding=UTF-8
>> spring.thymeleaf.cache=false
>> #spring.thymeleaf.prefix=file:///etc/cas/templates. # <<=== Yes, I 
>> commented this out
>> cas.view.templatePrefixes=file:///etc/cas/templates
>> …
>>
>> I get the error:
>>
>> 2020-05-11 02:43:04,246 WARN 
>> [org.apereo.cas.services.web.RegisteredServiceThemeResolver] - <Custom 
>> theme [foo] for service 
>> [AbstractRegisteredService(serviceId=^(http|https)://.*, name=HTTP and 
>> HTTPS, theme=foo, informationUrl=null, privacyUrl=null, responseType=null, 
>> id=10000001, description=This service definition authorizes all application 
>> urls that support HTTPS and IMAPS protocols., 
>> expirationPolicy=DefaultRegisteredServiceExpirationPolicy(deleteWhenExpired=false,
>>  
>> notifyWhenDeleted=false, notifyWhenExpired=false, expirationDate=null), 
>> acceptableUsagePolicy=DefaultRegisteredServiceAcceptableUsagePolicy(enabled=true,
>>  
>> messageCode=null, text=null), 
>> proxyPolicy=org.apereo.cas.services.RefuseRegisteredServiceProxyPolicy@1, 
>> proxyTicketExpirationPolicy=null, proxyGrantingTicketExpirationPolicy=null, 
>> serviceTicketExpirationPolicy=null, singleSignOnParticipationPolicy=null, 
>> evaluationOrder=10000, 
>> usernameAttributeProvider=org.apereo.cas.services.DefaultRegisteredServiceUsernameProvider@87297e2,
>>  
>> logoutType=BACK_CHANNEL, environments=[], 
>> attributeReleasePolicy=ReturnAllowedAttributeReleasePolicy(super=AbstractRegisteredServiceAttributeReleasePolicy(attributeFilter=null,
>>  
>> principalAttributesRepository=DefaultPrincipalAttributesRepository(), 
>> consentPolicy=DefaultRegisteredServiceConsentPolicy(enabled=true, 
>> excludedAttributes=null, includeOnlyAttributes=null, order=0), 
>> authorizedToReleaseCredentialPassword=false, 
>> authorizedToReleaseProxyGrantingTicket=false, 
>> excludeDefaultAttributes=false, 
>> authorizedToReleaseAuthenticationAttributes=true, 
>> principalIdAttribute=null, order=0), allowedAttributes=[]), 
>> multifactorPolicy=DefaultRegisteredServiceMultifactorPolicy(multifactorAuthenticationProviders=[],
>>  
>> failureMode=UNDEFINED, principalAttributeNameTrigger=null, 
>> principalAttributeValueToMatch=null, bypassEnabled=false, 
>> forceExecution=false, bypassTrustedDeviceEnabled=false, 
>> bypassPrincipalAttributeName=null, bypassPrincipalAttributeValue=null, 
>> script=null), logo=null, logoutUrl=null, redirectUrl=null, 
>> accessStrategy=DefaultRegisteredServiceAccessStrategy(order=0, 
>> enabled=true, ssoEnabled=true, unauthorizedRedirectUrl=null, 
>> delegatedAuthenticationPolicy=DefaultRegisteredServiceDelegatedAuthenticationPolicy(allowedProviders=[],
>>  
>> permitUndefined=true, exclusive=false), requireAllAttributes=true, 
>> requiredAttributes={}, rejectedAttributes={}, caseInsensitive=false), 
>> publicKey=null, 
>> authenticationPolicy=DefaultRegisteredServiceAuthenticationPolicy(requiredAuthenticationHandlers=[],
>>  
>> criteria=null), properties={}, contacts=[])] cannot be located. Falling 
>> back to default theme...>
>> 2020-05-11 02:43:04,391 WARN 
>> [org.apereo.cas.services.web.RegisteredServiceThemeResolver] - <Custom 
>> theme [foo] for service 
>> [AbstractRegisteredService(serviceId=^(http|https)://.*, name=HTTP and 
>> HTTPS, theme=foo, informationUrl=null, privacyUrl=null, responseType=null, 
>> id=10000001, description=This service definition authorizes all application 
>> urls that support HTTPS and IMAPS protocols., 
>> expirationPolicy=DefaultRegisteredServiceExpirationPolicy(deleteWhenExpired=false,
>>  
>> notifyWhenDeleted=false, notifyWhenExpired=false, expirationDate=null), 
>> acceptableUsagePolicy=DefaultRegisteredServiceAcceptableUsagePolicy(enabled=true,
>>  
>> messageCode=null, text=null), 
>> proxyPolicy=org.apereo.cas.services.RefuseRegisteredServiceProxyPolicy@1, 
>> proxyTicketExpirationPolicy=null, proxyGrantingTicketExpirationPolicy=null, 
>> serviceTicketExpirationPolicy=null, singleSignOnParticipationPolicy=null, 
>> evaluationOrder=10000, 
>> usernameAttributeProvider=org.apereo.cas.services.DefaultRegisteredServiceUsernameProvider@87297e2,
>>  
>> logoutType=BACK_CHANNEL, environments=[], 
>> attributeReleasePolicy=ReturnAllowedAttributeReleasePolicy(super=AbstractRegisteredServiceAttributeReleasePolicy(attributeFilter=null,
>>  
>> principalAttributesRepository=DefaultPrincipalAttributesRepository(), 
>> consentPolicy=DefaultRegisteredServiceConsentPolicy(enabled=true, 
>> excludedAttributes=null, includeOnlyAttributes=null, order=0), 
>> authorizedToReleaseCredentialPassword=false, 
>> authorizedToReleaseProxyGrantingTicket=false, 
>> excludeDefaultAttributes=false, 
>> authorizedToReleaseAuthenticationAttributes=true, 
>> principalIdAttribute=null, order=0), allowedAttributes=[]), 
>> multifactorPolicy=DefaultRegisteredServiceMultifactorPolicy(multifactorAuthenticationProviders=[],
>>  
>> failureMode=UNDEFINED, principalAttributeNameTrigger=null, 
>> principalAttributeValueToMatch=null, bypassEnabled=false, 
>> forceExecution=false, bypassTrustedDeviceEnabled=false, 
>> bypassPrincipalAttributeName=null, bypassPrincipalAttributeValue=null, 
>> script=null), logo=null, logoutUrl=null, redirectUrl=null, 
>> accessStrategy=DefaultRegisteredServiceAccessStrategy(order=0, 
>> enabled=true, ssoEnabled=true, unauthorizedRedirectUrl=null, 
>> delegatedAuthenticationPolicy=DefaultRegisteredServiceDelegatedAuthenticationPolicy(allowedProviders=[],
>>  
>> permitUndefined=true, exclusive=false), requireAllAttributes=true, 
>> requiredAttributes={}, rejectedAttributes={}, caseInsensitive=false), 
>> publicKey=null, 
>> authenticationPolicy=DefaultRegisteredServiceAuthenticationPolicy(requiredAuthenticationHandlers=[],
>>  
>> criteria=null), properties={}, contacts=[])] cannot be located. Falling 
>> back to default theme...>
>> 2020-05-11 02:43:04,959 INFO 
>> [org.apereo.inspektr.audit.support.Slf4jLoggingAuditTrailManager] - <Audit 
>> trail record BEGIN
>> …
>>
>> I feel like I am very close but I cannot figure it out from the 
>> documentation as the documentation reads:
>>
>> "Add a [theme_name].properties placed to the root of src/main/resources 
>> folder. 
>> Contents of this file should match the following:"
>>
>> But I seriously doubt I have to recompile the software EVERY time I try 
>> to use a dynamic theme for a service.  
>>
>> I am missing something but I cannot figure out what it is.
>>
>
> -- 
> - 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 [email protected] <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/a/apereo.org/d/msgid/cas-user/7f28549b-ee1f-4bc4-8668-9f4797537eac%40apereo.org
>  
> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/7f28549b-ee1f-4bc4-8668-9f4797537eac%40apereo.org?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
- 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/959d6aea-f5b6-4678-a87e-f9f44b3cbb4c%40apereo.org.

Reply via email to