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

来源:互联网 发布:海文网络计划软件教程 编辑:程序博客网 时间:2024/06/05 10:31
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>



阅读全文
0 0