java.lang.ClassNotFoundException:org.jboss.security.negotiation.NegotiationAuthenticator

时间:2014-11-26 07:42:59

标签: security authentication jboss classnotfoundexception spnego

在JBOSS EAP 6.1上部署webapp时,我收到以下错误:

Caused by: java.lang.ClassNotFoundException: org.jboss.security.negotiation.NegotiationAuthenticator from [Module "deployment.dummy.ear.dummy-web.war:main" from Service Module Loader]
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
        at org.jboss.as.web.deployment.WarDeploymentProcessor.getInstance(WarDeploymentProcessor.java:407)
        ... 8 more

我们正在使用SPNEGO身份验证,jboss-web.xml配置为:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
    <context-root>dummy</context-root>
    <security-domain>SPNEGO</security-domain>
    <valve>
        <class-name>org.jboss.security.negotiation.NegotiationAuthenticator</class-name>
    </valve>
    <jacc-star-role-allow>true</jacc-star-role-allow>
</jboss-web>

我在RedHat portal上找到了类似问题的引用。但它没有答案。你能告诉我如何解决这个问题吗?如果您需要更多信息,请告诉我。

感谢。

1 个答案:

答案 0 :(得分:1)

WEB-INF/jboss-deployment-structure.xml添加下一个依赖项:

<jboss-deployment-structure>
    <deployment>
        <dependencies>
            <module name="org.jboss.security.negotiation" />
        </dependencies>
    </deployment>
</jboss-deployment-structure>

另请参阅:https://developer.jboss.org/wiki/DRAFTUsingJBossNegotiationOnAS7https://github.com/kwart/spnego-demo

我希望这有帮助。