JSF应用程序无法在Websphere Application Sever 7中启动
在WAS控制台中启动应用程序时遇到问题。该应用程序是一个简单的Hello World JSF servlet 我正在使用WebSphereApplicationServer版本7.0.0.9 JSF1.2和facelets 1.1.14 当我尝试启动应用程序时,我在日志中看到以下错误。你知道怎么解决这个问题吗JSF应用程序无法在Websphere Application Sever 7中启动,jsf,websphere,jsf-1.2,websphere-7,Jsf,Websphere,Jsf 1.2,Websphere 7,在WAS控制台中启动应用程序时遇到问题。该应用程序是一个简单的Hello World JSF servlet 我正在使用WebSphereApplicationServer版本7.0.0.9 JSF1.2和facelets 1.1.14 当我尝试启动应用程序时,我在日志中看到以下错误。你知道怎么解决这个问题吗 [15/06/12 15:13:49:747 BST] 00000045 config I Initializing Sun's JavaServer Faces imp
[15/06/12 15:13:49:747 BST] 00000045 config I Initializing Sun's JavaServer Faces implementation (1.2_07-b03-FCS) for context '/JsfServletDeployTest'
[15/06/12 15:13:49:756 BST] 00000045 webapp E com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextCreated SRVE0283E: Exception caught while initializing context: {0}
java.lang.NoClassDefFoundError: com.sun.faces.config.DbfFactory (initialization failure)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:276)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:202)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:175)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1678)
下面是例外情况:
[15/06/12 15:13:49:771 BST] 00000045 servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0100E: Uncaught init() exception created by servlet Faces Servlet in application JsfServletDeployTest_war: java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:270)
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:164)
at com.ibm.ws.cache.servlet.ServletWrapper.init(ServletWrapper.java:238)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:358)
我也面临同样的问题,调试后发现类路径中缺少“MyFacesAPI.jar”和“myfaces impl.jar”。包括它们之后,应用程序正常启动,没有任何错误。检查它是否适用于您。我也遇到了同样的问题,我想我也得到了答案 当您的服务器在WPS 7.0上没有JSF(1.2)应用程序的情况下启动时,它似乎不会在类加载器中加载SUN-JSF类 因此,如果您只是使用JSF1.2部署您的portlet应用程序,它将无法开始工作,并且无法找到类,因为该类应该由服务器引导加载 现在,当您部署了该应用程序并重新启动服务器时,它在初始化JSF1.2应用程序时,也会加载所需的SUN-JSF库。因此,当您单击portlet时,它将加载portlet 因此,在部署portlet之后,基本上需要重新启动服务器。但这只适用于第一个JSF1.2应用程序 希望这有帮助
//HP位“(初始化失败)”意味着在异常上应该有一个“导致原因”,这才是真正的问题。请在您的问题中查找并包含这些内容。如果出于某种原因它不在那里,请在日志中搜索“DbgFactory”。可能重复的注意,OP案例中的stacktrace抱怨缺少Mojarra类,而不是MyFaces类。这似乎是随机发生的。我的工作区在昨天之前一直工作正常,但现在开始出现这个错误。真烦人!!