问题描述
- maven项目启动jetty-maven-plugin报错
-
刚接触maven项目,按照maven实战的说明,使用jetty plugin进行部署,运行jetty:run命令的时候,控制台出现如下异常信息:
2015-05-06 13:42:08.082: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.GeneratedConstructorAccessor
32 cannot access its superclass sun.reflect.ConstructorAccessorImpl (Caused by java.lang.IllegalAccessError: class sun.reflect.Gen
eratedConstructorAccessor32 cannot access its superclass sun.reflect.ConstructorAccessorImpl)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:571)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:292)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:269)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:657)
at org.springframework.core.env.PropertySource.(PropertySource.java:58)
at org.springframework.core.env.PropertySource$StubPropertySource.(PropertySource.java:220)
at org.springframework.core.env.PropertySource$ComparisonPropertySource.(PropertySource.java:243)
at org.springframework.core.env.PropertySource.named(PropertySource.java:200)不知道哪位以前解决过类似的问题,请不吝赐教
解决方案
问题已解决,发现是jetty-server的版本与jetty-webapp的版本不一致,将jetty-webapp,jetty-jsp,jetty-server等修改一致后即可正常启动
解决方案二:
怎么修改jetty-server的版本与jetty-webapp的版本?
时间: 2024-11-17 01:30:10