【问题标题】:Websphere: java.lang.IllegalStateException: No Factories configured for this ApplicationWebsphere:java.lang.IllegalStateException:没有为此应用程序配置工厂
【发布时间】:2019-01-04 13:13:32
【问题描述】:

我将我的应用程序 tomcat 7 迁移到 web sphere 9 版本。服务器已成功启动,但是当我尝试加载页面时,出现以下错误。

java.lang.IllegalStateException:没有为此应用程序配置工厂。如果 faces-initialization 根本不起作用,则会发生这种情况 - 确保正确包含基本 Faces 应用程序所需的所有配置设置,并且包含所有必要的库。还要检查您的 Web 应用程序和容器的日志记录输出是否有任何异常! 如果您这样做但什么也没找到,则错误可能是由于您使用了一些不支持通过 TLD 文件注册上下文侦听器的特殊 Web 容器,并且您的 web.xml 中没有设置上下文侦听器。

典型的配置如下所示;

org.apache.myfaces.webapp.StartupServletContextListener

at javax.faces.FactoryFinder._getFactory(FactoryFinder.java:286)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:206)
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:342)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.load(ServletWrapper.java:1385)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1029)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:82)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:963)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:382)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:532)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:318)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:289)
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.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909)

我应该怎么做才能修复它?谢谢..

【问题讨论】:

    标签: jsf websphere-9


    【解决方案1】:

    您是否将一些 JSF 实现 jar 与您的应用程序捆绑在一起?如果是这样,您不应该这样做,WAS v9.0 带有自己的捆绑包实现 jar
    如果您打算覆盖 jsf 实现 jar,那么您应该查看有关如何执行此操作的 WAS 文档。更多信息在WAS v9.0 doc here

    【讨论】:

    • 感谢它的工作。使用共享库的概念覆盖 jars。
    【解决方案2】:

    我在上面的 servlet 监听器配置中有同样的错误。但在我的情况下,我将文件夹 Websphere 更改为默认安装 (C:\swdtools\IBM\Websphere)。文件夹 Websphere 必须位于文件夹 C:\swdtools\IBM 内。然后我的错误解决了。

    【讨论】:

      猜你喜欢
      • 2012-08-01
      • 2015-05-09
      • 2011-09-20
      • 1970-01-01
      • 1970-01-01
      • 2012-07-22
      • 2017-07-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多