0

我正在尝试创建一个简单的 Richface4 项目。以下是我使用的罐子

在此处输入图像描述

在此处输入图像描述

添加了 RichFace-4.2 文档中的所有 jar。

现在在服务器上发布它时,我收到以下错误

Apr 10, 2012 7:41:39 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra 2.0.4 (FCS b05) for context '/RF4Test'
Apr 10, 2012 7:41:40 PM org.richfaces.javascript.ClientServiceConfigParser parse
WARNING: Found JavaScript function definition for class org.hibernate.validator.constraints.NotEmpty, but that class is not presented
Apr 10, 2012 7:41:40 PM org.richfaces.cache.CacheManager getCacheFactory
INFO: Selected fallback cache factory
Apr 10, 2012 7:41:40 PM org.richfaces.cache.lru.LRUMapCacheFactory createCache
INFO: Creating LRUMap cache instance using parameters: {com.sun.faces.injectionProvider=com.bea.faces.WeblogicInjectionProvider}
Apr 10, 2012 7:41:40 PM org.richfaces.cache.lru.LRUMapCacheFactory createCache
INFO: Creating LRUMap cache instance of 512 items capacity
Apr 10, 2012 7:41:40 PM org.richfaces.application.InitializationListener onStart
INFO: RichFaces Core Implementation by JBoss by Red Hat, version v.4.2.0.Final
Apr 10, 2012 7:41:40 PM org.richfaces.application.InitializationListener logWarningWhenConnectionFactoryPresent
WARNING: JMS API was found on the classpath; if you want to enable RichFaces Push JMS integration, set context-param 'org.richfaces.push.jms.enabled' in web.xml
<Apr 10, 2012 7:41:40 PM IST> <Warning> <HTTP> <BEA-101162> <User defined listener org.apache.myfaces.webapp.StartupServletContextListener failed: java.lang.NoClassDefFoundError: javax/faces/view/facelets/FaceletCacheFactory.
java.lang.NoClassDefFoundError: javax/faces/view/facelets/FaceletCacheFactory
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:630)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
-
-
-
Apr 10, 2012 7:41:41 PM com.sun.faces.config.ConfigureListener contextDestroyed
SEVERE: Unexpected exception when attempting to tear down the Mojarra runtime
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
    at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:800)
    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:302)
    at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:104)
-
-
-
Apr 10, 2012 7:41:41 PM IST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1334067099535' for task '8'. Error is: 'weblogic.application.ModuleException: '
weblogic.application.ModuleException: 
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1510)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
-
-
-
<Apr 10, 2012 7:41:41 PM IST> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 7 task for the application '_auto_generated_ear_'.> 
<Apr 10, 2012 7:41:41 PM IST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating start task for application '_auto_generated_ear_'.> 
<Apr 10, 2012 7:41:41 PM IST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: 
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1510)

web.xml是eclipse默认生成的:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>RF4Test</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
  </servlet-mapping>
</web-app>

使用的服务器是Oracle WebLogic Server 11gR1 PatchSet 4。 请帮助我查找问题。

谢谢

4

1 回答 1

2

从构建路径中删除“myfaces-impl”和“共享库 [jsf]”。他们不属于那里。Weblogic 已经捆绑了 JSF。

于 2012-04-10T15:24:53.867 回答