简体   繁体   English

java.lang.NoSuchMethodError:org.apache.catalina.Context.addLifecycleListener

[英]java.lang.NoSuchMethodError: org.apache.catalina.Context.addLifecycleListener

I am trying to setup my java workspace with eclipse and tomcat apache server, done with java environmental variables setup as below, 我正在尝试使用eclipse和tomcat apache服务器设置我的Java工作区,并通过以下Java环境变量设置完成操作,

Eclipse Java EE IDE for Web Developers - Version: Indigo Service Release 2 Apache Tomcat v 7 针对Web开发人员的Eclipse Java EE IDE- 版本:Indigo Service Release 2 Apache Tomcat v 7

UserVariables: CLASSPATH : .;C:\\Program Files\\Java\\jdk1.8.0\\lib;C:\\Program Files\\Java\\jdk1.8.0\\jre\\lib JAVA_HOME : C:\\Program Files\\Java\\jdk1.8.0 JDK_HOME : %JAVA_HOME% JRE_HOME : C:\\Program Files\\Java\\jdk1.8.0\\jre UserVariables: CLASSPATH: 。; C:\\ Program Files \\ Java \\ jdk1.8.0 \\ lib; C:\\ Program Files \\ Java \\ jdk1.8.0 \\ jre \\ lib JAVA_HOME: C:\\ Program Files \\ Java \\ jdk1.8.0 JDK_HOME: %JAVA_HOME% JRE_HOME: C:\\ Program Files \\ Java \\ jdk1.8.0 \\ jre

System variables: Path : %SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem;%SYSTEMROOT%\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\Java\\jdk1.8.0\\bin;C:\\Windows\\System32\\;C:\\Windows\\;C:\\Windows\\System32\\Wbem 系统变量: 路径: %SystemRoot%\\ system32;%SystemRoot%;%SystemRoot%\\ System32 \\ Wbem;%SYSTEMROOT%\\ System32 \\ WindowsPowerShell \\ v1.0 \\; C:\\ Program Files \\ Java \\ jdk1.8.0 \\ bin; C:\\ Windows \\ System32 \\; C:\\ Windows \\; C:\\ Windows \\ System32 \\ Wbem

On starting server, its stops printing the below logs in the console, I am not sure where I am wrong, Please help on this.. 在启动服务器时,它停止在控制台中打印以下日志,我不确定我哪里写错了,请提供帮助。

Jul 09, 2016 11:01: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\jre8\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre8/bin/client;C:/Program Files/Java/jre8/bin;C:/Program Files/Java/jre8/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\eclipse;;.
Jul 09, 2016 11:01:49 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 09, 2016 11:01:49 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 600 ms
Jul 09, 2016 11:01:49 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 09, 2016 11:01:49 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
Jul 09, 2016 11:01:49 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 09, 2016 11:01:49 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 09, 2016 11:01:49 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31  config=null
java.lang.NoSuchMethodError: org.apache.catalina.Context.addLifecycleListener(Lorg/apache/catalina/LifecycleListener;)V
    at org.apache.catalina.core.ThreadLocalLeakPreventionListener.registerContextListener(ThreadLocalLeakPreventionListener.java:153)
    at org.apache.catalina.core.ThreadLocalLeakPreventionListener.registerListenersForHost(ThreadLocalLeakPreventionListener.java:148)
    at org.apache.catalina.core.ThreadLocalLeakPreventionListener.registerListenersForEngine(ThreadLocalLeakPreventionListener.java:141)
    at org.apache.catalina.core.ThreadLocalLeakPreventionListener.registerListenersForServer(ThreadLocalLeakPreventionListener.java:132)
    at org.apache.catalina.core.ThreadLocalLeakPreventionListener.lifecycleEvent(ThreadLocalLeakPreventionListener.java:84)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    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:303)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)

The problem was that the tomcat jar files were installed in the $CATALINA_BASE/lib and the CATALINA_HOME was pointing to a different version of tomcat than what was in the $CATALINA_BASE/lib. 问题在于,tomcat jar文件安装在$ CATALINA_BASE / lib中,而CATALINA_HOME指向的tomcat版本与$ CATALINA_BASE / lib中的版本不同。

Use Tomcat 7.0.21 or above 使用Tomcat 7.0.21或更高版本

in order to create new workspace use following steps: step1: open eclipse with new workspace [don't use old workspace] 为了创建新的工作区,请使用以下步骤:步骤1:使用新的工作区打开Eclipse [不要使用旧的工作区]

step2: create simple web/project application [at project creation time eclipse ask for jdk and jre point to those which you want to use] 步骤2:创建简单的Web /项目应用程序[在项目创建时,Eclipse要求jdk和jre指向要使用的对象]

step3: add only those jars which needed [this type of problem also occur when one jar override class of other in this case you have added GWT jars??] 第三步:仅添加需要的罐子[当一个罐子替代另一个罐子类时,在这种情况下,您添加了GWT罐子,也会发生这种类型的问题?]

step4: add tomact [rather than installing use stand alone] 步骤4:添加tomact [而不是单独安装安装]

step5: check all ports are avilable if not change it 步骤5:检查所有端口是否可用(如果不更改)

*when you made some configuration level changes clean tomcat work directory *当您进行一些配置级别更改时,请清理tomcat工作目录

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 获取错误:......嵌套异常是 java.lang.NoSuchMethodError: org.apache.catalina.Context.addServletMapping(Ljava/lang/Stri - Getting Error: … nested exception is java.lang.NoSuchMethodError: org.apache.catalina.Context.addServletMapping(Ljava/lang/Stri java.lang.NoSuchMethodError:org.apache.log4j.Logger - java.lang.NoSuchMethodError: org.apache.log4j.Logger java.lang.NoSuchMethodError:org.apache.commons.logging.LogFactory - java.lang.NoSuchMethodError: org.apache.commons.logging.LogFactory java.lang.NoSuchMethodError:org.apache.commons.lang.StringUtils.isBlank(Ljava / lang / String;)Z错误 - java.lang.NoSuchMethodError: org.apache.commons.lang.StringUtils.isBlank(Ljava/lang/String;)Z Error java.lang.NoSuchMethodError:org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava / lang / String;)V - java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V java.lang.NoSuchMethodError:org.springframework.web.context.ConfigurableWebApplicationContext.getId()Ljava / lang / String; - java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.getId()Ljava/lang/String; Apache POI java.lang.NoSuchMethodError - Apache POI java.lang.NoSuchMethodError 获取:: java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.put(Ljava/lang/Object;)V - Getting :: java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.put(Ljava/lang/Object;)V java.lang.NoSuchMethodError: org.apache.poi.util.POILogger.log(I[Ljava/lang/Object;)V - java.lang.NoSuchMethodError: org.apache.poi.util.POILogger.log(I[Ljava/lang/Object;)V Apache点燃并引发迭代错误java.lang.NoSuchMethodError:org.apache.spark.sql.SQLContext.createDataFrame - Apache ignite and spark itegration error java.lang.NoSuchMethodError: org.apache.spark.sql.SQLContext.createDataFrame
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM