You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

WebSphere 8.5访问登录页报500错误:PreviewFilter初始化失败

问题描述

部署在IBM WebSphere Application Server 8.5上的Web服务,访问登录页面时触发500错误:

Error 500: javax.servlet.ServletException: Filter [PreviewFilter]: could not be initialized

查看服务器日志后确认,PreviewFilter初始化失败的根源是UserRegistry的JNDI查找操作失败,日志详情如下:

[8/12/22 16:27:56:217 EDT] 00000198 PreviewFilter E com.ibm.wps.services.preview.PreviewFilterImpl init(arg0) EJPSD0028E: The filter com.ibm.wps.services.preview.PreviewFilterImpl could not be initialized due to error: Context: ib2c_cell02/clusters/ib2c_Cluster, name: UserRegistry: First component in name UserRegistry not found.
                                     javax.naming.NameNotFoundException: Context: ib2c_cell02/clusters/ib2c_Cluster, name: UserRegistry: First component in name UserRegistry not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
        at com.ibm.ws.naming.jndicos.CNContextImpl.mapNotFoundException(CNContextImpl.java:4565)
        at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1823)
        at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1778)
        at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1435)
        at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:617)
        at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:165)
        at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
        at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161)
        at javax.naming.InitialContext.lookup(InitialContext.java:423)
        at com.ibm.wps.services.preview.PreviewFilterImpl$DefaultDependenciesImpl.<init>(PreviewFilterImpl.java:182)
        at com.ibm.wps.services.preview.PreviewFilterImpl$DefaultDependenciesImpl.<init>(PreviewFilterImpl.java:175)
        at com.ibm.wps.services.preview.PreviewFilterImpl.init(PreviewFilterImpl.java:264)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:145)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager._loadFilter(WebAppFilterManager.java:607)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:514)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper(WebAppFilterManager.java:319)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:392)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:931)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
        at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:952)
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:213)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:287)
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
        at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:558)
        at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:608)
        at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:985)
        at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1074)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
    Caused by: org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
        at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_resolve_complete_info(WsnOptimizedNamingImpl.java:590)
        at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.resolve_complete_info(WsnOptimizedNamingImplBase.java:2216)
        at com.ibm.WsnOptimizedNaming._NamingContextStub.resolve_complete_info(_NamingContextStub.java:538)
        at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2959)
        at com.ibm.ws.naming.jndicos.CNContextImpl$2.run(CNContextImpl.java:2955)
        at com.ibm.ws.naming.util.CommonHelpers.retry(CommonHelpers.java:871)
        at com.ibm.ws.naming.jndicos.CNContextImpl.cosResolve(CNContextImpl.java:2953)
        at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1819)
        ... 32 more

已执行操作:清理WAS配置文件根目录下的temp和wstemp文件夹并重启服务器,问题未解决。

解决建议

  • 检查UserRegistry的JNDI绑定配置:登录WebSphere控制台,进入对应cell(ib2c_cell02)的JNDI资源节点,确认是否存在名为UserRegistry的绑定条目,且绑定的对象类型与预期一致。
  • 同步集群配置:由于是集群环境(ib2c_Cluster),检查所有节点的配置是否同步。可通过控制台的集群配置同步功能,确保每个节点的JNDI绑定信息完全一致。
  • 校验PreviewFilter的JNDI参数:查看Web服务的web.xml或WAS专属部署描述符,确认PreviewFilter配置的UserRegistry JNDI名称无拼写错误或路径错误。
  • 验证UserRegistry服务连通性:检查UserRegistry对应的后端服务(如LDAP服务器、本地用户注册表)是否正常运行,通过WebSphere控制台的安全配置节点测试连通性。
  • 排查系统日志与FFDC日志:除应用日志外,查看WAS的SystemOut.log、SystemErr.log以及FFDC目录下的日志文件,获取JNDI查找失败的更多细节,比如权限限制、配置加载异常等。
  • 重新部署Web服务:若上述检查均无问题,尝试完全卸载当前Web服务后重新部署,确保部署过程中配置未遗漏或出错。

内容的提问来源于stack exchange,提问作者Wei Sun

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.22 15:24:15