Hi,

I am trying to create an Docker image based on Alpine Linux 3.10.9 with 
Apereo CAS 5.3.12 overlay. I want to use YAML services registry but CAS 
doesn't start. I have a null pointer exception (see cas.log).
I really don't know what happens...
I think is a misconfiguration but I don't know where. Can you help me, 
please ?

Thanks.

-- 
- 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/63da0453-617e-4616-9033-480fdff3f12c%40apereo.org.
2019-10-08 10:32:24,435 WARN [org.apereo.cas.web.CasWebApplicationContext] - 
<Exception encountered during context initialization - cancelling refresh 
attempt: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'scopedTarget.servicesManager': Invocation of init 
method failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'scopedTarget.serviceRegistry' defined in class path resource 
[org/apereo/cas/config/CasCoreServicesConfiguration.class]: Bean instantiation 
via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apereo.cas.services.ServiceRegistry]: Factory method 'serviceRegistry' 
threw exception; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'scopedTarget.yamlServiceRegistry' defined in class path resource 
[org/apereo/cas/services/config/YamlServiceRegistryConfiguration.class]: Bean 
instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apereo.cas.services.ServiceRegistry]: Factory method 'yamlServiceRegistry' 
threw exception; nested exception is java.lang.NullPointerException>
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at 
org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
        at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59)
Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'scopedTarget.servicesManager': Invocation of init 
method failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'scopedTarget.serviceRegistry' defined in class path resource 
[org/apereo/cas/config/CasCoreServicesConfiguration.class]: Bean instantiation 
via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apereo.cas.services.ServiceRegistry]: Factory method 'serviceRegistry' 
threw exception; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'scopedTarget.yamlServiceRegistry' defined in class path resource 
[org/apereo/cas/services/config/YamlServiceRegistryConfiguration.class]: Bean 
instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apereo.cas.services.ServiceRegistry]: Factory method 'yamlServiceRegistry' 
threw exception; nested exception is java.lang.NullPointerException
        at 
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:137)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:407)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1623)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:351)
        at 
org.springframework.cloud.context.scope.GenericScope$BeanLifecycleWrapper.getBean(GenericScope.java:379)
        at 
org.springframework.cloud.context.scope.GenericScope.get(GenericScope.java:181)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:346)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at 
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1080)
        at 
org.springframework.cloud.context.scope.refresh.RefreshScope.start(RefreshScope.java:121)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at 
org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:256)
        at 
org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:177)
        at 
org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:140)
        at 
org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
        at 
org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
        at 
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
        at 
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
        at 
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
        at 
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:883)
        at 
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:146)
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
        at 
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:124)
        at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
        at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
        at 
org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134)
        at org.apereo.cas.web.CasWebApplication.main(CasWebApplication.java:71)
        ... 8 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'scopedTarget.serviceRegistry' defined in class path 
resource [org/apereo/cas/config/CasCoreServicesConfiguration.class]: Bean 
instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apereo.cas.services.ServiceRegistry]: Factory method 'serviceRegistry' 
threw exception; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'scopedTarget.yamlServiceRegistry' defined in class path resource 
[org/apereo/cas/services/config/YamlServiceRegistryConfiguration.class]: Bean 
instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apereo.cas.services.ServiceRegistry]: Factory method 'yamlServiceRegistry' 
threw exception; nested exception is java.lang.NullPointerException
        at 
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1178)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1072)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:351)
        at 
org.springframework.cloud.context.scope.GenericScope$BeanLifecycleWrapper.getBean(GenericScope.java:379)
        at 
org.springframework.cloud.context.scope.GenericScope.get(GenericScope.java:181)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:346)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at 
org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35)
        at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:192)
        at com.sun.proxy.$Proxy156.load(Unknown Source)
        at 
org.apereo.cas.services.AbstractServicesManager.load(AbstractServicesManager.java:199)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at 
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:366)
        at 
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:311)
        at 
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:134)
        ... 40 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to 
instantiate [org.apereo.cas.services.ServiceRegistry]: Factory method 
'serviceRegistry' threw exception; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'scopedTarget.yamlServiceRegistry' defined in class path resource 
[org/apereo/cas/services/config/YamlServiceRegistryConfiguration.class]: Bean 
instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apereo.cas.services.ServiceRegistry]: Factory method 'yamlServiceRegistry' 
threw exception; nested exception is java.lang.NullPointerException
        at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
        at 
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
        ... 60 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'scopedTarget.yamlServiceRegistry' defined in class 
path resource 
[org/apereo/cas/services/config/YamlServiceRegistryConfiguration.class]: Bean 
instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apereo.cas.services.ServiceRegistry]: Factory method 'yamlServiceRegistry' 
threw exception; nested exception is java.lang.NullPointerException
        at 
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1178)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1072)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:351)
        at 
org.springframework.cloud.context.scope.GenericScope$BeanLifecycleWrapper.getBean(GenericScope.java:379)
        at 
org.springframework.cloud.context.scope.GenericScope.get(GenericScope.java:181)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:346)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at 
org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35)
        at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:192)
        at com.sun.proxy.$Proxy156.getName(Unknown Source)
        at 
org.apereo.cas.services.DefaultServiceRegistryExecutionPlan.registerServiceRegistry(DefaultServiceRegistryExecutionPlan.java:24)
        at 
org.apereo.cas.services.config.YamlServiceRegistryConfiguration.configureServiceRegistry(YamlServiceRegistryConfiguration.java:59)
        at 
org.apereo.cas.config.CasCoreServicesConfiguration.lambda$serviceRegistry$0(CasCoreServicesConfiguration.java:167)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
        at 
org.apereo.cas.config.CasCoreServicesConfiguration.serviceRegistry(CasCoreServicesConfiguration.java:164)
        at 
org.apereo.cas.config.CasCoreServicesConfiguration$$EnhancerBySpringCGLIB$$342d42ff.CGLIB$serviceRegistry$3(<generated>)
        at 
org.apereo.cas.config.CasCoreServicesConfiguration$$EnhancerBySpringCGLIB$$342d42ff$$FastClassBySpringCGLIB$$7c4c12d1.invoke(<generated>)
        at 
org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at 
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
        at 
org.apereo.cas.config.CasCoreServicesConfiguration$$EnhancerBySpringCGLIB$$342d42ff.serviceRegistry(<generated>)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
        ... 61 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to 
instantiate [org.apereo.cas.services.ServiceRegistry]: Factory method 
'yamlServiceRegistry' threw exception; nested exception is 
java.lang.NullPointerException
        at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
        at 
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
        ... 88 more
Caused by: java.lang.NullPointerException
        at 
org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast(SystemUtils.java:1654)
        at org.apache.commons.lang3.ClassUtils.isAssignable(ClassUtils.java:760)
        at 
org.apereo.cas.util.ResourceUtils.prepareClasspathResourceIfNeeded(ResourceUtils.java:170)
        at 
org.apereo.cas.services.resource.AbstractResourceBasedServiceRegistry.<init>(AbstractResourceBasedServiceRegistry.java:149)
        at 
org.apereo.cas.services.YamlServiceRegistry.<init>(YamlServiceRegistry.java:78)
        at 
org.apereo.cas.services.config.YamlServiceRegistryConfiguration.yamlServiceRegistry(YamlServiceRegistryConfiguration.java:53)
        at 
org.apereo.cas.services.config.YamlServiceRegistryConfiguration$$EnhancerBySpringCGLIB$$e669b864.CGLIB$yamlServiceRegistry$0(<generated>)
        at 
org.apereo.cas.services.config.YamlServiceRegistryConfiguration$$EnhancerBySpringCGLIB$$e669b864$$FastClassBySpringCGLIB$$b5c8f523.invoke(<generated>)
        at 
org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at 
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
        at 
org.apereo.cas.services.config.YamlServiceRegistryConfiguration$$EnhancerBySpringCGLIB$$e669b864.yamlServiceRegistry(<generated>)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
        ... 89 more

Attachment: cas.properties
Description: Binary data

Attachment: pom.xml
Description: XML document

Reply via email to