我将Richfaces版本从3.3.3迁移到4.3.5,将JSF从1.2迁移 到2.2.6并且做了以下更改:
删除了以下的jar :jsf-api.jar jsf-facelets.jar jsf-impl.jar richfaces-api-3.3.3.Final.jar richfaces-impl-3.3.3.Final 。罐 RichFaces的-UI-3.3.3.Final.jar
添加了以下jar :cssparser-0.9.5.jar guava-10.0.1.jar richfaces-components-api-4.3.5.Final.jar RichFaces的组件-UI-4.3.5.Final.jar richfaces-core-api-4.3.5.Final.jar richfaces-core-impl-4.3.5.Final.jar sac-1.3.jar jsf-impl-2.2.6.jar jsf-api-2.2.6.jar
并进行了以下更改:1) faces-config.xml (从1.2更改版本 到2.2:
<?xml version="1.0" encoding="UTF-8"?<faces-config
version="2.2" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd" <!--
AUTO GENERATED FILE. PLEASE DO NOT EDIT MANUALLY. IF YOU HAVE TO MAKE
CHANGES, PLEASE DO SO IN THE MASTER VERSION OF THIS FILE IN {PROJECT
FOLDER}/cfg DIRECTORY. -->
2) MASTER-web.xml :
<?xml version="1.0" encoding="UTF-8"?<web-app
version="3.1" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"<!-- @DNF@ -->
将版本从2.5更改为3.1
3)我正在使用 JDK 7
运行当我尝试重新启动tomcat 7时,我得到以下异常:
Mar 31, 2014 10:41:48 AM org.apache.catalina.core.AprLifecycleListener
init INFO: The APR based Apache Tomcat Native library which allows
optimal performance in production environments was
not found on the java.library.path: C:\Program
Files\Java\jre7\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program
Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program
Files/Java/jre7/lib/i386;C:\oracle\product\10.2.0\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program
Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Windows
Imaging\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program
Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common
Files\Roxio Shared\9.0\DLLShared\;C:\Program Files\Enterprise
Vault\EVClient\;C:\Program
Files\TortoiseSVN\bin;%JAVA_HOME%/bin;%M2%;C:\Program
Files\Java\jdk1.7.0_40/bin;C:\ATT\ebiz_new\apache-maven-3.2.1\bin;C:\Program
Files\eclipse-jee-kepler-R-win32\eclipse;;. Mar 31, 2014 10:41:49 AM
org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING:
[SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
property 'source' to 'org.eclipse.jst.jee.server:IGATE2DATATOOL' did
not find a matching property. Mar 31, 2014 10:41:49 AM
org.apache.coyote.AbstractProtocol init INFO: Initializing
ProtocolHandler ["http-bio-8080"] Mar 31, 2014 10:41:49 AM
org.apache.coyote.AbstractProtocol init INFO: Initializing
ProtocolHandler ["ajp-bio-8009"] Mar 31, 2014 10:41:49 AM
org.apache.catalina.startup.Catalina load INFO: Initialization
processed in 821 ms Mar 31, 2014 10:41:49 AM
org.apache.catalina.core.StandardService startInternal INFO: Starting
service Catalina Mar 31, 2014 10:41:49 AM
org.apache.catalina.core.StandardEngine startInternal INFO: Starting
Servlet Engine: Apache Tomcat/7.0.47 Mar 31, 2014 10:42:45 AM
org.apache.catalina.core.ContainerBase startInternal SEVERE: A child
container failed during start
**java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext**[/IGATE2DATATOOL]]
at java.util.concurrent.FutureTask.report(Unknown Source) at
java.util.concurrent.FutureTask.get(Unknown Source) at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at
java.lang.Thread.run(Unknown Source) Caused by:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/IGATE2DATATOOL]]
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 6 more
**Caused by: java.lang.NullPointerException
at om.sun.faces.config.InitFacesContext.cleanupInitMaps(InitFacesContext.java:283)**
at
com.sun.faces.config.InitFacesContext.<init>(InitFacesContext.java:108)
at
com.sun.faces.config.FacesInitializer.onStartup(FacesInitializer.java:114)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5423)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
Mar 31, 2014 10:42:45 AM org.apache.catalina.core.ContainerBase
startInternal SEVERE: A child container failed during start
java.util.concurrent.ExecutionException:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost]] at
java.util.concurrent.FutureTask.report(Unknown Source) at
java.util.concurrent.FutureTask.get(Unknown Source) at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:691) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at
java.lang.reflect.Method.invoke(Unknown Source) at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322) at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456) Caused
by: org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at
java.lang.Thread.run(Unknown Source) Caused by:
org.apache.catalina.LifecycleException: A child container failed
during start at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
Mar 31, 2014 10:42:45 AM org.apache.catalina.startup.Catalina start
SEVERE: The required Server component failed to start so Tomcat is
unable to start. org.apache.catalina.LifecycleException: Failed to
start component [StandardServer[8005]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Catalina.start(Catalina.java:691) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at
java.lang.reflect.Method.invoke(Unknown Source) at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322) at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456) Caused
by: org.apache.catalina.LifecycleException: Failed to start component
[StandardService[Catalina]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more Caused by: org.apache.catalina.LifecycleException: Failed
to start component [StandardEngine[Catalina]] at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 9 more Caused by: org.apache.catalina.LifecycleException: A child
container failed during start at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
Mar 31, 2014 10:42:45 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"] Mar 31, 2014 10:42:45
AM org.apache.coyote.AbstractProtocol pause INFO: Pausing
ProtocolHandler ["ajp-bio-8009"] Mar 31, 2014 10:42:45 AM
org.apache.catalina.core.StandardService stopInternal INFO: Stopping
service Catalina Mar 31, 2014 10:42:45 AM
org.apache.coyote.AbstractProtocol destroy INFO: Destroying
ProtocolHandler ["http-bio-8080"] Mar 31, 2014 10:42:45 AM
org.apache.coyote.AbstractProtocol destroy INFO: Destroying
ProtocolHandler ["ajp-bio-8009"]
请告知如何解决:
Caused by: java.lang.NullPointerException
at com.sun.faces.config.InitFacesContext.cleanupInitMaps(InitFacesContext.java:283)
还缺少什么?
谢谢: - )