Am 09.10.2014 um 23:05 schrieb Joe Carlyon:
In JMeter version 2.11 r1554548 I'm getting an error when parsing text that contains an opening brace. Code is as follows:foo = vars.get("ORIGIN"); //${TEST} log.info(errorAssertion ="\\W\\w " + foo); The error log shows this: 2014/10/09 15:55:38 ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: ``foo = vars.get("ORIGIN"); //${TEST} log.info(errorAssertion ="\W\w " + foo);'' Token Parsing Error: Lexical error at line 3, column 28. Encountered: "W" (87), after : "\"\\" 2014/10/09 15:55:38 WARN - jmeter.protocol.java.sampler.BeanShellSampler: org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: ``foo = vars.get("ORIGIN"); //${TEST} log.info(errorAssertion ="\W\w " + foo);'' Token Parsing Error: Lexical error at line 3, column 28. Encountered: "W" (87), after : "\"\\" This does *not* happen when line 2 is changed to look like the following: //$} Is this a known issue? I haven't had luck finding it with Google searches.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53534 You can get around the behaviour by escaping the $ with \$. Regards Felix
Thanks, Joe
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
