You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2017/09/25 05:58:21 UTC

[Bug 61561] New: ${__RandomDate(,,,,)} is throwing exception

https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

            Bug ID: 61561
           Summary: ${__RandomDate(,,,,)} is throwing exception
           Product: JMeter
           Version: 3.3
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: orimarko@gmail.com
  Target Milestone: ---

I opened the Function Helper and tried the new function __RandomDate, Click
Generate and got an error (other functions are working)

2017-09-25 08:44:30,112 ERROR o.a.j.f.RandomDate: Failed to parse the date ''
to shift with formatter
'Value(YearOfEra,4,19,EXCEEDS_PAD)'-'Value(MonthOfYear,2)'-'Value(DayOfMonth,2)java.time.format.DateTimeFormatterBuilder$DefaultValueParser@6426866cjava.time.format.DateTimeFormatterBuilder$DefaultValueParser@4b46653bjava.time.format.DateTimeFormatterBuilder$DefaultValueParser@108462fd'
java.time.format.DateTimeParseException: Text '' could not be parsed at index 0
    at java.time.format.DateTimeFormatter.parseResolved0(Unknown Source)
~[?:1.8.0_144]
    at java.time.format.DateTimeFormatter.parse(Unknown Source) ~[?:1.8.0_144]
    at java.time.LocalDate.parse(Unknown Source) ~[?:1.8.0_144]
    at org.apache.jmeter.functions.RandomDate.execute(RandomDate.java:189)
[ApacheJMeter_functions.jar:3.3 r1808647]
    at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:137)
[ApacheJMeter_core.jar:3.3 r1808647]
    at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:112)
[ApacheJMeter_core.jar:3.3 r1808647]
    at
org.apache.jmeter.functions.gui.FunctionHelper.actionPerformed(FunctionHelper.java:181)
[ApacheJMeter_core.jar:3.3 r1808647]
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
[?:1.8.0_144]
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
[?:1.8.0_144]
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
[?:1.8.0_144]
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source) [?:1.8.0_144]
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
[?:1.8.0_144]
    at java.awt.Component.processMouseEvent(Unknown Source) [?:1.8.0_144]
    at javax.swing.JComponent.processMouseEvent(Unknown Source) [?:1.8.0_144]
    at java.awt.Component.processEvent(Unknown Source) [?:1.8.0_144]
    at java.awt.Container.processEvent(Unknown Source) [?:1.8.0_144]
    at java.awt.Component.dispatchEventImpl(Unknown Source) [?:1.8.0_144]
    at java.awt.Container.dispatchEventImpl(Unknown Source) [?:1.8.0_144]
    at java.awt.Component.dispatchEvent(Unknown Source) [?:1.8.0_144]
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
[?:1.8.0_144]
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
[?:1.8.0_144]
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
[?:1.8.0_144]
    at java.awt.Container.dispatchEventImpl(Unknown Source) [?:1.8.0_144]
    at java.awt.Window.dispatchEventImpl(Unknown Source) [?:1.8.0_144]
    at java.awt.Component.dispatchEvent(Unknown Source) [?:1.8.0_144]
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [?:1.8.0_144]
    at java.awt.EventQueue.access$500(Unknown Source) [?:1.8.0_144]
    at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_144]
    at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_144]
    at java.security.AccessController.doPrivileged(Native Method)
~[?:1.8.0_144]
    at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
Source) [?:1.8.0_144]
    at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
Source) [?:1.8.0_144]
    at java.awt.EventQueue$4.run(Unknown Source) [?:1.8.0_144]
    at java.awt.EventQueue$4.run(Unknown Source) [?:1.8.0_144]
    at java.security.AccessController.doPrivileged(Native Method)
~[?:1.8.0_144]
    at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
Source) [?:1.8.0_144]
    at java.awt.EventQueue.dispatchEvent(Unknown Source) [?:1.8.0_144]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
[?:1.8.0_144]
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
[?:1.8.0_144]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
[?:1.8.0_144]
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_144]
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_144]
    at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_144]
2017-09-25 08:44:30,113 ERROR o.a.j.JMeter: Uncaught exception: 
java.lang.IllegalArgumentException: bound must be greater than origin
    at java.util.concurrent.ThreadLocalRandom.nextLong(Unknown Source)
~[?:1.8.0_144]
    at org.apache.jmeter.functions.RandomDate.execute(RandomDate.java:196)
~[ApacheJMeter_functions.jar:3.3 r1808647]
    at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:137)
~[ApacheJMeter_core.jar:3.3 r1808647]
    at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:112)
~[ApacheJMeter_core.jar:3.3 r1808647]
    at
org.apache.jmeter.functions.gui.FunctionHelper.actionPerformed(FunctionHelper.java:181)
~[ApacheJMeter_core.jar:3.3 r1808647]
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
~[?:1.8.0_144]
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
~[?:1.8.0_144]
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
~[?:1.8.0_144]
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source) ~[?:1.8.0_144]
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
~[?:1.8.0_144]
    at java.awt.Component.processMouseEvent(Unknown Source) ~[?:1.8.0_144]
    at javax.swing.JComponent.processMouseEvent(Unknown Source) ~[?:1.8.0_144]
    at java.awt.Component.processEvent(Unknown Source) ~[?:1.8.0_144]
    at java.awt.Container.processEvent(Unknown Source) ~[?:1.8.0_144]
    at java.awt.Component.dispatchEventImpl(Unknown Source) ~[?:1.8.0_144]
    at java.awt.Container.dispatchEventImpl(Unknown Source) ~[?:1.8.0_144]
    at java.awt.Component.dispatchEvent(Unknown Source) ~[?:1.8.0_144]
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
~[?:1.8.0_144]
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
~[?:1.8.0_144]
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
~[?:1.8.0_144]
    at java.awt.Container.dispatchEventImpl(Unknown Source) ~[?:1.8.0_144]
    at java.awt.Window.dispatchEventImpl(Unknown Source) ~[?:1.8.0_144]
    at java.awt.Component.dispatchEvent(Unknown Source) ~[?:1.8.0_144]
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source) ~[?:1.8.0_144]
    at java.awt.EventQueue.access$500(Unknown Source) ~[?:1.8.0_144]
    at java.awt.EventQueue$3.run(Unknown Source) ~[?:1.8.0_144]
    at java.awt.EventQueue$3.run(Unknown Source) ~[?:1.8.0_144]
    at java.security.AccessController.doPrivileged(Native Method)
~[?:1.8.0_144]
    at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
Source) ~[?:1.8.0_144]
    at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
Source) ~[?:1.8.0_144]
    at java.awt.EventQueue$4.run(Unknown Source) ~[?:1.8.0_144]
    at java.awt.EventQueue$4.run(Unknown Source) ~[?:1.8.0_144]
    at java.security.AccessController.doPrivileged(Native Method)
~[?:1.8.0_144]
    at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
Source) ~[?:1.8.0_144]
    at java.awt.EventQueue.dispatchEvent(Unknown Source) ~[?:1.8.0_144]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
[?:1.8.0_144]
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
[?:1.8.0_144]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
[?:1.8.0_144]
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_144]
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_144]
    at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_144]

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61561] ${__RandomDate(,,,,)} is throwing exception

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

Antonio Gomes Rodrigues <ra...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Antonio Gomes Rodrigues <ra...@gmail.com> ---
Hi,

Can you provide us the input to the function

Antonio

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61561] Function helper dialog should display exception in result

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

--- Comment #13 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Author: pmouawad
Date: Mon Sep 25 19:08:24 2017
New Revision: 1809660

URL: http://svn.apache.org/viewvc?rev=1809660&view=rev
Log:
Bug 61561 - Function helper dialog should display exception in result
Make "Copy and paste function string" read only to avoid confusion
Bugzilla Id: 61561

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/functions/gui/FunctionHelper.java
    jmeter/trunk/src/jorphan/org/apache/jorphan/gui/JLabeledTextField.java

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61561] ${__RandomDate(,,,,)} is throwing exception

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

orimarko <or...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |WORKSFORME

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61561] ${__RandomDate(,,,,)} is throwing exception

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

--- Comment #3 from Antonio Gomes Rodrigues <ra...@gmail.com> ---
Ok

I will test it asap and modify the log (I have make a bad copy/paste)

But in my opinion, the error is that the attribute End date is mandatory

Can you try with a End date in the futur?

Antonio

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61561] Function helper dialog should display exception in result

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
            Summary|${__RandomDate(,,,,)} is    |Function helper dialog
                   |throwing exception          |should display exception in
                   |                            |result

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61561] ${__RandomDate(,,,,)} is throwing exception

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

--- Comment #2 from orimarko <or...@gmail.com> ---
(As Generate works) Function is called without any parameters:
${__RandomDate(,,,,)}

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61561] ${__RandomDate(,,,,)} is throwing exception

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #11 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
(In reply to orimarko from comment #10)
> I expect a button (Generate or new one) to execute the function inside the
> input (after Copy and paste function string),So that I can add parameters
> (in this case mandatory) and then submit function thus get a valid response
> (and not exception)
I am not sure to follow you, can you make a screenshot of what you would expect
and what you are currently doing ?

The logic is that you put the parameters in the table of parameters and click
Generate which will put the syntax in the field at left of Generate and the
result in the text area at the bottom.

Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61561] ${__RandomDate(,,,,)} is throwing exception

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

--- Comment #8 from orimarko <or...@gmail.com> ---
Also I notice difference from JMeter 3.2 Generate ${__Random(,,)} throws
exception only in JMeter 3.3

2017-09-25 13:53:04,864 ERROR o.a.j.JMeter: Uncaught exception: 
java.lang.NumberFormatException: For input string: ""
        at java.lang.NumberFormatException.forInputString(Unknown Source)
~[?:1.8.0_144]
        at java.lang.Long.parseLong(Unknown Source) ~[?:1.8.0_144]
        at java.lang.Long.parseLong(Unknown Source) ~[?:1.8.0_144]
        at org.apache.jmeter.functions.Random.execute(Random.java:64)
~[ApacheJMeter_functions.jar:3.3 r1808647]
        at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:137)
~[ApacheJMeter_core.jar:3.3 r1808647]
        at
org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:112)
~[ApacheJMeter_core.jar:3.3 r1808647]
        at
org.apache.jmeter.functions.gui.FunctionHelper.actionPerformed(FunctionHelper.java:181)
~[ApacheJMeter_core.jar:3.3 r1808647]
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
~[?:1.8.0_144]
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
~[?:1.8.0_144]
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
~[?:1.8.0_144]
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
~[?:1.8.0_144]
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
Source) ~[?:1.8.0_144]
        at java.awt.Component.processMouseEvent(Unknown Source) ~[?:1.8.0_144]
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
~[?:1.8.0_144]
        at java.awt.Component.processEvent(Unknown Source) ~[?:1.8.0_144]
        at java.awt.Container.processEvent(Unknown Source) ~[?:1.8.0_144]
        at java.awt.Component.dispatchEventImpl(Unknown Source) ~[?:1.8.0_144]
        at java.awt.Container.dispatchEventImpl(Unknown Source) ~[?:1.8.0_144]
        at java.awt.Component.dispatchEvent(Unknown Source) ~[?:1.8.0_144]
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
~[?:1.8.0_144]
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
~[?:1.8.0_144]
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
~[?:1.8.0_144]
        at java.awt.Container.dispatchEventImpl(Unknown Source) ~[?:1.8.0_144]
        at java.awt.Window.dispatchEventImpl(Unknown Source) ~[?:1.8.0_144]
        at java.awt.Component.dispatchEvent(Unknown Source) ~[?:1.8.0_144]
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source) ~[?:1.8.0_144]
        at java.awt.EventQueue.access$500(Unknown Source) ~[?:1.8.0_144]
        at java.awt.EventQueue$3.run(Unknown Source) ~[?:1.8.0_144]
        at java.awt.EventQueue$3.run(Unknown Source) ~[?:1.8.0_144]
        at java.security.AccessController.doPrivileged(Native Method)
~[?:1.8.0_144]
        at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
Source) ~[?:1.8.0_144]
        at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
Source) ~[?:1.8.0_144]
        at java.awt.EventQueue$4.run(Unknown Source) ~[?:1.8.0_144]
        at java.awt.EventQueue$4.run(Unknown Source) ~[?:1.8.0_144]
        at java.security.AccessController.doPrivileged(Native Method)
~[?:1.8.0_144]
        at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown
Source) ~[?:1.8.0_144]
        at java.awt.EventQueue.dispatchEvent(Unknown Source) ~[?:1.8.0_144]
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
[?:1.8.0_144]
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
[?:1.8.0_144]
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
[?:1.8.0_144]
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[?:1.8.0_144]
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[?:1.8.0_144]
        at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_144]

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61561] ${__RandomDate(,,,,)} is throwing exception

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

--- Comment #7 from orimarko <or...@gmail.com> ---
Created attachment 35371
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35371&action=edit
jmeter.log error

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61561] ${__RandomDate(,,,,)} is throwing exception

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

--- Comment #4 from orimarko <or...@gmail.com> ---
Click Generate ignores my input and calls the function without any parameters

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61561] ${__RandomDate(,,,,)} is throwing exception

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

--- Comment #5 from Antonio Gomes Rodrigues <ra...@gmail.com> ---
Can you attach jmeter.log and a screenshot of the function Helper

${__RandomDate(,,,,)} can't work because End date is needed (I will fix the log
message to be more useful)

But I don't reproduce "Click Generate ignores my input and calls the function
without any parameters"

Thank
Antonio

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61561] ${__RandomDate(,,,,)} is throwing exception

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

--- Comment #10 from orimarko <or...@gmail.com> ---
I expect a button (Generate or new one) to execute the function inside the
input (after Copy and paste function string),So that I can add parameters (in
this case mandatory) and then submit function thus get a valid response (and
not exception)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61561] ${__RandomDate(,,,,)} is throwing exception

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #9 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
For me, there is no bug except maybe unclear error message and the fact that
error should appear in preview , not only in logs.

Since 3.3, there is a "preview" feature which shows result of calling a
function.
As mandatory parameters are not entered, function fails.

What would you expect here ?

Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61561] ${__RandomDate(,,,,)} is throwing exception

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

--- Comment #6 from orimarko <or...@gmail.com> ---
Created attachment 35370
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35370&action=edit
RandomDate function

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61561] Function helper dialog should display exception in result

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61561

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WORKSFORME                  |FIXED
           Hardware|PC                          |All

--- Comment #12 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Author: pmouawad
Date: Mon Sep 25 11:38:06 2017
New Revision: 1809605

URL: http://svn.apache.org/viewvc?rev=1809605&view=rev
Log:
Bug 61561 - Function helper dialog should display exception in result
Bugzilla Id: 61561

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/functions/gui/FunctionHelper.java
    jmeter/trunk/xdocs/changes.xml

-- 
You are receiving this mail because:
You are the assignee for the bug.