WARN:oejw.WebAppContext:Failed startup of context o.m.j.p.JettyWebAppContext……

WARN:oejw.WebAppContext:Failed startup of context o.m.j.p.JettyWebAppContext {/web,file:/E:/mycode/web_advancement/src/main/webapp/}, file:/E:/mycode/web_advancement/src/main/webapp/org.apache.commons.logging.LogConfigurationException: java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor32 cannot access its superclass sun.reflect.ConstructorAccessorImpl (Caused by java.lang.IllegalAccessError: class sun.reflect.Gen…… 

问题已经解决

      结果是Jetty-servier的版本与jetty-webapp的版本不兼容导致的,将两者的版本号修改一下就好了。

修改方法:

      首先,修改jetty-server是在pom.xml配置文件当中引入jetty的坐标中修改,例如,我的配置是(我的配置是9.2.2.v20140723):

 <build>
    <plugins>  
        <plugin>              
            <groupId>org.eclipse.jetty</groupId>  
            <artifactId>jetty-maven-plugin</artifactId>  
            <version>9.2.2.v20140723</version>     
        </plugin>  
    </plugins>  
  </build>

     其次,修改项目的总体配置web.xml的文件头,修改版本号(我的配置版本号是3.1):

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >         
<web-app version="3.1" metadata-complete="true"
		xmlns="http://xmlns.jcp.org/xml/ns/javaee"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
			http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
</web-app>

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值