在3台不同window系统[WIN8,WIN7,XP]下测试,完全正常!
部到测试网[linux]下
遇到一个 诡异的环境问题。。。[color=red][b]还未解决[/b][/color]~烦
Mr Lin 18:56:03 ==============================================================
2014-3-13 18:54:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://www.springframework.org/tags is already defined
2014-03-13 18:54:34,317 ERROR (ContextLoader.java:220) - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jotm' defined in ServletContext resource [/WEB-INF/xml/spring/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [common.dynds.JotmFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax/resource/spi/XATerminator
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
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$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
[color=red]这个是什么都没动的时候第一次报错~
遇到这个问题我的解决办法是在tomcat下加个javaee.jar包[/color]
Mr Lin 19:00:02 ==============================================================
信息: Starting Servlet Engine: Apache Tomcat/7.0.42
2014-3-13 18:57:24 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cwcj]]
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
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$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cwcj]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 7 more
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig;
at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1374)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1346)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
2014-3-13 18:57:24 org.apache.catalina.core.ContainerBase startInternal
严重: 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$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
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)
[color=red]这个是加了javaee.jar包后报的错
解决这个问题是在jdk/jre/lib/ext中添加servlet-api-3.0.jar包[/color]
Mr Lin 19:01:39 ==============================================================
信息: 初始化上下文 '/cwcj' 的 Mojarra 2.0.3 (FCS b03)
2014-3-13 19:00:26 com.sun.faces.spi.InjectionProviderFactory createInstance
信息: JSF1048:有 PostConstruct/PreDestroy 注释。标有这些注释的 ManagedBeans 方法将表示注释已处理。
2014-3-13 19:00:26 com.sun.faces.config.ConfigureListener installExpressionFactory
严重: Unable to instantiate ExpressionFactory 'com.sun.el.ExpressionFactoryImpl'
2014-3-13 19:00:26 org.apache.catalina.core.StandardContext startInternal
严重: Error listenerStart
2014-3-13 19:00:26 org.apache.catalina.core.StandardContext startInternal
严重: Context [/cwcj] startup failed due to previous errors
2014-3-13 19:00:26 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/cwcj] appears to have started a thread named [JotmBatch] but has failed to stop it. This is very likely to create a memory leak.
2014-3-13 19:00:26 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/cwcj] appears to have started a thread named [JotmClock] but has failed to stop it. This is very likely to create a memory leak.
2014-3-13 19:00:26 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/cwcj] created a ThreadLocal with key of type [com.sun.faces.util.Util$1] (value [com.sun.faces.util.Util$1@11b99c4]) and a value of type [java.util.HashMap] (value [{com.sun.faces.patternCache={ = }}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
2014-3-13 19:00:26 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/examples
2014-3-13 19:00:26 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/manager
2014-3-13 19:00:26 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/docs
2014-3-13 19:00:26 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/host-manager
2014-3-13 19:00:27 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/ROOT
2014-3-13 19:00:27 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
2014-3-13 19:00:27 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
2014-3-13 19:00:27 org.apache.catalina.startup.Catalina start
信息: Server startup in 5133 ms
[color=red]tomcat运行正常,但是项目没启动,这个条件下我是在tomcat下再加了一个包el-ri.jar
[/color]
Mr Lin 19:04:18 ==============================================================
2014-3-13 19:03:58 com.sun.faces.config.ConfigureListener contextInitialized
信息: 初始化上下文 '/cwcj' 的 Mojarra 2.0.3 (FCS b03)
2014-3-13 19:03:59 com.sun.faces.spi.InjectionProviderFactory createInstance
信息: JSF1048:有 PostConstruct/PreDestroy 注释。标有这些注释的 ManagedBeans 方法将表示注释已处理。
2014-03-13 19:03:59 -> 系统正在加载全局ini配置文件...
2014-03-13 19:03:59 -> 系统加载全局ini配置文件成功...
2014-03-13 19:03:59 -> 系统正在加载全局xml配置文件...
2014-03-13 19:03:59 -> 系统加载全局xml配置文件成功...
2014-03-13 19:03:59,713 DEBUG (JakartaCommonsLoggingImpl.java:27) - {conn-100000} Connection
2014-03-13 19:03:59,720 DEBUG (JakartaCommonsLoggingImpl.java:27) - {conn-100000} Preparing Statement: select * from Sys_City order by CityCode
CustomerContextHolder.getCustomerType()==========>cj_control
2014-03-13 19:03:59,987 DEBUG (JakartaCommonsLoggingImpl.java:27) - {pstm-100001} Executing Statement: select * from Sys_City order by CityCode
2014-03-13 19:03:59,988 DEBUG (JakartaCommonsLoggingImpl.java:27) - {pstm-100001} Parameters: []
2014-03-13 19:03:59,988 DEBUG (JakartaCommonsLoggingImpl.java:27) - {pstm-100001} Types: []
2014-03-13 19:04:00,007 DEBUG (JakartaCommonsLoggingImpl.java:27) - {conn-100003} Connection
2014-03-13 19:04:00,008 DEBUG (JakartaCommonsLoggingImpl.java:27) - {conn-100003} Preparing Statement: select * from Sys_Area order by AreaCode
CustomerContextHolder.getCustomerType()==========>cj_control
2014-03-13 19:04:00,009 DEBUG (JakartaCommonsLoggingImpl.java:27) - {pstm-100004} Executing Statement: select * from Sys_Area order by AreaCode
2014-03-13 19:04:00,009 DEBUG (JakartaCommonsLoggingImpl.java:27) - {pstm-100004} Parameters: []
2014-03-13 19:04:00,009 DEBUG (JakartaCommonsLoggingImpl.java:27) - {pstm-100004} Types: []
2014-3-13 19:04:00 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/examples
2014-3-13 19:04:00 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/manager
2014-3-13 19:04:00 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/docs
2014-3-13 19:04:00 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/host-manager
2014-3-13 19:04:00 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/ROOT
2014-3-13 19:04:00 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
2014-3-13 19:04:00 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
2014-3-13 19:04:00 org.apache.catalina.startup.Catalina start
信息: Server startup in 5760 ms
[color=red]好了项目看似运行成功了~~~
[/color]
Mr Lin 19:04:23 ==============================================================
点击项目页面
HTTP Status 500 - java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
type Exception report
message java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
com.ffcsip.monitor.EncodingFilter.doFilter(EncodingFilter.java:103)
root cause
java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
org.apache.jasper.compiler.PageInfo.<init>(PageInfo.java:79)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:110)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
com.ffcsip.monitor.EncodingFilter.doFilter(EncodingFilter.java:103)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.42 logs.
Apache Tomcat/7.0.42
Mr Lin 19:04:43 ==============================================================
[color=red]在刷新一下页面[/color]
HTTP Status 500 - java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
type Exception report
message java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:177)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
com.ffcsip.monitor.EncodingFilter.doFilter(EncodingFilter.java:103)
root cause
java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:172)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
com.ffcsip.monitor.EncodingFilter.doFilter(EncodingFilter.java:103)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.42 logs.
[color=red]同时这个情况下所有项目页面都是这个错误
换一台服务器一样的错
tomcat、jdk一样[/color]
/*******************************************************************************
************************* :D 最终解决方法 :D ******************************
*******************************************************************************/
1.环境还原到最初环境
2.在jdk/jre/lib/ext中添加servlet-api-3.0.jar包
3.在项目lib里面添加javax.transaction.jar、javax.resource.jar、javax.servlet.jsp.jstl.jar
部到测试网[linux]下
遇到一个 诡异的环境问题。。。[color=red][b]还未解决[/b][/color]~烦
Mr Lin 18:56:03 ==============================================================
2014-3-13 18:54:33 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: http://www.springframework.org/tags is already defined
2014-03-13 18:54:34,317 ERROR (ContextLoader.java:220) - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jotm' defined in ServletContext resource [/WEB-INF/xml/spring/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [common.dynds.JotmFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax/resource/spi/XATerminator
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
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$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
[color=red]这个是什么都没动的时候第一次报错~
遇到这个问题我的解决办法是在tomcat下加个javaee.jar包[/color]
Mr Lin 19:00:02 ==============================================================
信息: Starting Servlet Engine: Apache Tomcat/7.0.42
2014-3-13 18:57:24 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cwcj]]
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
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$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cwcj]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 7 more
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig;
at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1374)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1346)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
2014-3-13 18:57:24 org.apache.catalina.core.ContainerBase startInternal
严重: 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$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
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)
[color=red]这个是加了javaee.jar包后报的错
解决这个问题是在jdk/jre/lib/ext中添加servlet-api-3.0.jar包[/color]
Mr Lin 19:01:39 ==============================================================
信息: 初始化上下文 '/cwcj' 的 Mojarra 2.0.3 (FCS b03)
2014-3-13 19:00:26 com.sun.faces.spi.InjectionProviderFactory createInstance
信息: JSF1048:有 PostConstruct/PreDestroy 注释。标有这些注释的 ManagedBeans 方法将表示注释已处理。
2014-3-13 19:00:26 com.sun.faces.config.ConfigureListener installExpressionFactory
严重: Unable to instantiate ExpressionFactory 'com.sun.el.ExpressionFactoryImpl'
2014-3-13 19:00:26 org.apache.catalina.core.StandardContext startInternal
严重: Error listenerStart
2014-3-13 19:00:26 org.apache.catalina.core.StandardContext startInternal
严重: Context [/cwcj] startup failed due to previous errors
2014-3-13 19:00:26 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/cwcj] appears to have started a thread named [JotmBatch] but has failed to stop it. This is very likely to create a memory leak.
2014-3-13 19:00:26 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/cwcj] appears to have started a thread named [JotmClock] but has failed to stop it. This is very likely to create a memory leak.
2014-3-13 19:00:26 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/cwcj] created a ThreadLocal with key of type [com.sun.faces.util.Util$1] (value [com.sun.faces.util.Util$1@11b99c4]) and a value of type [java.util.HashMap] (value [{com.sun.faces.patternCache={ = }}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
2014-3-13 19:00:26 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/examples
2014-3-13 19:00:26 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/manager
2014-3-13 19:00:26 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/docs
2014-3-13 19:00:26 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/host-manager
2014-3-13 19:00:27 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/ROOT
2014-3-13 19:00:27 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
2014-3-13 19:00:27 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
2014-3-13 19:00:27 org.apache.catalina.startup.Catalina start
信息: Server startup in 5133 ms
[color=red]tomcat运行正常,但是项目没启动,这个条件下我是在tomcat下再加了一个包el-ri.jar
[/color]
Mr Lin 19:04:18 ==============================================================
2014-3-13 19:03:58 com.sun.faces.config.ConfigureListener contextInitialized
信息: 初始化上下文 '/cwcj' 的 Mojarra 2.0.3 (FCS b03)
2014-3-13 19:03:59 com.sun.faces.spi.InjectionProviderFactory createInstance
信息: JSF1048:有 PostConstruct/PreDestroy 注释。标有这些注释的 ManagedBeans 方法将表示注释已处理。
2014-03-13 19:03:59 -> 系统正在加载全局ini配置文件...
2014-03-13 19:03:59 -> 系统加载全局ini配置文件成功...
2014-03-13 19:03:59 -> 系统正在加载全局xml配置文件...
2014-03-13 19:03:59 -> 系统加载全局xml配置文件成功...
2014-03-13 19:03:59,713 DEBUG (JakartaCommonsLoggingImpl.java:27) - {conn-100000} Connection
2014-03-13 19:03:59,720 DEBUG (JakartaCommonsLoggingImpl.java:27) - {conn-100000} Preparing Statement: select * from Sys_City order by CityCode
CustomerContextHolder.getCustomerType()==========>cj_control
2014-03-13 19:03:59,987 DEBUG (JakartaCommonsLoggingImpl.java:27) - {pstm-100001} Executing Statement: select * from Sys_City order by CityCode
2014-03-13 19:03:59,988 DEBUG (JakartaCommonsLoggingImpl.java:27) - {pstm-100001} Parameters: []
2014-03-13 19:03:59,988 DEBUG (JakartaCommonsLoggingImpl.java:27) - {pstm-100001} Types: []
2014-03-13 19:04:00,007 DEBUG (JakartaCommonsLoggingImpl.java:27) - {conn-100003} Connection
2014-03-13 19:04:00,008 DEBUG (JakartaCommonsLoggingImpl.java:27) - {conn-100003} Preparing Statement: select * from Sys_Area order by AreaCode
CustomerContextHolder.getCustomerType()==========>cj_control
2014-03-13 19:04:00,009 DEBUG (JakartaCommonsLoggingImpl.java:27) - {pstm-100004} Executing Statement: select * from Sys_Area order by AreaCode
2014-03-13 19:04:00,009 DEBUG (JakartaCommonsLoggingImpl.java:27) - {pstm-100004} Parameters: []
2014-03-13 19:04:00,009 DEBUG (JakartaCommonsLoggingImpl.java:27) - {pstm-100004} Types: []
2014-3-13 19:04:00 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/examples
2014-3-13 19:04:00 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/manager
2014-3-13 19:04:00 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/docs
2014-3-13 19:04:00 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/host-manager
2014-3-13 19:04:00 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory /usr/local/tomcat/webapps/ROOT
2014-3-13 19:04:00 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
2014-3-13 19:04:00 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
2014-3-13 19:04:00 org.apache.catalina.startup.Catalina start
信息: Server startup in 5760 ms
[color=red]好了项目看似运行成功了~~~
[/color]
Mr Lin 19:04:23 ==============================================================
点击项目页面
HTTP Status 500 - java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
type Exception report
message java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
com.ffcsip.monitor.EncodingFilter.doFilter(EncodingFilter.java:103)
root cause
java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
org.apache.jasper.compiler.PageInfo.<init>(PageInfo.java:79)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:110)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
com.ffcsip.monitor.EncodingFilter.doFilter(EncodingFilter.java:103)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.42 logs.
Apache Tomcat/7.0.42
Mr Lin 19:04:43 ==============================================================
[color=red]在刷新一下页面[/color]
HTTP Status 500 - java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
type Exception report
message java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:177)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
com.ffcsip.monitor.EncodingFilter.doFilter(EncodingFilter.java:103)
root cause
java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:172)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
com.ffcsip.monitor.EncodingFilter.doFilter(EncodingFilter.java:103)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.42 logs.
[color=red]同时这个情况下所有项目页面都是这个错误
换一台服务器一样的错
tomcat、jdk一样[/color]
/*******************************************************************************
************************* :D 最终解决方法 :D ******************************
*******************************************************************************/
1.环境还原到最初环境
2.在jdk/jre/lib/ext中添加servlet-api-3.0.jar包
3.在项目lib里面添加javax.transaction.jar、javax.resource.jar、javax.servlet.jsp.jstl.jar