java - CAS:JBoss 中 cas-server-support-json-service-registry 出现 6.2.0-snapshot 错误

标签 java cas java-11 apereo

找不到类错误:org.apereo.cas.services.ServiceRegistry]:工厂方法“jsonServiceRegistry” 抛出异常;嵌套异常是 java.lang.NoClassDefFoundError: com/sun/nio/file/SensitivityWatchEventModifier

我正在使用 Cas-war-overlay(6.2.0-snapshot)。已包含
编译“org.apereo.cas:cas-server-support-json-service-registry:${project.'cas.version'}” 在 gradle 依赖项部分。到 2020 年 4 月 16 日为止,一切正常。从今天开始突然出现这个错误。

堆栈跟踪:

Caused by: java.lang.NoClassDefFoundError: com/sun/nio/file/SensitivityWatchEventModifier
        at deployment.cas.war//org.apereo.cas.util.io.PathWatcherService.<init>(PathWatcherService.java:67)
        at deployment.cas.war//org.apereo.cas.services.resource.AbstractResourceBasedServiceRegistry.enableDefaultWatcherService(AbstractResourceBasedServiceRegistry.java:183)
        at deployment.cas.war//org.apereo.cas.config.JsonServiceRegistryConfiguration.jsonServiceRegistry(JsonServiceRegistryConfiguration.java:69)
        at deployment.cas.war//org.apereo.cas.config.JsonServiceRegistryConfiguration$$EnhancerBySpringCGLIB$$b4c519e.CGLIB$jsonServiceRegistry$0(<generated>)
        at deployment.cas.war//org.apereo.cas.config.JsonServiceRegistryConfiguration$$EnhancerBySpringCGLIB$$b4c519e$$FastClassBySpringCGLIB$$17923b01.invoke(<generated>)
        at deployment.cas.war//org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
        at deployment.cas.war//org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
        at deployment.cas.war//org.apereo.cas.config.JsonServiceRegistryConfiguration$$EnhancerBySpringCGLIB$$b4c519e.jsonServiceRegistry(<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 deployment.cas.war//org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ```

最佳答案

我通过修改jboss-deployment-struct.xml设法解决了这个问题。添加以下代码:

  <dependencies>
            <system export="true">
                <paths>
                    <path name="com/sun/nio/file"/>
                </paths>
            </system>
        </dependencies>

关于java - CAS:JBoss 中 cas-server-support-json-service-registry 出现 6.2.0-snapshot 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61323863/

相关文章:

java - GlazedList 更新 JTable 中的 EventList

java - CA PEM 文件到 jks tomcat 信任库

java - 在哪里保存 Java 项目中的静态固定装置(文件)?

java - FlowScope 在页面刷新时变得清晰

Symfony2 : How to get Authentication Listener config values into another service?

java - JDK 11 PreMaster Secret 调试

java - Java 11 (Zulu) 中的 DateTimeFormatter 不适用于 AM/PM 格式

java - Java EE/Jakarta EE 是否支持 Java 模块系统?是否可以使用 Java 模块系统制作 Web 应用程序?

java - 为什么 org.w3c.dom 中的 getNodeValue() 不能解析 ü、ö、ä 和 &c.?

java - Android 中同时多个套接字端口连接