java.lang.StringIndexOutOfBoundsException: String index out of range in ApacheJMeter_core.jar:5.3

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

java.lang.StringIndexOutOfBoundsException: String index out of range in ApacheJMeter_core.jar:5.3

niraj
Hi All,

I am getting below error in JMeter. When I run the test with more than 10
users, Basically I am running a few Websocket requests using the WebSocket
plugin (WebSocket Samplers by Peter Doornbosch). Any suggestions on how to
fix this?

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source) ~[?:1.8.0_261]
at
org.apache.jmeter.samplers.SampleResult.getSampleLabel(SampleResult.java:586)
~[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.visualizers.StatVisualizer.add(StatVisualizer.java:118)
~[ApacheJMeter_components.jar:5.3]
at
org.apache.jmeter.reporters.ResultCollector.sendToVisualizer(ResultCollector.java:570)
~[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.reporters.ResultCollector.sampleOccurred(ResultCollector.java:547)
~[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:58)
[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.control.TransactionController.notifyListeners(TransactionController.java:296)
[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:223)
[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.control.TransactionController.nextIsAController(TransactionController.java:173)
[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.control.GenericController.next(GenericController.java:174)
[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:205)
[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:221)
[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.control.GenericController.next(GenericController.java:174)
[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.control.LoopController.next(LoopController.java:134)
[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.control.GenericController.next(GenericController.java:174)
[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.control.LoopController.next(LoopController.java:134)
[ApacheJMeter_core.jar:5.3]
at
org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:91)
[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:291)
[ApacheJMeter_core.jar:5.3]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]

Thanks,
Niraj
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.StringIndexOutOfBoundsException: String index out of range in ApacheJMeter_core.jar:5.3

Mariusz W
Hi,
Can you try uncheck "include group name in label" in  Aggregate Report and
recheck?

Mariusz

On Fri, 18 Sep 2020 at 14:48, Niraj <[hidden email]> wrote:

> Hi All,
>
> I am getting below error in JMeter. When I run the test with more than 10
> users, Basically I am running a few Websocket requests using the WebSocket
> plugin (WebSocket Samplers by Peter Doornbosch). Any suggestions on how to
> fix this?
>
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> at java.lang.String.substring(Unknown Source) ~[?:1.8.0_261]
> at
>
> org.apache.jmeter.samplers.SampleResult.getSampleLabel(SampleResult.java:586)
> ~[ApacheJMeter_core.jar:5.3]
> at
> org.apache.jmeter.visualizers.StatVisualizer.add(StatVisualizer.java:118)
> ~[ApacheJMeter_components.jar:5.3]
> at
>
> org.apache.jmeter.reporters.ResultCollector.sendToVisualizer(ResultCollector.java:570)
> ~[ApacheJMeter_core.jar:5.3]
> at
>
> org.apache.jmeter.reporters.ResultCollector.sampleOccurred(ResultCollector.java:547)
> ~[ApacheJMeter_core.jar:5.3]
> at
>
> org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:58)
> [ApacheJMeter_core.jar:5.3]
> at
>
> org.apache.jmeter.control.TransactionController.notifyListeners(TransactionController.java:296)
> [ApacheJMeter_core.jar:5.3]
> at
>
> org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:223)
> [ApacheJMeter_core.jar:5.3]
> at
>
> org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
> [ApacheJMeter_core.jar:5.3]
> at
>
> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
> [ApacheJMeter_core.jar:5.3]
> at
>
> org.apache.jmeter.control.TransactionController.nextIsAController(TransactionController.java:173)
> [ApacheJMeter_core.jar:5.3]
> at
>
> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
> [ApacheJMeter_core.jar:5.3]
> at
>
> org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:205)
> [ApacheJMeter_core.jar:5.3]
> at
>
> org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
> [ApacheJMeter_core.jar:5.3]
> at
>
> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:221)
> [ApacheJMeter_core.jar:5.3]
> at
>
> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
> [ApacheJMeter_core.jar:5.3]
> at org.apache.jmeter.control.LoopController.next(LoopController.java:134)
> [ApacheJMeter_core.jar:5.3]
> at
>
> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
> [ApacheJMeter_core.jar:5.3]
> at
>
> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
> [ApacheJMeter_core.jar:5.3]
> at org.apache.jmeter.control.LoopController.next(LoopController.java:134)
> [ApacheJMeter_core.jar:5.3]
> at
>
> org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:91)
> [ApacheJMeter_core.jar:5.3]
> at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:291)
> [ApacheJMeter_core.jar:5.3]
> at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]
>
> Thanks,
> Niraj
>
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.StringIndexOutOfBoundsException: String index out of range in ApacheJMeter_core.jar:5.3

niraj
Perfect. It worked. Thanks Mariusz. Really Appreciated it.

On Fri, Sep 18, 2020 at 6:49 PM Mariusz W <[hidden email]> wrote:

> Hi,
> Can you try uncheck "include group name in label" in  Aggregate Report and
> recheck?
>
> Mariusz
>
> On Fri, 18 Sep 2020 at 14:48, Niraj <[hidden email]> wrote:
>
> > Hi All,
> >
> > I am getting below error in JMeter. When I run the test with more than 10
> > users, Basically I am running a few Websocket requests using the
> WebSocket
> > plugin (WebSocket Samplers by Peter Doornbosch). Any suggestions on how
> to
> > fix this?
> >
> > java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> > at java.lang.String.substring(Unknown Source) ~[?:1.8.0_261]
> > at
> >
> >
> org.apache.jmeter.samplers.SampleResult.getSampleLabel(SampleResult.java:586)
> > ~[ApacheJMeter_core.jar:5.3]
> > at
> > org.apache.jmeter.visualizers.StatVisualizer.add(StatVisualizer.java:118)
> > ~[ApacheJMeter_components.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.reporters.ResultCollector.sendToVisualizer(ResultCollector.java:570)
> > ~[ApacheJMeter_core.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.reporters.ResultCollector.sampleOccurred(ResultCollector.java:547)
> > ~[ApacheJMeter_core.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:58)
> > [ApacheJMeter_core.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.control.TransactionController.notifyListeners(TransactionController.java:296)
> > [ApacheJMeter_core.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:223)
> > [ApacheJMeter_core.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
> > [ApacheJMeter_core.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
> > [ApacheJMeter_core.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.control.TransactionController.nextIsAController(TransactionController.java:173)
> > [ApacheJMeter_core.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
> > [ApacheJMeter_core.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:205)
> > [ApacheJMeter_core.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
> > [ApacheJMeter_core.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:221)
> > [ApacheJMeter_core.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
> > [ApacheJMeter_core.jar:5.3]
> > at org.apache.jmeter.control.LoopController.next(LoopController.java:134)
> > [ApacheJMeter_core.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
> > [ApacheJMeter_core.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
> > [ApacheJMeter_core.jar:5.3]
> > at org.apache.jmeter.control.LoopController.next(LoopController.java:134)
> > [ApacheJMeter_core.jar:5.3]
> > at
> >
> >
> org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:91)
> > [ApacheJMeter_core.jar:5.3]
> > at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:291)
> > [ApacheJMeter_core.jar:5.3]
> > at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]
> >
> > Thanks,
> > Niraj
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.StringIndexOutOfBoundsException: String index out of range in ApacheJMeter_core.jar:5.3

Felix Schumacher

Am 18.09.20 um 15:39 schrieb Niraj:
> Perfect. It worked. Thanks Mariusz. Really Appreciated it.

Could you provide us a minimal test plan to reproduce the issue (even
knowing, that the workaround helped you)?

I think we shouldn't throw an exception in case the thread name is not
exactly like we thought it would be.

Thanks

 Felix

>
> On Fri, Sep 18, 2020 at 6:49 PM Mariusz W <[hidden email]> wrote:
>
>> Hi,
>> Can you try uncheck "include group name in label" in  Aggregate Report and
>> recheck?
>>
>> Mariusz
>>
>> On Fri, 18 Sep 2020 at 14:48, Niraj <[hidden email]> wrote:
>>
>>> Hi All,
>>>
>>> I am getting below error in JMeter. When I run the test with more than 10
>>> users, Basically I am running a few Websocket requests using the
>> WebSocket
>>> plugin (WebSocket Samplers by Peter Doornbosch). Any suggestions on how
>> to
>>> fix this?
>>>
>>> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>>> at java.lang.String.substring(Unknown Source) ~[?:1.8.0_261]
>>> at
>>>
>>>
>> org.apache.jmeter.samplers.SampleResult.getSampleLabel(SampleResult.java:586)
>>> ~[ApacheJMeter_core.jar:5.3]
>>> at
>>> org.apache.jmeter.visualizers.StatVisualizer.add(StatVisualizer.java:118)
>>> ~[ApacheJMeter_components.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.reporters.ResultCollector.sendToVisualizer(ResultCollector.java:570)
>>> ~[ApacheJMeter_core.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.reporters.ResultCollector.sampleOccurred(ResultCollector.java:547)
>>> ~[ApacheJMeter_core.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:58)
>>> [ApacheJMeter_core.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.control.TransactionController.notifyListeners(TransactionController.java:296)
>>> [ApacheJMeter_core.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:223)
>>> [ApacheJMeter_core.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
>>> [ApacheJMeter_core.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
>>> [ApacheJMeter_core.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.control.TransactionController.nextIsAController(TransactionController.java:173)
>>> [ApacheJMeter_core.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>>> [ApacheJMeter_core.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:205)
>>> [ApacheJMeter_core.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
>>> [ApacheJMeter_core.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:221)
>>> [ApacheJMeter_core.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>>> [ApacheJMeter_core.jar:5.3]
>>> at org.apache.jmeter.control.LoopController.next(LoopController.java:134)
>>> [ApacheJMeter_core.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
>>> [ApacheJMeter_core.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>>> [ApacheJMeter_core.jar:5.3]
>>> at org.apache.jmeter.control.LoopController.next(LoopController.java:134)
>>> [ApacheJMeter_core.jar:5.3]
>>> at
>>>
>>>
>> org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:91)
>>> [ApacheJMeter_core.jar:5.3]
>>> at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:291)
>>> [ApacheJMeter_core.jar:5.3]
>>> at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]
>>>
>>> Thanks,
>>> Niraj
>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: java.lang.StringIndexOutOfBoundsException: String index out of range in ApacheJMeter_core.jar:5.3

Mariusz W
Felix,
I think that problem may be connected with default threadName value in
SampleResult:
private String threadName = "";

and the way WebsocketSampler create sample result:
https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/master/src/main/java/eu/luminis/jmeter/wssampler/WebsocketSampler.java#lines-120

SampleResult result = new SampleResult();
result.setSampleLabel(getName());

and all this is connected with TransactionController.sampleOccured:
SampleResult sampleResult = se.getResult();
res.setThreadName(sampleResult.getThreadName()); // <- still ""

such a hypothesis...:)

Mariusz

On Fri, 18 Sep 2020 at 16:45, Felix Schumacher <
[hidden email]> wrote:

>
> Am 18.09.20 um 15:39 schrieb Niraj:
> > Perfect. It worked. Thanks Mariusz. Really Appreciated it.
>
> Could you provide us a minimal test plan to reproduce the issue (even
> knowing, that the workaround helped you)?
>
> I think we shouldn't throw an exception in case the thread name is not
> exactly like we thought it would be.
>
> Thanks
>
>  Felix
>
> >
> > On Fri, Sep 18, 2020 at 6:49 PM Mariusz W <[hidden email]> wrote:
> >
> >> Hi,
> >> Can you try uncheck "include group name in label" in  Aggregate Report
> and
> >> recheck?
> >>
> >> Mariusz
> >>
> >> On Fri, 18 Sep 2020 at 14:48, Niraj <[hidden email]> wrote:
> >>
> >>> Hi All,
> >>>
> >>> I am getting below error in JMeter. When I run the test with more than
> 10
> >>> users, Basically I am running a few Websocket requests using the
> >> WebSocket
> >>> plugin (WebSocket Samplers by Peter Doornbosch). Any suggestions on how
> >> to
> >>> fix this?
> >>>
> >>> java.lang.StringIndexOutOfBoundsException: String index out of range:
> -1
> >>> at java.lang.String.substring(Unknown Source) ~[?:1.8.0_261]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.samplers.SampleResult.getSampleLabel(SampleResult.java:586)
> >>> ~[ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> org.apache.jmeter.visualizers.StatVisualizer.add(StatVisualizer.java:118)
> >>> ~[ApacheJMeter_components.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.reporters.ResultCollector.sendToVisualizer(ResultCollector.java:570)
> >>> ~[ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.reporters.ResultCollector.sampleOccurred(ResultCollector.java:547)
> >>> ~[ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:58)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.control.TransactionController.notifyListeners(TransactionController.java:296)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:223)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.control.TransactionController.nextIsAController(TransactionController.java:173)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:205)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:221)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at
> org.apache.jmeter.control.LoopController.next(LoopController.java:134)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at
> org.apache.jmeter.control.LoopController.next(LoopController.java:134)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at
> >>>
> >>>
> >>
> org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:91)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:291)
> >>> [ApacheJMeter_core.jar:5.3]
> >>> at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]
> >>>
> >>> Thanks,
> >>> Niraj
> >>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.StringIndexOutOfBoundsException: String index out of range in ApacheJMeter_core.jar:5.3

Felix Schumacher

Am 18.09.20 um 19:27 schrieb Mariusz W:

> Felix,
> I think that problem may be connected with default threadName value in
> SampleResult:
> private String threadName = "";
>
> and the way WebsocketSampler create sample result:
> https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/master/src/main/java/eu/luminis/jmeter/wssampler/WebsocketSampler.java#lines-120
>
> SampleResult result = new SampleResult();
> result.setSampleLabel(getName());
>
> and all this is connected with TransactionController.sampleOccured:
> SampleResult sampleResult = se.getResult();
> res.setThreadName(sampleResult.getThreadName()); // <- still ""
>
> such a hypothesis...:)

Might be. I haven't looked into the sources of websocket sampler yet.
But I did setup a simple test with one websocket sampler and it did fill
in the thread name correctly.

I think it is OK to guard against a threadname without any space and use
the thread name completely in that case. I would like to see such a
case, though.

Felix

>
> Mariusz
>
> On Fri, 18 Sep 2020 at 16:45, Felix Schumacher <
> [hidden email]> wrote:
>
>> Am 18.09.20 um 15:39 schrieb Niraj:
>>> Perfect. It worked. Thanks Mariusz. Really Appreciated it.
>> Could you provide us a minimal test plan to reproduce the issue (even
>> knowing, that the workaround helped you)?
>>
>> I think we shouldn't throw an exception in case the thread name is not
>> exactly like we thought it would be.
>>
>> Thanks
>>
>>  Felix
>>
>>> On Fri, Sep 18, 2020 at 6:49 PM Mariusz W <[hidden email]> wrote:
>>>
>>>> Hi,
>>>> Can you try uncheck "include group name in label" in  Aggregate Report
>> and
>>>> recheck?
>>>>
>>>> Mariusz
>>>>
>>>> On Fri, 18 Sep 2020 at 14:48, Niraj <[hidden email]> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> I am getting below error in JMeter. When I run the test with more than
>> 10
>>>>> users, Basically I am running a few Websocket requests using the
>>>> WebSocket
>>>>> plugin (WebSocket Samplers by Peter Doornbosch). Any suggestions on how
>>>> to
>>>>> fix this?
>>>>>
>>>>> java.lang.StringIndexOutOfBoundsException: String index out of range:
>> -1
>>>>> at java.lang.String.substring(Unknown Source) ~[?:1.8.0_261]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.samplers.SampleResult.getSampleLabel(SampleResult.java:586)
>>>>> ~[ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>> org.apache.jmeter.visualizers.StatVisualizer.add(StatVisualizer.java:118)
>>>>> ~[ApacheJMeter_components.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.reporters.ResultCollector.sendToVisualizer(ResultCollector.java:570)
>>>>> ~[ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.reporters.ResultCollector.sampleOccurred(ResultCollector.java:547)
>>>>> ~[ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:58)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.TransactionController.notifyListeners(TransactionController.java:296)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:223)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.TransactionController.nextIsAController(TransactionController.java:173)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:205)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:221)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>> org.apache.jmeter.control.LoopController.next(LoopController.java:134)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>> org.apache.jmeter.control.LoopController.next(LoopController.java:134)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:91)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:291)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]
>>>>>
>>>>> Thanks,
>>>>> Niraj
>>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: java.lang.StringIndexOutOfBoundsException: String index out of range in ApacheJMeter_core.jar:5.3

niraj
PFA my JMeter script.

On Sat, Sep 19, 2020 at 12:38 AM Felix Schumacher <[hidden email]> wrote:

Am 18.09.20 um 19:27 schrieb Mariusz W:
> Felix,
> I think that problem may be connected with default threadName value in
> SampleResult:
> private String threadName = "";
>
> and the way WebsocketSampler create sample result:
> https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/master/src/main/java/eu/luminis/jmeter/wssampler/WebsocketSampler.java#lines-120
>
> SampleResult result = new SampleResult();
> result.setSampleLabel(getName());
>
> and all this is connected with TransactionController.sampleOccured:
> SampleResult sampleResult = se.getResult();
> res.setThreadName(sampleResult.getThreadName()); // <- still ""
>
> such a hypothesis...:)

Might be. I haven't looked into the sources of websocket sampler yet.
But I did setup a simple test with one websocket sampler and it did fill
in the thread name correctly.

I think it is OK to guard against a threadname without any space and use
the thread name completely in that case. I would like to see such a
case, though.

Felix

>
> Mariusz
>
> On Fri, 18 Sep 2020 at 16:45, Felix Schumacher <
> [hidden email]> wrote:
>
>> Am 18.09.20 um 15:39 schrieb Niraj:
>>> Perfect. It worked. Thanks Mariusz. Really Appreciated it.
>> Could you provide us a minimal test plan to reproduce the issue (even
>> knowing, that the workaround helped you)?
>>
>> I think we shouldn't throw an exception in case the thread name is not
>> exactly like we thought it would be.
>>
>> Thanks
>>
>>  Felix
>>
>>> On Fri, Sep 18, 2020 at 6:49 PM Mariusz W <[hidden email]> wrote:
>>>
>>>> Hi,
>>>> Can you try uncheck "include group name in label" in  Aggregate Report
>> and
>>>> recheck?
>>>>
>>>> Mariusz
>>>>
>>>> On Fri, 18 Sep 2020 at 14:48, Niraj <[hidden email]> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> I am getting below error in JMeter. When I run the test with more than
>> 10
>>>>> users, Basically I am running a few Websocket requests using the
>>>> WebSocket
>>>>> plugin (WebSocket Samplers by Peter Doornbosch). Any suggestions on how
>>>> to
>>>>> fix this?
>>>>>
>>>>> java.lang.StringIndexOutOfBoundsException: String index out of range:
>> -1
>>>>> at java.lang.String.substring(Unknown Source) ~[?:1.8.0_261]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.samplers.SampleResult.getSampleLabel(SampleResult.java:586)
>>>>> ~[ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>> org.apache.jmeter.visualizers.StatVisualizer.add(StatVisualizer.java:118)
>>>>> ~[ApacheJMeter_components.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.reporters.ResultCollector.sendToVisualizer(ResultCollector.java:570)
>>>>> ~[ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.reporters.ResultCollector.sampleOccurred(ResultCollector.java:547)
>>>>> ~[ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:58)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.TransactionController.notifyListeners(TransactionController.java:296)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:223)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.TransactionController.nextIsAController(TransactionController.java:173)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:205)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:221)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>> org.apache.jmeter.control.LoopController.next(LoopController.java:134)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>> org.apache.jmeter.control.LoopController.next(LoopController.java:134)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at
>>>>>
>>>>>
>> org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:91)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:291)
>>>>> [ApacheJMeter_core.jar:5.3]
>>>>> at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]
>>>>>
>>>>> Thanks,
>>>>> Niraj
>>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.StringIndexOutOfBoundsException: String index out of range in ApacheJMeter_core.jar:5.3

Felix Schumacher

Am 19.09.20 um 13:45 schrieb Niraj:
> PFA my JMeter script.

If you had attached the script, it has been dropped by the mailing list.
My scripts seem to make it through the mailing list software, when they
are small enough and are the jmx files directly (no zipping of them).

Alternatively you could send it to me directly.

Felix

>
> On Sat, Sep 19, 2020 at 12:38 AM Felix Schumacher
> <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>
>     Am 18.09.20 um 19:27 schrieb Mariusz W:
>     > Felix,
>     > I think that problem may be connected with default threadName
>     value in
>     > SampleResult:
>     > private String threadName = "";
>     >
>     > and the way WebsocketSampler create sample result:
>     >
>     https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/master/src/main/java/eu/luminis/jmeter/wssampler/WebsocketSampler.java#lines-120
>     >
>     > SampleResult result = new SampleResult();
>     > result.setSampleLabel(getName());
>     >
>     > and all this is connected with TransactionController.sampleOccured:
>     > SampleResult sampleResult = se.getResult();
>     > res.setThreadName(sampleResult.getThreadName()); // <- still ""
>     >
>     > such a hypothesis...:)
>
>     Might be. I haven't looked into the sources of websocket sampler yet.
>     But I did setup a simple test with one websocket sampler and it
>     did fill
>     in the thread name correctly.
>
>     I think it is OK to guard against a threadname without any space
>     and use
>     the thread name completely in that case. I would like to see such a
>     case, though.
>
>     Felix
>
>     >
>     > Mariusz
>     >
>     > On Fri, 18 Sep 2020 at 16:45, Felix Schumacher <
>     > [hidden email]
>     <mailto:[hidden email]>> wrote:
>     >
>     >> Am 18.09.20 um 15:39 schrieb Niraj:
>     >>> Perfect. It worked. Thanks Mariusz. Really Appreciated it.
>     >> Could you provide us a minimal test plan to reproduce the issue
>     (even
>     >> knowing, that the workaround helped you)?
>     >>
>     >> I think we shouldn't throw an exception in case the thread name
>     is not
>     >> exactly like we thought it would be.
>     >>
>     >> Thanks
>     >>
>     >>  Felix
>     >>
>     >>> On Fri, Sep 18, 2020 at 6:49 PM Mariusz W <[hidden email]
>     <mailto:[hidden email]>> wrote:
>     >>>
>     >>>> Hi,
>     >>>> Can you try uncheck "include group name in label" in 
>     Aggregate Report
>     >> and
>     >>>> recheck?
>     >>>>
>     >>>> Mariusz
>     >>>>
>     >>>> On Fri, 18 Sep 2020 at 14:48, Niraj <[hidden email]
>     <mailto:[hidden email]>> wrote:
>     >>>>
>     >>>>> Hi All,
>     >>>>>
>     >>>>> I am getting below error in JMeter. When I run the test with
>     more than
>     >> 10
>     >>>>> users, Basically I am running a few Websocket requests using the
>     >>>> WebSocket
>     >>>>> plugin (WebSocket Samplers by Peter Doornbosch). Any
>     suggestions on how
>     >>>> to
>     >>>>> fix this?
>     >>>>>
>     >>>>> java.lang.StringIndexOutOfBoundsException: String index out
>     of range:
>     >> -1
>     >>>>> at java.lang.String.substring(Unknown Source) ~[?:1.8.0_261]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.samplers.SampleResult.getSampleLabel(SampleResult.java:586)
>     >>>>> ~[ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>
>     org.apache.jmeter.visualizers.StatVisualizer.add(StatVisualizer.java:118)
>     >>>>> ~[ApacheJMeter_components.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.reporters.ResultCollector.sendToVisualizer(ResultCollector.java:570)
>     >>>>> ~[ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.reporters.ResultCollector.sampleOccurred(ResultCollector.java:547)
>     >>>>> ~[ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:58)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.control.TransactionController.notifyListeners(TransactionController.java:296)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:223)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.control.TransactionController.nextIsAController(TransactionController.java:173)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:205)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:221)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>
>     org.apache.jmeter.control.LoopController.next(LoopController.java:134)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>
>     org.apache.jmeter.control.LoopController.next(LoopController.java:134)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     >>>>>
>     >>>>>
>     >>
>     org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:91)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at
>     org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:291)
>     >>>>> [ApacheJMeter_core.jar:5.3]
>     >>>>> at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]
>     >>>>>
>     >>>>> Thanks,
>     >>>>> Niraj
>     >>>>>
>     >>
>     ---------------------------------------------------------------------
>     >> To unsubscribe, e-mail: [hidden email]
>     <mailto:[hidden email]>
>     >> For additional commands, e-mail: [hidden email]
>     <mailto:[hidden email]>
>     >>
>     >>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: [hidden email]
>     <mailto:[hidden email]>
>     For additional commands, e-mail: [hidden email]
>     <mailto:[hidden email]>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.StringIndexOutOfBoundsException: String index out of range in ApacheJMeter_core.jar:5.3

Felix Schumacher

Am 19.09.20 um 14:10 schrieb Felix Schumacher:
> Am 19.09.20 um 13:45 schrieb Niraj:
>> PFA my JMeter script.
> If you had attached the script, it has been dropped by the mailing list.
> My scripts seem to make it through the mailing list software, when they
> are small enough and are the jmx files directly (no zipping of them).
>
> Alternatively you could send it to me directly.

Thanks. Got it.

As I can't run it directly (I don't have the server :)), are there any
errors or warnings reported in jmeter.log?

Felix

>
> Felix
>
>> On Sat, Sep 19, 2020 at 12:38 AM Felix Schumacher
>> <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>
>>     Am 18.09.20 um 19:27 schrieb Mariusz W:
>>     > Felix,
>>     > I think that problem may be connected with default threadName
>>     value in
>>     > SampleResult:
>>     > private String threadName = "";
>>     >
>>     > and the way WebsocketSampler create sample result:
>>     >
>>     https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/master/src/main/java/eu/luminis/jmeter/wssampler/WebsocketSampler.java#lines-120
>>     >
>>     > SampleResult result = new SampleResult();
>>     > result.setSampleLabel(getName());
>>     >
>>     > and all this is connected with TransactionController.sampleOccured:
>>     > SampleResult sampleResult = se.getResult();
>>     > res.setThreadName(sampleResult.getThreadName()); // <- still ""
>>     >
>>     > such a hypothesis...:)
>>
>>     Might be. I haven't looked into the sources of websocket sampler yet.
>>     But I did setup a simple test with one websocket sampler and it
>>     did fill
>>     in the thread name correctly.
>>
>>     I think it is OK to guard against a threadname without any space
>>     and use
>>     the thread name completely in that case. I would like to see such a
>>     case, though.
>>
>>     Felix
>>
>>     >
>>     > Mariusz
>>     >
>>     > On Fri, 18 Sep 2020 at 16:45, Felix Schumacher <
>>     > [hidden email]
>>     <mailto:[hidden email]>> wrote:
>>     >
>>     >> Am 18.09.20 um 15:39 schrieb Niraj:
>>     >>> Perfect. It worked. Thanks Mariusz. Really Appreciated it.
>>     >> Could you provide us a minimal test plan to reproduce the issue
>>     (even
>>     >> knowing, that the workaround helped you)?
>>     >>
>>     >> I think we shouldn't throw an exception in case the thread name
>>     is not
>>     >> exactly like we thought it would be.
>>     >>
>>     >> Thanks
>>     >>
>>     >>  Felix
>>     >>
>>     >>> On Fri, Sep 18, 2020 at 6:49 PM Mariusz W <[hidden email]
>>     <mailto:[hidden email]>> wrote:
>>     >>>
>>     >>>> Hi,
>>     >>>> Can you try uncheck "include group name in label" in 
>>     Aggregate Report
>>     >> and
>>     >>>> recheck?
>>     >>>>
>>     >>>> Mariusz
>>     >>>>
>>     >>>> On Fri, 18 Sep 2020 at 14:48, Niraj <[hidden email]
>>     <mailto:[hidden email]>> wrote:
>>     >>>>
>>     >>>>> Hi All,
>>     >>>>>
>>     >>>>> I am getting below error in JMeter. When I run the test with
>>     more than
>>     >> 10
>>     >>>>> users, Basically I am running a few Websocket requests using the
>>     >>>> WebSocket
>>     >>>>> plugin (WebSocket Samplers by Peter Doornbosch). Any
>>     suggestions on how
>>     >>>> to
>>     >>>>> fix this?
>>     >>>>>
>>     >>>>> java.lang.StringIndexOutOfBoundsException: String index out
>>     of range:
>>     >> -1
>>     >>>>> at java.lang.String.substring(Unknown Source) ~[?:1.8.0_261]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.samplers.SampleResult.getSampleLabel(SampleResult.java:586)
>>     >>>>> ~[ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>
>>     org.apache.jmeter.visualizers.StatVisualizer.add(StatVisualizer.java:118)
>>     >>>>> ~[ApacheJMeter_components.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.reporters.ResultCollector.sendToVisualizer(ResultCollector.java:570)
>>     >>>>> ~[ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.reporters.ResultCollector.sampleOccurred(ResultCollector.java:547)
>>     >>>>> ~[ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:58)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.control.TransactionController.notifyListeners(TransactionController.java:296)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:223)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.control.TransactionController.nextIsAController(TransactionController.java:173)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:205)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:221)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>
>>     org.apache.jmeter.control.LoopController.next(LoopController.java:134)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>
>>     org.apache.jmeter.control.LoopController.next(LoopController.java:134)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     >>>>>
>>     >>>>>
>>     >>
>>     org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:91)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at
>>     org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:291)
>>     >>>>> [ApacheJMeter_core.jar:5.3]
>>     >>>>> at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]
>>     >>>>>
>>     >>>>> Thanks,
>>     >>>>> Niraj
>>     >>>>>
>>     >>
>>     ---------------------------------------------------------------------
>>     >> To unsubscribe, e-mail: [hidden email]
>>     <mailto:[hidden email]>
>>     >> For additional commands, e-mail: [hidden email]
>>     <mailto:[hidden email]>
>>     >>
>>     >>
>>
>>     ---------------------------------------------------------------------
>>     To unsubscribe, e-mail: [hidden email]
>>     <mailto:[hidden email]>
>>     For additional commands, e-mail: [hidden email]
>>     <mailto:[hidden email]>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: java.lang.StringIndexOutOfBoundsException: String index out of range in ApacheJMeter_core.jar:5.3

Felix Schumacher
In reply to this post by Mariusz W
Well, I tried to replicate the error, but have not achieved that. But as
we can do better on our side here (guarding against the empty string), I
did that.

The next nightly shouldn't throw an error, when a plugin misses to
initialize the thread name. Why the name is empty stays a mystery (at
least for me, now).

Felix

Am 18.09.20 um 15:19 schrieb Mariusz W:

> Hi,
> Can you try uncheck "include group name in label" in  Aggregate Report and
> recheck?
>
> Mariusz
>
> On Fri, 18 Sep 2020 at 14:48, Niraj <[hidden email]> wrote:
>
>> Hi All,
>>
>> I am getting below error in JMeter. When I run the test with more than 10
>> users, Basically I am running a few Websocket requests using the WebSocket
>> plugin (WebSocket Samplers by Peter Doornbosch). Any suggestions on how to
>> fix this?
>>
>> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>> at java.lang.String.substring(Unknown Source) ~[?:1.8.0_261]
>> at
>>
>> org.apache.jmeter.samplers.SampleResult.getSampleLabel(SampleResult.java:586)
>> ~[ApacheJMeter_core.jar:5.3]
>> at
>> org.apache.jmeter.visualizers.StatVisualizer.add(StatVisualizer.java:118)
>> ~[ApacheJMeter_components.jar:5.3]
>> at
>>
>> org.apache.jmeter.reporters.ResultCollector.sendToVisualizer(ResultCollector.java:570)
>> ~[ApacheJMeter_core.jar:5.3]
>> at
>>
>> org.apache.jmeter.reporters.ResultCollector.sampleOccurred(ResultCollector.java:547)
>> ~[ApacheJMeter_core.jar:5.3]
>> at
>>
>> org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:58)
>> [ApacheJMeter_core.jar:5.3]
>> at
>>
>> org.apache.jmeter.control.TransactionController.notifyListeners(TransactionController.java:296)
>> [ApacheJMeter_core.jar:5.3]
>> at
>>
>> org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:223)
>> [ApacheJMeter_core.jar:5.3]
>> at
>>
>> org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
>> [ApacheJMeter_core.jar:5.3]
>> at
>>
>> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
>> [ApacheJMeter_core.jar:5.3]
>> at
>>
>> org.apache.jmeter.control.TransactionController.nextIsAController(TransactionController.java:173)
>> [ApacheJMeter_core.jar:5.3]
>> at
>>
>> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>> [ApacheJMeter_core.jar:5.3]
>> at
>>
>> org.apache.jmeter.control.TransactionController.nextWithoutTransactionSampler(TransactionController.java:205)
>> [ApacheJMeter_core.jar:5.3]
>> at
>>
>> org.apache.jmeter.control.TransactionController.next(TransactionController.java:135)
>> [ApacheJMeter_core.jar:5.3]
>> at
>>
>> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:221)
>> [ApacheJMeter_core.jar:5.3]
>> at
>>
>> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>> [ApacheJMeter_core.jar:5.3]
>> at org.apache.jmeter.control.LoopController.next(LoopController.java:134)
>> [ApacheJMeter_core.jar:5.3]
>> at
>>
>> org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:224)
>> [ApacheJMeter_core.jar:5.3]
>> at
>>
>> org.apache.jmeter.control.GenericController.next(GenericController.java:174)
>> [ApacheJMeter_core.jar:5.3]
>> at org.apache.jmeter.control.LoopController.next(LoopController.java:134)
>> [ApacheJMeter_core.jar:5.3]
>> at
>>
>> org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:91)
>> [ApacheJMeter_core.jar:5.3]
>> at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:291)
>> [ApacheJMeter_core.jar:5.3]
>> at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]
>>
>> Thanks,
>> Niraj
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]