2010-1-7 10:20:53 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\J2EE\MyEclipse Blue 7.0 M2\bin;D:\J2EE\Apache Software Foundation\Tomcat 6.0\bin
2010-1-7 10:20:53 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2010-1-7 10:20:53 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 882 ms
2010-1-7 10:20:53 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2010-1-7 10:20:53 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.16
2010-1-7 10:20:55 org.apache.tomcat.util.modeler.Registry registerComponent
严重: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/nxyc,J2EEApplication=none,J2EEServer=none
2010-1-7 10:20:55 org.apache.catalina.startup.HostConfig deployDirectory
严重: Error deploying web application directory nxyc
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1819)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1327)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
at org.apache.catalina.startup.WebAnnotationSet.loadClassAnnotation(WebAnnotationSet.java:145)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationFilterAnnotations(WebAnnotationSet.java:84)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:57)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:297)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1064)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:924)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:887)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2010-1-7 10:20:56 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2010-1-7 10:20:56 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2010-1-7 10:20:56 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/47 config=null
2010-1-7 10:20:56 org.apache.catalina.startup.Catalina start
信息: Server startup in 2427 ms
解决办法:
1.打开MyEclipse
2.Window
3.Preferences
4.选择Java节点
5.Installed JREs
6.可以看到当前使用的JVM是什么版本,路径在哪里,现在我们要改正和Tomcat一样的虚拟机.
6.Edit
7.JRE home directory
8.Browse 找到:C:\Sun\SDK\jdk\jre(找到你的安装目录)
9.ok
搞定了.!
分析:
比如,你項目中的是JRE5.0但compile是JRE6.0則出現上述錯誤。或者版本不一致!
如果工程原来是jre1.5编译的,换到一个新的MyEclipse版本需要维持用1.5,不能是1.6等,修改办法:
window-->preferences-->Java-->Compiler-->Compiler compience level将1.6改成1.5
本人出现的问题属于编译器版本的更改,以前工程在MyEclipse6.0里面,用的是1.5,现在导入到MyEclipse7.0/8.0 M中,编译器默认是1.6故出现无法运行的情况,按照上面红色的步骤修改,重新编译部署运行success.
分享到:
相关推荐
如果是windows版本,编辑TOMCAT_HOME/bin/catalina.bat,在开头加入下面几行: set CATALINA_OPTS=%CATALINA_OPTS% -Djava.rmi.server.hostname=JMX_HOST set CATALINA_OPTS=%CATALINA_OPTS% -Djavax.management....
Tomcat和Apache集群和负载均衡配置 Tomcat版本:apache-tomcat... <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> 这里的tomcat1对应的是workers.properties文件 3.三个tomcat分别部署Test工程
在Java Web开发中,Tomcat是一个广泛使用的应用服务器,它默认使用`catalina.out`文件来记录所有标准输出和错误输出。然而,对于大型应用或长时间运行的服务器,`catalina.out`可能会变得非常大,不利于日志管理和...
Linux tomcat下catalina.out日志文件分割 前言: tomcat默认使用Java.util.logging记录日志,默认只记录tomcat的日志,不记录应用的日志。tomcat支持采用log4j进行日志记录,配置方法如下: 1.更新最新的tomcat_juli...
2 在<Engine name="Catalina" defaultHost="localhost">中间加入内容: <Engine name="Catalina" defaultHost="localhost"> .........原有内容不要动 下面为新加内容: <Host name="YouWebSite....
type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" ...
type="org.apache.catalina.UserDatabase" pathname="conf/tomcat-users.xml" factory="org.apache.catalina.users.MemoryUserDatabaseFactory"/> name="jdbc/dbConnPool" type="javax.sql.DataSource" ...
同时,确保Tomcat启动脚本(`catalina.sh`或`catalina.bat`)包含以下行来加载Log4j配置: ```bash -Dlog4j.configuration=file:${catalina.base}/conf/log4j.properties ``` 这样,Tomcat就会使用Log4j进行日志...
在Java Web应用开发中,Tomcat作为常用的Servlet容器,其默认的日志系统是通过`catalina.out`文件记录所有标准输出和错误输出。当应用运行一段时间后,`catalina.out`文件可能会变得非常大,占用大量磁盘空间,这...
概念: AJP是Apache提供的完成与其它服务器通讯的一种协议。在Apache中通过mod_proxy_ajp模块发送AJP数据,另外一端的服务器需要实现AJP协议... <Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat1">
log4j.appender.FILE.File=${catalina.base}/logs/tomcat.log log4j.appender.FILE.ImmediateFlush=true log4j.appender.FILE.Threshold=DEBUG log4j.appender.FILE.Append=true log4j.appender.FILE.DatePattern='....
<Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml"/> ``` 四、...
<Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor"/> <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/> ``` 调整参数以适应...
<Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users....
在这个配置中,`name`属性是资源的别名,`auth`指定验证方式,`type`定义资源类型,`driverClassName`加载对应数据库的JDBC驱动,`url`为数据库连接字符串,`username`和`password`是数据库登录凭证,`maxActive`、`...
log4j.appender.FILE.File=${catalina.home}/logs/myapp.log log4j.appender.FILE.Append=true log4j.appender.FILE.Threshold=DEBUG log4j.appender.FILE.layout=org.apache.log4j.PatternLayout log4j....
在Ubuntu操作系统上,Tomcat是常用的Java应用服务器,它的默认日志系统是通过`catalina.out`文件来记录所有应用程序的输出。然而,对于大型复杂的应用,这种默认的日志处理方式可能不够灵活,难以满足日志管理和分析...
<Manager className="org.apache.catalina.ha.session.BackupManager" expireSessionsOnShutdown="false" notifyListenersOnReplication="true" mapSendOptions="6"/> <Channel className="org.apache.catalina....