2012-04-10 86 views
0

我想創建一個簡單的Richface4項目。 以下是罐子,我使用問題雖然設置RichFace4.2 Web項目

enter image description here

enter image description here

所有瓶當每RichFace-4.2文檔被添加。

<?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:由日食產生

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中默認:

現在在它發佈在服務器上,我得到以下錯誤服務器11gR1補丁集4. 請幫我找到問題。

由於

回答

2

刪除 「的MyFaces-IMPL」 和 「共享庫[JSF]」 從構建路徑。他們不屬於那裏。 Weblogic已經捆綁了JSF。

+0

嗨,除去的MyFaces-IMPL和共享JSF lib中,但仍然得到問題之後試圖: <用戶定義的偵聽org.apache.myfaces.webapp.StartupServletContextListener失敗:java.lang.NoClassDefFoundError:的javax /面/視圖/小面/ FaceletCacheFactory java.lang.NoClassDefFoundError:的javax /面/視圖/小面/ FaceletCacheFactory com.sun.faces.config.ConfigureListener contextDestroyed :嘗試拆掉鑽嘴魚科運行時 java.lang.IllegalStateException時意外異常:應用程序不在啓動時正確初始化,找不到工廠:javax.faces.application.ApplicationFactory – user811602 2012-04-10 16:39:18

+0

Hi BalusC, 你是對的。這是jar衝突。現在我正在使用用戶定義的罐子只用於項目。它正在工作。 – user811602 2012-04-16 15:34:02