大飞断案第二期:认证模块疑失败、类型转换报异常

一大早就接到了网站家族的举报,说cas一上午魂不守舍、导致项目上一直没进展,别人找他家的孩子都找不着(页面404)一整个上午都在现场,现在破案归来,总结如下。

案发现场

现场证明人包括:
快5岁的STS(Spring Tool Suite 4 Version: 4.9.0.RELEASE
刚满8岁的Tomcat(apache-tomcat-8.0.44
第八代java核心成员(java version "1.8.0_181"
还有嫌疑人cas

案发现场如下:

622, 2021 10:48:15 上午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'centralAuthenticationService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultTicketRegistry': Unsatisfied dependency expressed through field 'logoutManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'logoutManager': Unsatisfied dependency expressed through field 'servicesManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'servicesManager' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/DefaultServicesManagerImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jsonServiceRegistryDao' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/JsonServiceRegistryDao.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jasig.cas.services.JsonServiceRegistryDao]: Constructor threw exception; nested exception is java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.nio.file.WatchEvent$Kind; ([Ljava.lang.Object; and [Ljava.nio.file.WatchEvent$Kind; are in module java.base of loader 'bootstrap')
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:321)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultTicketRegistry': Unsatisfied dependency expressed through field 'logoutManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'logoutManager': Unsatisfied dependency expressed through field 'servicesManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'servicesManager' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/DefaultServicesManagerImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jsonServiceRegistryDao' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/JsonServiceRegistryDao.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jasig.cas.services.JsonServiceRegistryDao]: Constructor threw exception; nested exception is java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.nio.file.WatchEvent$Kind; ([Ljava.lang.Object; and [Ljava.nio.file.WatchEvent$Kind; are in module java.base of loader 'bootstrap')
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:522)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:496)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:627)
	at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:169)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:318)
	... 22 more
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'logoutManager': Unsatisfied dependency expressed through field 'servicesManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'servicesManager' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/DefaultServicesManagerImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jsonServiceRegistryDao' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/JsonServiceRegistryDao.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jasig.cas.services.JsonServiceRegistryDao]: Constructor threw exception; nested exception is java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.nio.file.WatchEvent$Kind; ([Ljava.lang.Object; and [Ljava.nio.file.WatchEvent$Kind; are in module java.base of loader 'bootstrap')
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
	... 37 more
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'servicesManager' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/DefaultServicesManagerImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jsonServiceRegistryDao' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/JsonServiceRegistryDao.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jasig.cas.services.JsonServiceRegistryDao]: Constructor threw exception; nested exception is java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.nio.file.WatchEvent$Kind; ([Ljava.lang.Object; and [Ljava.nio.file.WatchEvent$Kind; are in module java.base of loader 'bootstrap')
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)
	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$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
	... 50 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jsonServiceRegistryDao' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/JsonServiceRegistryDao.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jasig.cas.services.JsonServiceRegistryDao]: Constructor threw exception; nested exception is java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.nio.file.WatchEvent$Kind; ([Ljava.lang.Object; and [Ljava.nio.file.WatchEvent$Kind; are in module java.base of loader 'bootstrap')
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:279)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)
	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$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
	... 63 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jasig.cas.services.JsonServiceRegistryDao]: Constructor threw exception; nested exception is java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.nio.file.WatchEvent$Kind; ([Ljava.lang.Object; and [Ljava.nio.file.WatchEvent$Kind; are in module java.base of loader 'bootstrap')
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:154)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:271)
	... 76 more
Caused by: java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.nio.file.WatchEvent$Kind; ([Ljava.lang.Object; and [Ljava.nio.file.WatchEvent$Kind; are in module java.base of loader 'bootstrap')
	at org.jasig.cas.services.JsonServiceRegistryConfigWatcher.<init>(JsonServiceRegistryConfigWatcher.java:50)
	at org.jasig.cas.services.JsonServiceRegistryDao.<init>(JsonServiceRegistryDao.java:117)
	at org.jasig.cas.services.JsonServiceRegistryDao.<init>(JsonServiceRegistryDao.java:132)
	at org.jasig.cas.services.JsonServiceRegistryDao.<init>(JsonServiceRegistryDao.java:147)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
	... 78 more

622, 2021 10:48:16 上午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.jasig.cas.CasEnvironmentContextListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'centralAuthenticationService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultTicketRegistry': Unsatisfied dependency expressed through field 'logoutManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'logoutManager': Unsatisfied dependency expressed through field 'servicesManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'servicesManager' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/DefaultServicesManagerImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jsonServiceRegistryDao' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/JsonServiceRegistryDao.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jasig.cas.services.JsonServiceRegistryDao]: Constructor threw exception; nested exception is java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.nio.file.WatchEvent$Kind; ([Ljava.lang.Object; and [Ljava.nio.file.WatchEvent$Kind; are in module java.base of loader 'bootstrap')
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:321)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultTicketRegistry': Unsatisfied dependency expressed through field 'logoutManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'logoutManager': Unsatisfied dependency expressed through field 'servicesManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'servicesManager' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/DefaultServicesManagerImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jsonServiceRegistryDao' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/JsonServiceRegistryDao.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jasig.cas.services.JsonServiceRegistryDao]: Constructor threw exception; nested exception is java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.nio.file.WatchEvent$Kind; ([Ljava.lang.Object; and [Ljava.nio.file.WatchEvent$Kind; are in module java.base of loader 'bootstrap')
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:522)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:496)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:627)
	at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:169)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:318)
	... 22 more
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'logoutManager': Unsatisfied dependency expressed through field 'servicesManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'servicesManager' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/DefaultServicesManagerImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jsonServiceRegistryDao' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/JsonServiceRegistryDao.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jasig.cas.services.JsonServiceRegistryDao]: Constructor threw exception; nested exception is java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.nio.file.WatchEvent$Kind; ([Ljava.lang.Object; and [Ljava.nio.file.WatchEvent$Kind; are in module java.base of loader 'bootstrap')
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
	... 37 more
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'servicesManager' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/DefaultServicesManagerImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jsonServiceRegistryDao' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/JsonServiceRegistryDao.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jasig.cas.services.JsonServiceRegistryDao]: Constructor threw exception; nested exception is java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.nio.file.WatchEvent$Kind; ([Ljava.lang.Object; and [Ljava.nio.file.WatchEvent$Kind; are in module java.base of loader 'bootstrap')
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)
	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$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
	... 50 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jsonServiceRegistryDao' defined in URL [jar:file:/E:/test/apache-tomcat-8.0.44/webapps/platform-cas/WEB-INF/lib/cas-server-core-services-4.2.1.jar!/org/jasig/cas/services/JsonServiceRegistryDao.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jasig.cas.services.JsonServiceRegistryDao]: Constructor threw exception; nested exception is java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.nio.file.WatchEvent$Kind; ([Ljava.lang.Object; and [Ljava.nio.file.WatchEvent$Kind; are in module java.base of loader 'bootstrap')
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:279)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)
	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$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
	... 63 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jasig.cas.services.JsonServiceRegistryDao]: Constructor threw exception; nested exception is java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.nio.file.WatchEvent$Kind; ([Ljava.lang.Object; and [Ljava.nio.file.WatchEvent$Kind; are in module java.base of loader 'bootstrap')
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:154)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:271)
	... 76 more
Caused by: java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Ljava.nio.file.WatchEvent$Kind; ([Ljava.lang.Object; and [Ljava.nio.file.WatchEvent$Kind; are in module java.base of loader 'bootstrap')
	at org.jasig.cas.services.JsonServiceRegistryConfigWatcher.<init>(JsonServiceRegistryConfigWatcher.java:50)
	at org.jasig.cas.services.JsonServiceRegistryDao.<init>(JsonServiceRegistryDao.java:117)
	at org.jasig.cas.services.JsonServiceRegistryDao.<init>(JsonServiceRegistryDao.java:132)
	at org.jasig.cas.services.JsonServiceRegistryDao.<init>(JsonServiceRegistryDao.java:147)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
	... 78 more

622, 2021 10:48:16 上午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
622, 2021 10:48:16 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/platform-cas] startup failed due to previous errors
622, 2021 10:48:16 上午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
622, 2021 10:48:16 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [platform-cas] appears to have started a thread named [Thread-4] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@15.0.1/java.lang.Thread.sleep(Native Method)
 org.apache.commons.io.monitor.FileAlterationMonitor.run(FileAlterationMonitor.java:188)
 java.base@15.0.1/java.lang.Thread.run(Thread.java:832)
622, 2021 10:48:16 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [platform-cas] appears to have started a thread named [Thread-5] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@15.0.1/java.lang.Thread.sleep(Native Method)
 org.apache.commons.io.monitor.FileAlterationMonitor.run(FileAlterationMonitor.java:188)
 java.base@15.0.1/java.lang.Thread.run(Thread.java:832)
622, 2021 10:48:16 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [platform-cas] appears to have started a thread named [FileSystemWatchService] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@15.0.1/sun.nio.fs.WindowsNativeDispatcher.GetQueuedCompletionStatus0(Native Method)
 java.base@15.0.1/sun.nio.fs.WindowsNativeDispatcher.GetQueuedCompletionStatus(WindowsNativeDispatcher.java:1055)
 java.base@15.0.1/sun.nio.fs.WindowsWatchService$Poller.run(WindowsWatchService.java:587)
 java.base@15.0.1/java.lang.Thread.run(Thread.java:832)
622, 2021 10:48:16 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesResourceBundles
警告: Failed to clear ResourceBundle references for web application [platform-cas]
java.lang.NoSuchFieldException: loaderRef
	at java.base/java.lang.Class.getDeclaredField(Class.java:2569)
	at org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesResourceBundles(WebappClassLoaderBase.java:2402)
	at org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1617)
	at org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1537)
	at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:446)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:221)
	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5572)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:221)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:149)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)

解决方案

经过一上午的审问,本侦探得到证词如下:
cas: 在别的地方都很舒服、在这里一家子人都难受、无法工作。
Tomcat: 自从cas来了以后(添加模块cas),就萎靡不振,也不知道为啥。
STS:我提供的环境和别人的环境一模一样,他不会是卧底吧。
java8:我支持的其他人(别的模块)都没问题,这个新来的也不知道怎么回事。

经过本侦探的取证及分析,得出结论:cas一家是问题所在。
在对cas一家进行搜证的时候,发现cas竟然与java7偷偷合作。导致项目上出现一系列问题。现在给出判决:

判处cas有罪,现场还原如下:在项目上假装于java8合作、实际上与jdk上一代成员java7合作(使用java7),而java7因为被java8抢去了风头,一时不满,蛊惑cas与自己合作所导致。现期望cas继续与java8合作(使用java8作为cas的jdk),否则严惩不贷!结案。

问题原因是cas的java编译版本不对造成的,将cas的编译版本从java7改成java8

案发现场,cas改过自新,与java8强强联合。从此网站大家庭过上了幸福的生活

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

冰夏之夜影

赠人玫瑰,手留余香

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值