我正在尝试在 Jboss 本地设置 CAS 服务器。我正在尝试部署此链接中描述的 Maven 覆盖。
https://github.com/UniconLabs/simple-cas4-overlay-template
当我尝试部署 cas.war 文件时,我遇到了一些错误,我设法通过添加以下依赖项来修复它们。
<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet.ext.spring</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet.ext.servlet</artifactId>
<version>2.2.2</version>
</dependency>
现在我收到此错误:
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.restlet.ext.spring.SpringRouter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: com/sun/net/httpserver/HttpHandler
我试图找到具有此类的依赖项,但没有找到。我做错了什么?
我的最终目标是将 CAS 与 Sprint 安全性集成。 提前致谢。
最佳答案
我发现了这个问题。这是因为在jboss wildfly的模块下没有指定“com/sun/net/httpserver/HttpHandler”。
要解决此问题,请在 /modules/system/layers/base/sun/jdk/main/module.xml
中的路径下添加以下内容:
<path name="com/sun/net/httpserver"/>
关于java - 尝试部署 CAS maven 覆盖时抛出异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26336676/