Kerberos with websphere NPE



我正在尝试在Websphere(8.5.5)上设置Kerberos web身份验证。我已经完成了设置,但是当我尝试访问登录url时,我得到以下NPE

com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[Initializer]: java.lang.NullPointerException
at net.sourceforge.spnego.SpnegoFilterConfig.doClientModule(SpnegoFilterConfig.java:179)
at net.sourceforge.spnego.SpnegoFilterConfig.<init>(SpnegoFilterConfig.java:138)
at net.sourceforge.spnego.SpnegoFilterConfig.getInstance(SpnegoFilterConfig.java:314)
at net.sourceforge.spnego.SpnegoHttpFilter.init(SpnegoHttpFilter.java:193)

我不明白这个错误,也不知道如何修复它。由于

更新
<?xml version="1.0" encoding="UTF-8"?><web-app id="WebApp_1431678248278" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>warname_war</display-name>
<description>ApplicationDescription</description>
<!--Servlets-->
<servlet>
    <servlet-name>Initializer</servlet-name>
    <servlet-class>com.package.subpackage.Initializer</servlet-class>
    <init-param>
        <param-name>initFile</param-name>
        <param-value>/WEB-INF/conf/init.xml</param-value>
    </init-param>
    <init-param>
        <param-name>initModule</param-name>
        <param-value>/WEB-INF/conf/init-module.xml</param-value>
    </init-param>
    <init-param>
        <param-name>initAuthentication</param-name>
        <param-value>/WEB-INF/conf/init-authentication.xml</param-value>
    </init-param>
    <init-param>
        <param-name>WindowOnSuccessCloseTimeout</param-name>
        <param-value>500</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet>
    <servlet-name>CreateSecurityDb</servlet-name>
    <servlet-class>com.package.subpackage.CreateSecurityDatabaseServlet</servlet-class>
    <init-param>
        <param-name>initFile</param-name>
        <param-value>/WEB-INF/conf/init.xml</param-value>
    </init-param>
    <init-param>
        <param-name>initAuthentication</param-name>
        <param-value>/WEB-INF/conf/init-authentication.xml</param-value>
    </init-param>
    <init-param>
        <param-name>sqlScriptsFolder</param-name>
        <param-value>/sql</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
</servlet>
<servlet>
    <servlet-name>Data Service</servlet-name>
    <servlet-class>com.package.subpackage.web.webmethod.DataServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
</servlet>
<servlet>
    <servlet-name>Logger</servlet-name>
    <servlet-class>com.package.subpackage.context.DataServletImpl</servlet-class>
    <load-on-startup>2</load-on-startup>
</servlet>
<servlet>
    <servlet-name>Status</servlet-name>
    <servlet-class>com.package.subpackage.healthcheck.HealthCheckServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
</servlet>
<!--Servlet mappings-->
<servlet-mapping>
    <servlet-name>Data Service</servlet-name>
    <url-pattern>/dataService/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>Initializer</servlet-name>
    <url-pattern>/main</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>Logger</servlet-name>
    <url-pattern>/logger</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>Status</servlet-name>
    <url-pattern>/status</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>CreateSecurityDb</servlet-name>
    <url-pattern>/createSecurityDatabase</url-pattern>
</servlet-mapping>
<!--Filters-->
<filter>
    <filter-name>LoginFormFilter</filter-name>
    <filter-class>com.package.otherpackage.authentication.UnifiedLoginFilter</filter-class>
    <init-param>
        <param-name>factoryName</param-name>
        <param-value>SSOAuthenticator</param-value>
    </init-param>
    <init-param>
        <param-name>servletType</param-name>
        <param-value>webHtml</param-value>
    </init-param>
    <init-param>
        <param-name>useCaching</param-name>
        <param-value>true</param-value>
    </init-param>
</filter>
<filter>
    <filter-name>LogoutFilter</filter-name>
    <filter-class>com.package.otherpackage.authentication.impl.logic.filter.UnifiedLogoutFilter</filter-class>
    <init-param>
        <param-name>factoryName</param-name>
        <param-value>SSOAuthenticator</param-value>
    </init-param>
</filter>
<filter>
    <filter-name>ResourceFilter</filter-name>
    <filter-class>com.package.subpackage.utils.ResourceFilter</filter-class>
</filter>
<filter>
    <filter-name>InitDbConFilter</filter-name>
    <filter-class>com.package.subpackage.webmethod.InitDbConnectionFilter</filter-class>
</filter>
<!--Filter Mappings-->
<filter-mapping>
    <filter-name>InitDbConFilter</filter-name>
    <servlet-name>Initializer</servlet-name>
</filter-mapping>
<filter-mapping>
    <filter-name>LoginFormFilter</filter-name>
    <servlet-name>Initializer</servlet-name>
</filter-mapping>
<filter-mapping>
    <filter-name>InitDbConFilter</filter-name>
    <servlet-name>Data Service</servlet-name>
</filter-mapping>
<filter-mapping>
    <filter-name>LoginFormFilter</filter-name>
    <servlet-name>Data Service</servlet-name>
</filter-mapping>
<filter-mapping>
    <filter-name>LoginFormFilter</filter-name>
    <url-pattern>/index.html</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>LogoutFilter</filter-name>
    <servlet-name>Initializer</servlet-name>
</filter-mapping>
<filter-mapping>
    <filter-name>ResourceFilter</filter-name>
    <url-pattern>/plugins/*</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>ResourceFilter</filter-name>
    <url-pattern>/lib/atf/*</url-pattern>
</filter-mapping>
<!--location to prevent users from listing some resources-->
<welcome-file-list>
    <welcome-file>/main</welcome-file>
</welcome-file-list>
<session-config>
    <session-timeout>30</session-timeout>
</session-config>
<listener>
    <listener-class>com.package.subpackage.context.TCSessionListener</listener-class>
</listener> 
<application-policy name="spnego-client">

这是我的web.xml文件

我获得NPE的原因是默认情况下websphere使用wsjaas.conf文件。你可以编辑一个系统启动属性文件/AppServer/properties/systemlaunch/base/.systemlaunch.properties.

您已经配置了java.security.auth.login.config在默认的wsjaas.conf中,缺少spnego API期望的条目("spnego-client")。

相关内容

  • 没有找到相关文章

最新更新