解决jetty7.0.pre5启动时报ClassNotFoundException: javax.interceptor.InvocationContext异常的问题

2022-10-27,,,,

一.背景介绍:最近项目在使用maven命令行运行jetty服务器时出现ClassNotFoundException: javax.interceptor.InvocationContext异常

二.环境列举

  spring

  springMvc

  mybatis

  maven

  mysql

三.解决办法

  更换jetty插件的版本

   

  <plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.26</version>
<configuration>
<webApp>target/iris-0.0.1-SNAPSHOT.war</webApp>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8087</port>
</connector>
</connectors>
<stopKey>exit</stopKey>
<stopPort>8081</stopPort>
     <webAppSourceDirectory>src/main/webapp</webAppSourceDirectory>
<scanIntervalSeconds>2</scanIntervalSeconds>
     <contextPath>/test</contextPath>
</configuration>
</plugin>

注意:此处<version>6.1.26</version>节点如果不进行配置,就会默认使用7.0.pre5。

解决jetty7.0.pre5启动时报ClassNotFoundException: javax.interceptor.InvocationContext异常的问题的相关教程结束。

《解决jetty7.0.pre5启动时报ClassNotFoundException: javax.interceptor.InvocationContext异常的问题.doc》

下载本文的Word格式文档,以方便收藏与打印。