nGrinder WAR抛出异常

时间:2014-12-22 12:25:41

标签: java spring

我正在尝试使用nGrinder进行负载测试,但是当我尝试运行'ngrinder-controller.war'文件来设置服务器时,我在控制台中收到以下错误。

我在我的机器上使用Java 1.8.0_25版本。

    Nested in org.springframework.beans.factory.parsin 
     g.BeanDefinitionParsingException: Configuration problem: Failed to import bean d 
     efinitions from relative location [applicationContext-springdata.xml]|Offending 
resource: class path resource [applicationContext.xml]; nested exception is org. 
springframework.beans.factory.parsing.BeanDefinitionParsingException: Configurat 
ion problem: Failed to read candidate component class: file [C:\Users\Administra 
tor\.ngrinder\webapp\WEB-INF\classes\org\ngrinder\home\controller\HomeController 
$1.class]; nested exception is java.lang.ArrayIndexOutOfBoundsException: 51966|O 
ffending resource: class path resource [applicationContext-springdata.xml]; nest 
ed exception is java.lang.ArrayIndexOutOfBoundsException: 51966: 
java.lang.ArrayIndexOutOfBoundsException: 51966 
        at org.springframework.asm.ClassReader.readUTF8(Unknown Source) 
        at org.springframework.asm.ClassReader.readClass(Unknown Source) 
        at org.springframework.asm.ClassReader.accept(Unknown Source) 
        at org.springframework.asm.ClassReader.accept(Unknown Source) 
        at org.springframework.core.type.classreading.SimpleMetadataReader.<init 
>(SimpleMetadataReader.java:54) 
        at org.springframework.core.type.classreading.SimpleMetadataReaderFactor 
y.getMetadataReader(SimpleMetadataReaderFactory.java:80) 
        at org.springframework.core.type.classreading.CachingMetadataReaderFacto 
ry.getMetadataReader(CachingMetadataReaderFactory.java:101) 
        at org.springframework.core.type.classreading.SimpleMetadataReaderFactor 
y.getMetadataReader(SimpleMetadataReaderFactory.java:76) 
        at org.springframework.core.type.filter.AbstractTypeHierarchyTraversingF 
ilter.match(AbstractTypeHierarchyTraversingFilter.java:105) 
        at org.springframework.core.type.filter.AbstractTypeHierarchyTraversingF 
ilter.match(AbstractTypeHierarchyTraversingFilter.java:95) 
        at org.springframework.context.annotation.ClassPathScanningCandidateComp 
onentProvider.isCandidateComponent(ClassPathScanningCandidateComponentProvider.j 
ava:303) 
        at org.springframework.context.annotation.ClassPathScanningCandidateComp 
onentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvide 
r.java:237) 
        at org.springframework.data.repository.config.AbstractRepositoryConfigDe 
finitionParser.getRepositoryInterfacesForAutoConfig(AbstractRepositoryConfigDefi 
nitionParser.java:140) 
        at org.springframework.data.repository.config.AbstractRepositoryConfigDe 
finitionParser.doAutoConfiguration(AbstractRepositoryConfigDefinitionParser.java 
:116) 
        at org.springframework.data.repository.config.AbstractRepositoryConfigDe 
finitionParser.parse(AbstractRepositoryConfigDefinitionParser.java:87) 
        at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(N 
amespaceHandlerSupport.java:73) 
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa 
rseCustomElement(BeanDefinitionParserDelegate.java:1419) 
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa 
rseCustomElement(BeanDefinitionParserDelegate.java:1409) 
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe 
ader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:184) 
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe 
ader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140) 
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe 
ader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111) 
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registe 
rBeanDefinitions(XmlBeanDefinitionReader.java:493) 
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadB 
eanDefinitions(XmlBeanDefinitionReader.java:390) 
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea 
nDefinitions(XmlBeanDefinitionReader.java:334) 
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea 
nDefinitions(XmlBeanDefinitionReader.java:302) 
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe 
ader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:255) 
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe 
ader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:196) 
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe 
ader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:181) 
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe 
ader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140) 
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe 
ader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111) 
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registe 
rBeanDefinitions(XmlBeanDefinitionReader.java:493) 
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadB 
eanDefinitions(XmlBeanDefinitionReader.java:390) 
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea 
nDefinitions(XmlBeanDefinitionReader.java:334) 
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea 
nDefinitions(XmlBeanDefinitionReader.java:302) 
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReade 
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) 
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReade 
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209) 
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReade 
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180) 
        at org.springframework.web.context.support.XmlWebApplicationContext.load 
BeanDefinitions(XmlWebApplicationContext.java:125) 
        at org.springframework.web.context.support.XmlWebApplicationContext.load 
BeanDefinitions(XmlWebApplicationContext.java:94) 
        at org.springframework.context.support.AbstractRefreshableApplicationCon 
text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131) 
        at org.springframework.context.support.AbstractApplicationContext.obtain 
FreshBeanFactory(AbstractApplicationContext.java:522) 
        at org.springframework.context.support.AbstractApplicationContext.refres 
h(AbstractApplicationContext.java:436) 
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebA 
pplicationContext(ContextLoader.java:384) 
        at org.springframework.web.context.ContextLoader.initWebApplicationConte 
xt(ContextLoader.java:283) 
        at org.springframework.web.context.ContextLoaderListener.contextInitiali 
zed(ContextLoaderListener.java:111) 
        at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler. 
java:548) 
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) 
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.jav 
a:1272) 
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java: 
517) 
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:489 
) 
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 
50) 
        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java: 
130) 
        at org.mortbay.jetty.Server.doStart(Server.java:224) 
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java: 
50) 
        at org.ngrinder.NGrinderControllerStarter.run(NGrinderControllerStarter. 
java:235) 
        at org.ngrinder.NGrinderControllerStarter.main(NGrinderControllerStarter 
.java:307) 
2014-07-11 02:07:31.314:INFO::Started SocketConnector@0.0.0.0:5050

2 个答案:

答案 0 :(得分:0)

当使用注释方法时,我在java 1.8_25上遇到了与spring-context 3.0.5版相同的问题()

我将spring的版本更改为4.1.4,现在工作正常

答案 1 :(得分:0)

当前的ngrinder 3.3不支持java 1.8。 ngrinder 3.4将支持Java 1.8。

我是nGrinder的作者。