You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by testerinCO <cm...@comcast.net> on 2011/11/22 12:36:17 UTC

Changing the property of the __time function for YMDHMD

Hello

I modified the time.YMDHMD property to the following:
time.YMDHMD="yyyy-MM-dd'T'HH:mm:ss.SSSZ"

I tried different character escape options, but I always get the same error
when trying to run it.

Base: Cannot find .className property for htmlParser, using default 
2011/11/22 04:26:12 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase:
Parser for text/html is  
2011/11/22 04:26:12 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase:
Parser for application/xhtml+xml is  
2011/11/22 04:26:12 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase:
Parser for application/xml is  
2011/11/22 04:26:12 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase:
Parser for text/xml is  
2011/11/22 04:26:12 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase:
Parser for text/vnd.wap.wml is
org.apache.jmeter.protocol.http.parser.RegexpHTMLParser 
2011/11/22 04:26:13 INFO  - jmeter.gui.util.MenuFactory: Skipping
org.apache.jmeter.protocol.http.modifier.gui.ParamModifierGui 
2011/11/22 04:26:13 INFO  - jmeter.gui.util.MenuFactory: Skipping
org.apache.jmeter.protocol.http.modifier.gui.UserParameterModifierGui 
2011/11/22 04:26:13 INFO  - jmeter.samplers.SampleResult: Note: Sample
TimeStamps are END times 
2011/11/22 04:26:13 INFO  - jmeter.samplers.SampleResult:
sampleresult.default.encoding is set to ISO-8859-1 
2011/11/22 04:26:13 INFO  - jmeter.samplers.SampleResult:
sampleresult.useNanoTime=true 
2011/11/22 04:26:28 INFO  - jmeter.services.FileServer: Default
base='C:\jakarta-jmeter-2.5\jakarta-jmeter-2.5\bin' 
2011/11/22 04:26:28 INFO  - jmeter.gui.action.Load: Loading file:
C:\jakarta-jmeter-2.5\jakarta-jmeter-2.5\bin\testdate.jmx 
2011/11/22 04:26:28 INFO  - jmeter.services.FileServer: Set new base
'C:\jakarta-jmeter-2.5\jakarta-jmeter-2.5\bin' 
2011/11/22 04:26:28 INFO  - jmeter.save.SaveService: Testplan (JMX) version:
2.2. Testlog (JTL) version: 2.2 
2011/11/22 04:26:28 INFO  - jmeter.save.SaveService: Using SaveService
properties file encoding UTF-8 
2011/11/22 04:26:28 INFO  - jmeter.save.SaveService: Using SaveService
properties file version 1050447 
2011/11/22 04:26:28 INFO  - jmeter.save.SaveService: Using SaveService
properties version 2.1 
2011/11/22 04:26:28 INFO  - jmeter.save.SaveService: All converter versions
present and correct 
2011/11/22 04:26:29 INFO  - jmeter.services.FileServer: Set new
base='C:\jakarta-jmeter-2.5\jakarta-jmeter-2.5\bin' 
2011/11/22 04:26:31 INFO  - jmeter.engine.StandardJMeterEngine: Listeners
will be started after enabling running version 
2011/11/22 04:26:31 INFO  - jmeter.engine.StandardJMeterEngine: To revert to
the earlier behaviour, define jmeterengine.startlistenerslater=false 
2011/11/22 04:26:31 INFO  - jmeter.engine.StandardJMeterEngine: Running the
test! 
2011/11/22 04:26:31 ERROR - jmeter.engine.StandardJMeterEngine: Error
occurred compiling the tree: java.lang.IllegalArgumentException: Illegal
pattern character 'Y'
	at java.text.SimpleDateFormat.compile(Unknown Source)
	at java.text.SimpleDateFormat.initialize(Unknown Source)
	at java.text.SimpleDateFormat.<init>(Unknown Source)
	at java.text.SimpleDateFormat.<init>(Unknown Source)
	at org.apache.jmeter.functions.TimeFunction.execute(TimeFunction.java:87)
	at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:143)
	at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:116)
	at
org.apache.jmeter.testelement.property.FunctionProperty.getStringValue(FunctionProperty.java:90)
	at
org.apache.jmeter.testelement.AbstractTestElement.getPropertyAsString(AbstractTestElement.java:248)
	at org.apache.jmeter.config.Argument.getValue(Argument.java:115)
	at org.apache.jmeter.config.Arguments.getArgumentsAsMap(Arguments.java:93)
	at org.apache.jmeter.engine.PreCompiler.addNode(PreCompiler.java:93)
	at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:986)
	at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:987)
	at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:987)
	at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:969)
	at
org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:319)
	at java.lang.Thread.run(Unknown Source)

2011/11/22 04:28:23 INFO  - jmeter.services.FileServer: Set new
base='C:\jakarta-jmeter-2.5\jakarta-jmeter-2.5\bin' 
2011/11/22 04:28:23 INFO  - jmeter.engine.StandardJMeterEngine: Running the
test! 
2011/11/22 04:28:23 ERROR - jmeter.engine.StandardJMeterEngine: Error
occurred compiling the tree: java.lang.IllegalArgumentException: Illegal
pattern character 'Y'
	at java.text.SimpleDateFormat.compile(Unknown Source)
	at java.text.SimpleDateFormat.initialize(Unknown Source)
	at java.text.SimpleDateFormat.<init>(Unknown Source)
	at java.text.SimpleDateFormat.<init>(Unknown Source)
	at org.apache.jmeter.functions.TimeFunction.execute(TimeFunction.java:87)
	at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:143)
	at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:116)
	at
org.apache.jmeter.testelement.property.FunctionProperty.getStringValue(FunctionProperty.java:90)
	at
org.apache.jmeter.testelement.AbstractTestElement.getPropertyAsString(AbstractTestElement.java:248)
	at org.apache.jmeter.config.Argument.getValue(Argument.java:115)
	at org.apache.jmeter.config.Arguments.getArgumentsAsMap(Arguments.java:93)
	at org.apache.jmeter.engine.PreCompiler.addNode(PreCompiler.java:93)
	at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:986)
	at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:987)
	at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:987)
	at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:969)
	at
org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:319)
	at java.lang.Thread.run(Unknown Source)

Any help is appreciated.

--
View this message in context: http://jmeter.512774.n5.nabble.com/Changing-the-property-of-the-time-function-for-YMDHMD-tp5013291p5013291.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: Changing the property of the __time function for YMDHMD

Posted by testerinCO <cm...@comcast.net>.
Thank you.  I got it to work.

--
View this message in context: http://jmeter.512774.n5.nabble.com/Changing-the-property-of-the-time-function-for-YMDHMD-tp5013291p5013644.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: Changing the property of the __time function for YMDHMD

Posted by sebb <se...@gmail.com>.
On 22 November 2011 11:36, testerinCO <cm...@comcast.net> wrote:
> Hello
>
> I modified the time.YMDHMD property to the following:
> time.YMDHMD="yyyy-MM-dd'T'HH:mm:ss.SSSZ"

Unfortunately you've found a mistake in the jmeter.properties file.

The shorthand name is YMDHMS, not YMDHMD - see the __time function docs:

http://jmeter.apache.org/usermanual/functions.html#__time

The __time() function does not recognise YMDHMD as a shorthand, so
passes it to the formatter, and 'Y' is invalid.

> I tried different character escape options, but I always get the same error
> when trying to run it.

Note that you don't have to override the property; you can just
provide the format string, for example:

${__time(yyyy-MM-dd'T'HH:mm:ss.SSSZ)}

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org