Mac版IDEA寻求帮助1:tomcat log编码encoding;2:错误NoSuchMethodException: WebXml addServlet。

斌哥无敌 2018-02-23 09:55:25
RT,问题有2:

1、我这边的tomcat日志都显示的是乱码,应该是encoding的设置问题,但是我改了好多地方,寻求大神提供修改位置。

2、项目的错误都已经去掉了,但是还是报这个错误,是我jar包导入问题吗?



本人Mac版IntelliJ IDEA,tomcat用的是apache-tomcat-7.0.69



下面是部分错误日志:



/Users/moumoumou/work/tomcat/apache-tomcat-7.0.69/bin/catalina.sh run

[2018-02-22 03:26:59,374] Artifact test001: Server is not connected. Deploy is not available.
Connected to the target VM, address: '127.0.0.1:55343', transport: 'socket'
2018-2-22 15:27:00 org.apache.catalina.startup.VersionLoggerListener log
Ϣ: Server version: Apache Tomcat/7.0.69
2018-2-22 15:27:00 org.apache.catalina.startup.VersionLoggerListener log
Ϣ: Server built: Apr 11 2016 07:57:09 UTC
2018-2-22 15:27:00 org.apache.catalina.startup.VersionLoggerListener log
Ϣ: Server number: 7.0.69.0
2018-2-22 15:27:00 org.apache.catalina.startup.VersionLoggerListener log
Ϣ: OS Name: Mac OS X
2018-2-22 15:27:00 org.apache.catalina.startup.VersionLoggerListener log
2018-2-22 15:27:00 org.apache.coyote.AbstractProtocol init
Ϣ: Initializing ProtocolHandler ["http-bio-8080"]
2018-2-22 15:27:00 org.apache.coyote.AbstractProtocol init
Ϣ: Initializing ProtocolHandler ["ajp-bio-8009"]
2018-2-22 15:27:00 org.apache.catalina.startup.Catalina load
Ϣ: Initialization processed in 738 ms
2018-2-22 15:27:00 org.apache.catalina.core.StandardService startInternalϢ: Starting service Catalina
2018-2-22 15:27:00 org.apache.catalina.core.StandardEngine startInternal
Ϣ: Starting Servlet Engine: Apache Tomcat/7.0.69
2018-2-22 15:27:00 org.apache.coyote.AbstractProtocol start
Ϣ: Starting ProtocolHandler ["http-bio-8080"]
2018-2-22 15:27:00 org.apache.coyote.AbstractProtocol start
Ϣ: Starting ProtocolHandler ["ajp-bio-8009"]
2018-2-22 15:27:00 org.apache.catalina.startup.Catalina startϢ: Server startup in 36 ms
Connected to server
[2018-02-22 03:27:01,023] Artifact test001: Artifact is being deployed, please wait...
2018-2-22 15:27:01 org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
Ϣ: validateJarFile(/Users/moumoumou/SVN/test001.0/mbs_source/out/artifacts/test001/WEB-INF/lib/el-api.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
2018-2-22 15:27:01 org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
Ϣ: validateJarFile(/Users/moumoumou/SVN/test001.0/mbs_source/out/artifacts/test001/WEB-INF/lib/juel-api.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
2018-2-22 15:27:01 org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
Ϣ: validateJarFile(/Users/moumoumou/SVN/test001.0/mbs_source/out/artifacts/test001/WEB-INF/lib/servlet-api.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
2018-2-22 15:27:01 org.apache.tomcat.util.digester.Digester endElement
: End event threw exception
java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addServlet
at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:849)
at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1060)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:604)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1789)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2950)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:513)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:815)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:744)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:128)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:543)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1555)
at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1856)
at org.apache.catalina.startup.ContextConfig.getDefaultWebXmlFragment(ContextConfig.java:1494)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1255)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:887)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:387)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5472)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1863)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:835)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:771)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:835)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:771)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1455)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:75)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1296)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1388)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:819)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
2018-2-22 15:27:01 org.apache.catalina.startup.ContextConfig parseWebXml
: Parse error in application web.xml file at jndi:/localhost/WEB-INF/web.xml
java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addServlet
at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:849)
at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1060)
... 58 more
2018-2-22 15:27:01 org.apache.catalina.startup.ContextConfig parseWebXml
: Occurred at line 11 column 14
2018-2-22 15:27:01 org.apache.catalina.startup.ContextConfig configureStart
: Marking this application unavailable due to previous error(s)
2018-2-22 15:27:01 org.apache.catalina.startup.TldConfig execute
Ϣ: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2018-2-22 15:27:01 org.apache.catalina.core.StandardContext startInternal
: One or more components marked the context as not correctly configured
2018-2-22 15:27:01 org.apache.catalina.core.StandardContext startInternal
: Context [] startup failed due to previous errors
[2018-02-22 03:27:01,852] Artifact test001: Error during artifact deployment. See server log for details.
...全文
794 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

50,623

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧