when ngrinder3.4 deployed under tomcat and validate the script, it shows the error "unexpected token: &"

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

when ngrinder3.4 deployed under tomcat and validate the script, it shows the error "unexpected token: &"

taizione
BTW, when I run ngrinder3.4 standalone, it works well, only bad under tomcat

Error log:


016-12-22 15:39:31,615 INFO  The Grinder version 3.9.1
2016-12-22 15:39:31,622 INFO  Java(TM) SE Runtime Environment 1.7.0_21-b11: Java HotSpot(TM) 64-Bit Server VM (23.21-b01, mixed mode) on Windows 7 amd64 6.1
2016-12-22 15:39:31,628 INFO  time zone is CST (+0800)
2016-12-22 15:39:31,745 INFO  worker process 0 of agent number 0
2016-12-22 15:39:31,776 INFO  Instrumentation agents: byte code transforming instrumenter for Java; byte code transforming instrumenter for Java
2016-12-22 15:39:32,137 ERROR Script error - Error while initialize test runner
net.grinder.engine.common.EngineException: Error while initialize test runner
        at net.grinder.scriptengine.groovy.GroovyScriptEngine.<init>(GroovyScriptEngine.java:71) ~[ngrinder-groovy-3.4.jar:na]
        at net.grinder.scriptengine.groovy.GroovyScriptEngineService.createScriptEngine(GroovyScriptEngineService.java:109) ~[ngrinder-groovy-3.4.jar:na]
        at net.grinder.engine.process.ScriptEngineContainer.getScriptEngine(ScriptEngineContainer.java:105) ~[grinder-core-3.9.1.jar:na]
        at net.grinder.engine.process.GrinderProcess.run(GrinderProcess.java:330) ~[ngrinder-runtime-3.4.jar:na]
        at net.grinder.engine.process.WorkerProcessEntryPoint.run(WorkerProcessEntryPoint.java:87) [grinder-core-3.9.1.jar:na]
        at net.grinder.engine.process.WorkerProcessEntryPoint.main(WorkerProcessEntryPoint.java:60) [grinder-core-3.9.1.jar:na]
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
${NGRINDER_HOME}\script\admin\test.groovy: 46: unexpected token: & @ line 46, column 23.
    test = new GTest(1, "www.baidu.com")
                         ^

1 error

        at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:309) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:149) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:119) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:131) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:359) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:142) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:108) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:236) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:162) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:912) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:574) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:550) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:527) ~[groovy-all-2.2.1.jar:2.2.1]
        at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:279) ~[groovy-all-2.2.1.jar:2.2.1]
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:258) ~[groovy-all-2.2.1.jar:2.2.1]
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:244) ~[groovy-all-2.2.1.jar:2.2.1]
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:185) ~[groovy-all-2.2.1.jar:2.2.1]
        at net.grinder.scriptengine.groovy.GroovyScriptEngine.<init>(GroovyScriptEngine.java:62) ~[ngrinder-groovy-3.4.jar:na]
        ... 5 common frames omitted


2016-12-22 15:39:32,139 ERROR worker-bootstrap: Error running worker process
net.grinder.engine.common.EngineException: Error while initialize test runner
        at net.grinder.scriptengine.groovy.GroovyScriptEngine.<init>(GroovyScriptEngine.java:71) ~[ngrinder-groovy-3.4.jar:na]
        at net.grinder.scriptengine.groovy.GroovyScriptEngineService.createScriptEngine(GroovyScriptEngineService.java:109) ~[ngrinder-groovy-3.4.jar:na]
        at net.grinder.engine.process.ScriptEngineContainer.getScriptEngine(ScriptEngineContainer.java:105) ~[grinder-core-3.9.1.jar:na]
        at net.grinder.engine.process.GrinderProcess.run(GrinderProcess.java:330) ~[ngrinder-runtime-3.4.jar:na]
        at net.grinder.engine.process.WorkerProcessEntryPoint.run(WorkerProcessEntryPoint.java:87) [grinder-core-3.9.1.jar:na]
        at net.grinder.engine.process.WorkerProcessEntryPoint.main(WorkerProcessEntryPoint.java:60) [grinder-core-3.9.1.jar:na]
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
${NGRINDER_HOME}\script\admin\test.groovy: 46: unexpected token: & @ line 46, column 23.
    test = new GTest(1, "www.baidu.com")
                         ^

1 error

        at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:309) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:149) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:119) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:131) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:359) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:142) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:108) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:236) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:162) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:912) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:574) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:550) ~[groovy-all-2.2.1.jar:2.2.1]
        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:527) ~[groovy-all-2.2.1.jar:2.2.1]
        at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:279) ~[groovy-all-2.2.1.jar:2.2.1]
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:258) ~[groovy-all-2.2.1.jar:2.2.1]
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:244) ~[groovy-all-2.2.1.jar:2.2.1]
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:185) ~[groovy-all-2.2.1.jar:2.2.1]
        at net.grinder.scriptengine.groovy.GroovyScriptEngine.<init>(GroovyScriptEngine.java:62) ~[ngrinder-groovy-3.4.jar:na]
        ... 5 common frames omitted
+
Reply | Threaded
Open this post in threaded view
|

Re: when ngrinder3.4 deployed under tomcat and validate the script, it shows the error "unexpected token: &"

taizione