qq_39671843
kikovy
2018-04-17 02:26
采纳率: 0%
浏览 2.1k

idea启动tomcat的时候报错了,对某一个servlet找不到?

在网页上其他功能都可以实现,只要涉及到这个servlet的全都出错。之前都是好好的!我也不知道为什么会这样

图片说明
图片说明
图片说明

17-Apr-2018 10:09:50.393 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource Unable to process web resource [/WEB-INF/classes/org/zhh/hotel/controller/OrderServlet.class] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: It is not a Java .class file
at org.apache.tomcat.util.bcel.classfile.ClassParser.readID(ClassParser.java:200)
at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:78)

at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1733)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:484)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:433)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

9条回答 默认 最新

  • vture
    MarkQw 2018-04-17 02:44

    把代码贴出来看看,是不是import错了包.

    点赞 评论
  • MonkeyBrothers
    小猴子的技术笔记 2018-04-17 02:57

    你的注解有问题,检查一下注解

    点赞 评论
  • qq_31150503
    IT界刘德华 2018-04-17 03:12

    首先你需要确定是项目的问题还是Tomcat的问题(换一个新的Tomcat跑一下)
    2、如果新的Tomcat跑项目没问题那就是原来Tomcat的问题否则就是项目有问题
    如果项目有问题就需要把代码贴出来看下

    点赞 评论
  • m0_37647521

    我认为是项目本身的问题,可能这个.class文件没有加载上

    点赞 评论
  • qq_40021015
    小羽神记 2018-04-17 03:35

    把原先的tomcat卸载了,然后从新安装就可以了

    点赞 评论
  • qq_37850514
    总是忘记账号密码 2018-04-17 03:41

    建议重新安装Tomcat,我之前也遇见过这类情况

    点赞 评论
  • wu_ri_san_xing
    zengqinggen 2018-04-17 06:29

    项目clean一下,再install试试

    点赞 评论
  • baidu_33403616
    再写三行 2018-04-17 08:47
    点赞 评论
  • u012261499
    s3578505 2018-04-18 09:58

    可能是版本里面缺少对应的文件 可以换个版本试试 把真个tomcat删了 重新安装配置

    点赞 评论

相关推荐