1

我有一个在 icefaces 1.8/JSF1.2 中构建的项目,我需要它来转换为 icefaces 3.0。这是我第一次做这个转换过程并且面临很多困难。我对 Icefaces 很陌生(事实上,我在 15 天前第一次接触过它)所以如果我问任何愚蠢的问题,请原谅我。

在许多 JAVA 论坛的帮助下,我对项目进行了一些更改,但现在非常糟糕地卡在了某个点上。我会记下我到目前为止所做的更改。(1) 已将所有 JSP 文件转换为 XHTML 文件。(2) 对 Faces-config 进行了更改。(3) 更改了 web.xml(尽管我在这里遇到了很多错误)。(4) 更改 jar 文件(这是最困难的部分)。我无法获得正确的罐子,过去 4-5 天我一直在努力解决这个问题。

在这里,我将发布 web.xml(原始项目和修改项目),以及原始项目的 jar 文件列表。请帮助我正确更改 jar 文件和修改 web.xml,因为这是我卡住的两个部分。

Web.xml(icefaces 1.8 上的原始项目)

    xml version="1.0" encoding="UTF-8"
    web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

        <context-param>
            <param-name>com.icesoft.faces.concurrentDOMViews</param-name>
            <param-value>false</param-value>
        </context-param>
        <context-param>
            <param-name>com.icesoft.faces.debugDOMUpdate</param-name>
            <param-value>false</param-value>
        </context-param>
        <context-param>
            <param-name>com.sun.faces.validateXml</param-name>
            <param-value>true</param-value>
        </context-param>
        <context-param>
            <param-name>com.sun.faces.verifyObjects</param-name>
            <param-value>false</param-value>
        </context-param>
        <context-param>
            <param-name>com.icesoft.faces.uploadMaxFileSize</param-name>
            <param-value>4048576</param-value>
        </context-param>
        <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>server</param-value>
        </context-param>
        <context-param>
            <param-name>com.sun.faces.enableRestoreView11Compatibility</param-name>
            <param-value>true</param-value>
        </context-param>
        <context-param>
            <param-name>com.icesoft.faces.standardRequestScope</param-name>
            <param-value>false</param-value>
        </context-param>
        <context-param>
            <param-name>com.icesoft.faces.synchronousUpdate</param-name>
            <param-value>false</param-value>
        </context-param>
        <filter>
            <filter-name>UploadFilter</filter-name>
            <filter-class>com.sun.webui.jsf.util.UploadFilter</filter-class>
            <init-param>
                <description>The maximum allowed upload size in bytes.  If this is set to a negative value, there is no maximum.  The default value is 1000000.</description>
                <param-name>maxSize</param-name>
                <param-value>1000000</param-value>
            </init-param>
            <init-param>
                <description>The size (in bytes) of an uploaded file which, if it is exceeded, will cause the file to be written directly to disk instead of stored in memory.  Files smaller than or equal to this size will be stored in memory.  The default value is 4096.</description>
                <param-name>sizeThreshold</param-name>
                <param-value>4096</param-value>
            </init-param>
        </filter>
        <filter-mapping>
            <filter-name>UploadFilter</filter-name>
            <servlet-name>Faces Servlet</servlet-name>
        </filter-mapping>
        <listener>
            <listener-class>com.sun.rave.web.ui.appbase.servlet.LifecycleListener</listener-class>
        </listener>
        <servlet>
            <servlet-name>Persistent Faces Servlet</servlet-name>
            <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet>
            <servlet-name>Blocking Servlet</servlet-name>
            <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet>
            <servlet-name>uploadServlet</servlet-name>
            <servlet-class>com.icesoft.faces.component.inputfile.FileUploadServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet>
            <servlet-name>ExceptionHandlerServlet</servlet-name>
            <servlet-class>com.sun.errorhandler.ExceptionHandler</servlet-class>
            <init-param>
                <param-name>errorHost</param-name>
                <param-value>localhost</param-value>
            </init-param>
            <init-param>
                <param-name>errorPort</param-name>
                <param-value>24444</param-value>
            </init-param>
        </servlet>
        <servlet>
            <servlet-name>ThemeServlet</servlet-name>
            <servlet-class>com.sun.webui.theme.ThemeServlet</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>Persistent Faces Servlet</servlet-name>
            <url-pattern>/xmlhttp/*</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>Persistent Faces Servlet</servlet-name>
            <url-pattern>*.iface</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>Persistent Faces Servlet</servlet-name>
            <url-pattern>*.jspx</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>Blocking Servlet</servlet-name>
            <url-pattern>/block/*</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>uploadServlet</servlet-name>
            <url-pattern>/uploadHtml</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>/faces/*</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>Persistent Faces Servlet</servlet-name>
            <url-pattern>*.jsp</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>ExceptionHandlerServlet</servlet-name>
            <url-pattern>/error/ExceptionHandler</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>ThemeServlet</servlet-name>
            <url-pattern>/theme/*</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>Main.jsp</welcome-file>
        </welcome-file-list>
        <error-page>
            <exception-type>javax.servlet.ServletException</exception-type>
            <location>/error/ExceptionHandler</location>
        </error-page>
        <error-page>
            <exception-type>java.io.IOException</exception-type>
            <location>/error/ExceptionHandler</location>
        </error-page>
        <error-page>
            <exception-type>javax.faces.FacesException</exception-type>
            <location>/error/ExceptionHandler</location>
        </error-page>
        <error-page>
            <exception-type>com.sun.rave.web.ui.appbase.ApplicationException</exception-type>
            <location>/error/ExceptionHandler</location>
        </error-page>
        <jsp-config>
            <jsp-property-group>
                <url-pattern>*.jspf</url-pattern>
                <is-xml>true</is-xml>
            </jsp-property-group>
            </jsp-config>

        <resource-ref>
            <description>DataSource Reference</description>
            <res-ref-name>jdbc/Project_name_MySQL</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
        </resource-ref>
        </web-app>

web.xml(更改后)

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

    <context-param>
        <param-name>com.icesoft.faces.debugDOMUpdate</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.validateXml</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.verifyObjects</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
        <param-value>-1</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.VALIDATE_EMPTY_FIELDS</param-name>
        <param-value>false</param-value>
    </context-param>
    <servlet>
        <servlet-name>Resource Servlet</servlet-name>
        <servlet-class>com.icesoft.faces.webapp.CompatResourceServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Resource Servlet</servlet-name>
        <url-pattern>/xmlhttp/*</url-pattern>
    </servlet-mapping>

    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/icefaces/*</url-pattern>
    </servlet-mapping>

    <servlet>
        <servlet-name>ExceptionHandlerServlet</servlet-name>
        <servlet-class>com.sun.errorhandler.ExceptionHandler</servlet-class>
        <init-param>
            <param-name>errorHost</param-name>
            <param-value>localhost</param-value>
        </init-param>
        <init-param>
            <param-name>errorPort</param-name>
            <param-value>24444</param-value>
        </init-param>
    </servlet>
    <servlet>
        <servlet-name>ThemeServlet</servlet-name>
        <servlet-class>com.sun.webui.theme.ThemeServlet</servlet-class>
    </servlet>



    <servlet-mapping>
        <servlet-name>ExceptionHandlerServlet</servlet-name>
        <url-pattern>/error/ExceptionHandler</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ThemeServlet</servlet-name>
        <url-pattern>/theme/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>Main.jsf</welcome-file>

        </welcome-file-list>
    <error-page>
        <exception-type>javax.servlet.ServletException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>
    <error-page>
        <exception-type>java.io.IOException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>
    <error-page>
        <exception-type>javax.faces.FacesException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>
    <error-page>
        <exception-type>com.sun.rave.web.ui.appbase.ApplicationException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>


    <resource-ref>
        <description>DataSource Reference</description>
        <res-ref-name>jdbc/property_manager_MySQL</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>

原始项目中用户的 jar 文件是

(1)appbase.jar
(2) backport-util-concurrent-2.2_1.jar
(3)commons-beanutils.jar
(4) commons-collections.jar
(5)commons-digester.jar
(6)commons-fileupload-1.2.2.jar
(7)commons-logging.jar
(8)dataprovider-1.0.jar
(9)icefaces-1.8.2.jar
(10)icefaces-bm.jar
(11)icefaces-comps-1.8.2.jar
(12)jsf-api.jar
(13)jsfcl.jar
(14)jsf-impl.jar
(15)json-2.0.jar
(16)jstl.jar
(17)mysql-connector-java-5.1.13-bin.jar
(18)sqlx.jar
(19)standard.jar
(20)webui-jsf-4.4.0.1.jar

已修改项目中添加的 Jar 文件

(1)appbase.jar
(2)backport-util-concurrent-2.2_1.jar
(3)commons-beanutils.jar
(4)commons-collections.jar
(5)commons-digester.jar
(6)commons-fileupload-1.2.2.jar
(7)commons-logging.jar
(8)dataprovider-1.0.jar
(9)icefaces.jar
(10)icefaces-ace-2.0.0.jar
(11)icefaces-compat.jar
(12)javax.faces.jar
(13)jsf-api-2.1.3.jar
(14)jsfcl.jar
(15)jsf-facelets.jar
(16)jsf-impl-2.1.3.jar
(17)json-2.0.jar
(18)jstl.jar
(19)jxl.jar
(20)krysalis-jCharts-1.0.0-alpha-1.jar
(21)mysql-connector-java-5.1.13-bin.jar
(22)sqlx.jar
(23)standard.jar
(24)webui-jsf-4.4.0.1.jar

删除 icefaces-bm.jar 和 icefaces-comps-1.8.2.jar 后的人我面临很多问题,因为我在我的项目中使用 InputFile 功能并且不知道如何更改它。我正在使用 icefaces-ace-2.0.0.jar 作为 FileUpload 功能,但到目前为止它没有多大帮助。至于 icefaces-bm.jar,我还没有找到任何替代方案。请帮助我正确收集 JAR 文件。

我在运行程序时遇到的错误:-

Oct 17, 2013 11:36:03 AM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet uploadServlet as unavailable
Oct 17, 2013 11:36:04 AM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet  threw load() exception
java.lang.ClassCastException: org.icefaces.apache.commons.fileupload.servlet.ServletFileUpload cannot be cast to javax.servlet.Servlet
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1136)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)

Oct 17, 2013 11:36:06 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Oct 17, 2013 11:36:06 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Oct 17, 2013 11:36:06 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@2ce5a2')
Oct 17, 2013 11:36:42 AM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet uploadServlet as unavailable
Oct 17, 2013 11:36:42 AM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet  threw load() exception
java.lang.ClassCastException: org.icefaces.apache.commons.fileupload.servlet.ServletFileUpload cannot be cast to javax.servlet.Servlet
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1136)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:530)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1471)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
    at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:856)
    at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:353)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1812)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)

Oct 17, 2013 11:50:49 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Oct 17, 2013 11:50:49 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Oct 17, 2013 11:51:55 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Oct 17, 2013 11:51:55 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Oct 17, 2013 11:51:55 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@19cc8fd')
Oct 17, 2013 12:01:09 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Oct 17, 2013 12:01:09 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Oct 17, 2013 12:04:53 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Oct 17, 2013 12:04:53 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Oct 17, 2013 12:04:53 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@12d5c20')
Oct 17, 2013 12:21:48 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
Oct 17, 2013 12:21:48 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
Oct 17, 2013 12:22:55 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Oct 17, 2013 12:22:55 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Oct 17, 2013 12:22:55 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@1e820d7')
Oct 17, 2013 12:29:26 PM org.apache.catalina.session.StandardSession writeObject
WARNING: Cannot serialize session attribute com.sun.faces.application.view.activeViewMaps for session B8DA4BD3A0286DE0B3FCA8A7A903EA86
java.io.NotSerializableException: apppropertymanagerface.controller.Page1
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
    at java.util.HashMap.writeObject(HashMap.java:1100)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:975)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1480)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
    at java.util.HashMap.writeObject(HashMap.java:1100)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:975)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1480)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
    at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1671)
    at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1077)
    at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:432)
    at org.apache.catalina.session.StandardManager.unload(StandardManager.java:353)
    at org.apache.catalina.session.StandardManager.stopInternal(StandardManager.java:518)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5462)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1582)
    at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1571)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
4

1 回答 1

2

确保查看迁移文档的更新版本:http: //www.icesoft.org/wiki/display/ICE/ICEfaces+1.x+Compatibility

首先,你知道 icefaces-bm.jar 是从哪里来的吗?我对此并不熟悉。所以在你知道它是什么之前,我会把它排除在外。另外请列出您在启动时看到的任何异常(我假设该应用程序根本没有启动?)。并且最好升级到最新的 ICEfaces 3.3.0 版本,包括包含的 JSF 版本 2.1.19。

您可以删除以下上下文参数,因为它们不再在 ICEfaces 3 中使用:

  • com.icesoft.faces.concurrentDOMViews
  • com.sun.faces.enableRestoreView11兼容性
  • com.icesoft.faces.standardRequestScope
  • com.icesoft.faces.synchronousUpdate

删除 Persistent Faces Servlet 及其 servlet 映射。

您的欢迎文件应该是“Main.jsf”而不是“Main.xhtml”。

我不确定旧 Sun Rave 框架在 JSF 2 上的兼容性。最好从 ICEfaces 3.3.0 捆绑包中的 ICEfaces Showcase 示例战争/项目重新开始。只需添加您的 xhtml 页面和 java 类。从页面中删除所有 Sun Rave 依赖项。

至于文件上传,您看过 Ace FileEntry 的教程和文档吗?

http://www.icesoft.org/wiki/display/ICE/FileEntry

谢谢,菲利普

于 2013-10-16T12:39:48.783 回答