Maven中使用tomcat:run出现错误org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
来源:互联网 发布:jquery书籍推荐 知乎 编辑:程序博客网 时间:2024/06/05 15:18
Maven中使用tomcat:run出现错误org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
这几天在学习maven,跟着视频上学maven,看到人家直接tomcat:run就成功部署了项目,所以自己也尝试了一下,但是项目可以正常部署,但是访问的时候servlet访问正常。jsp访问出现编译错误。
1.使用maven:tomcat发布项目成功。
2.servlet访问一切正常。jsp访问出现org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException的错误
3.查看编译路径下没有对应的.class文件
分析原因:
1.pom.xml文件是正常,编译不存在jar包冲突
2.配置是正常的。查阅资料以后说是jdk版本什么的问题。多方修改没有任何改观。
换一个思路去查询tomcat:run怎么运行。原来适合maven整合因此可以得知在pom文件中加入插件所以在pom.xml文件中加入如下配置
<build> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <port>9999</port> <uriEncoding>UTF-8</uriEncoding> </configuration> </plugin> </plugins></build>
这里的port可以自定义端口不在和其它8080端口冲突
这时当你再次使用tomcat:run的时候发现还是和刚才一样。是因为他还是沿用了上一次的tomcat插件(默认是6)所以运行的时候使用 tomcat7:run
这样配置生效,通过地址去访问
效果如下:
希望对你们能有帮助。
阅读全文
0 0
- Maven中使用tomcat:run出现错误org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
- org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
- org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
- org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
- org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
- org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
- 严重: Compilation error org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
- Compilation error org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
- 严重: Compilation error org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
- org.eclipse.jdt.internal.compile.classfmt.ClassFormatException的解决办法
- 将Nutch添加到WebProject中,出现org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()
- 解決org/eclipse/jdt/internal/compiler/ICompilerRequestor
- 解决java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.CompilationRe错误
- 错误:java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()
- org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/IPr
- org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/IPr
- greenDao: org.eclipse.jdt.internal.compiler.batch.FileSystem.<init>([Lorg/eclipse/jdt/internal/
- 遇到问题----org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/comp
- HttpServletResponse响应数据--setContentType
- 欢迎使用CSDN-markdown编辑器
- jquery 获取图片的宽高
- GitHub 提交提示错误
- 文章标题
- Maven中使用tomcat:run出现错误org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
- margin用法
- 支持触摸屏的响应式jQuery旋转木马插件--Owl Carousel
- 使用strtus2框架的json插件来完成ajax操作
- 高通AF驱动配置
- MaxCompute2.0助力众安保险高速成长
- Centos7安装postgresql
- Android: Kotlin 材料设计入门
- 160个练手CrackMe-016