java.lang.ArrayIndexOutOfBoundsException: 24444 Bertha 。 2022-07-15 16:55 129阅读 0赞 使用jetty运行程序的时候,出现这个错误 java.lang.ArrayIndexOutOfBoundsException: 24444 at org.objectweb.asm.ClassReader.<init>(Unknown Source) at org.objectweb.asm.ClassReader.<init>(Unknown Source) at org.objectweb.asm.ClassReader.<init>(Unknown Source) at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:898) at org.eclipse.jetty.annotations.AnnotationParser$2.processEntry(AnnotationParser.java:857) at org.eclipse.jetty.webapp.JarScanner.matched(JarScanner.java:161) at org.eclipse.jetty.util.PatternMatcher.matchPatterns(PatternMatcher.java:100) at org.eclipse.jetty.util.PatternMatcher.match(PatternMatcher.java:82) at org.eclipse.jetty.webapp.JarScanner.scan(JarScanner.java:84) at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:869) at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:884) at org.eclipse.jetty.annotations.AnnotationConfiguration.parseWebInfLib(AnnotationConfiguration.java:422) at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:120) at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:468) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1237) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494) at org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:298) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) ........ 方法一: 出现这个错误是因为jetty的版本问题,把jetty升级9.3.6.v20151106,把maven升级到3.3.9。就可以了。 方法二: 在pom.xml文件中增加了下面 <!--jetty插件--> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>8.1.16.v20140903</version> <configuration> <stopKey>stop</stopKey> <stopPort>9999</stopPort> <!--热部署的时间间隔--> <scanIntervalSeconds>1</scanIntervalSeconds> <contextXml>${project.basedir}/src/main/resources/jetty-context.xml</contextXml> <webApp> <contextPath>/</contextPath> </webApp> <connectors> <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector"> <port>80</port> <maxIdleTime>60000</maxIdleTime> </connector> </connectors> </configuration> </plugin> 增加/src/main/resources/jetty-context.xml文件 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> <Configure class="org.eclipse.jetty.webapp.WebAppContext"> <Call name="setAttribute"><Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg> <Arg>.*/.*jsp-api-[^/]\.jar$|./.*jsp-[^/]\.jar$|./.*taglibs[^/]*\.jar$</Arg> </Call> </Configure>
相关 java.lang.ArrayIndexOutOfBoundsException: 24444 使用jetty运行程序的时候,出现这个错误 java.lang.ArrayIndexOutOfBoundsException: 24444 at or Bertha 。/ 2022年07月15日 16:55/ 0 赞/ 130 阅读
还没有评论,来说两句吧...