Application Startup error when deploying CAS 5.2 Mavenoverlay war

33 views
Skip to first unread message

Sai Krishna

unread,
Apr 28, 2021, 1:18:56 AM4/28/21
to CAS Community
Hi All

I have deployed CAS maven overlay 5.2 version war in the Tomcat 9.0.45 , getting the below application startup error.

Software installed for CAS
JDKVersion 11.0.10
Tomcat 9.0.45 
Maven:3.6.0
I have build the war by downloading the zip from the below link.

Below is the application startup error.

2021-04-28 04:59:50,539 WARN [org.apereo.cas.config.CasCoreServicesConfiguration] - <Runtime memory is used as the persistence storage for retrieving and persisting service definitions. Changes that are made to service definitions during runtime WILL be LOST upon container restarts. Ideally for production, you need to choose a storage option (JDBC, etc) to store and track service definitions.>
2021-04-28 04:59:50,787 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.embeddedJsonServiceRegistry' defined in class path resource [org/apereo/cas/config/CasServiceRegistryInitializationConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apereo.cas.services.ServiceRegistryDao]: Factory method 'embeddedJsonServiceRegistry' threw exception; nested exception is java.lang.RuntimeException>
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.embeddedJsonServiceRegistry' defined in class path resource [org/apereo/cas/config/CasServiceRegistryInitializationConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apereo.cas.services.ServiceRegistryDao]: Factory method 'embeddedJsonServiceRegistry' threw exception; nested exception is java.lang.RuntimeException
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1177)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1071)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:351)
at org.springframework.cloud.context.scope.GenericScope$BeanLifecycleWrapper.getBean(GenericScope.java:359)
at org.springframework.cloud.context.scope.GenericScope.get(GenericScope.java:176)
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:144)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
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:73)
... 8 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apereo.cas.services.ServiceRegistryDao]: Factory method 'embeddedJsonServiceRegistry' threw exception; nested exception is java.lang.RuntimeException
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
... 40 more
Caused by: java.lang.RuntimeException
at org.apereo.cas.config.CasServiceRegistryInitializationConfiguration.embeddedJsonServiceRegistry(CasServiceRegistryInitializationConfiguration.java:72)
at org.apereo.cas.config.CasServiceRegistryInitializationConfiguration$$EnhancerBySpringCGLIB$$6946844d.CGLIB$embeddedJsonServiceRegistry$1(<generated>)
at org.apereo.cas.config.CasServiceRegistryInitializationConfiguration$$EnhancerBySpringCGLIB$$6946844d$$FastClassBySpringCGLIB$$bdc91726.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.CasServiceRegistryInitializationConfiguration$$EnhancerBySpringCGLIB$$6946844d.embeddedJsonServiceRegistry(<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)
... 41 more
Caused by: java.lang.NullPointerException
at org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast(SystemUtils.java:1642)
at org.apache.commons.lang3.ClassUtils.isAssignable(ClassUtils.java:690)
at org.apereo.cas.util.ResourceUtils.prepareClasspathResourceIfNeeded(ResourceUtils.java:169)
at org.apereo.cas.services.AbstractResourceBasedServiceRegistryDao.<init>(AbstractResourceBasedServiceRegistryDao.java:125)
at org.apereo.cas.config.CasServiceRegistryInitializationConfiguration$EmbeddedServiceRegistryDao.<init>(CasServiceRegistryInitializationConfiguration.java:87)
at org.apereo.cas.config.CasServiceRegistryInitializationConfiguration.embeddedJsonServiceRegistry(CasServiceRegistryInitializationConfiguration.java:70)
... 51 more

Please suggest as iam blocked

Thanks
Saikrishna


Ray Bon

unread,
Apr 28, 2021, 12:06:47 PM4/28/21
to cas-...@apereo.org
Sai Krishna,

Use the current version, 6.3.

Does the 5.2 version support java 11?
The structure of the JVM has changed and some features are not included by default, and the error hints at this.

Ray

On Tue, 2021-04-27 at 22:18 -0700, Sai Krishna wrote:
Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information.
Reply all
Reply to author
Forward
0 new messages