将icefaces 1.8 Project转换为Icefaces 3.0

时间:2013-10-16 07:47:31

标签: jsf-2 icefaces jsf-1.2 icefaces-3 icefaces-1.8

我在icefaces 1.8 / JSF1.2中有一个Project构建,我需要它转换为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

在modieied项目中添加了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)

1 个答案:

答案 0 :(得分: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.enableRestoreView11Compatibility
  • 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示例war /项目,那可能是最好的。只需添加您的xhtml页面和java类。从页面中删除所有Sun Rave依赖项。

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

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

谢谢, 菲利普