jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: TestCompiler throws NPE - how to debug?
Date Wed, 02 Jul 2008 10:44:38 GMT
On 02/07/2008, Ronan Klyne <ronan.klyne@groupbc.com> wrote:
> Ivan Rodriguez wrote:
>
> > You could try to disable one element at the time and run the script.
> > When the Exception disappear then you will know witch element is causing
> it.
> >
> >
> > You can of course do it the other way around, disable all and enable one
> element at the time.
> >
>
>  The problem with this method is that I have a large test plan (hundreds of
> elements), and it takes about 60 seconds per element.
>  I'd rather JMeter would just tell me which element wasn't right...
>

The problem is that the NPE is caused by a bug - it's not expected to
happen, so the method that fails does not do anything about it. The
NPE is eventually caught by the top-level code, but by then the
details of what the low level method was doing are lost.

>
> > I take it you are not using any Beanshell script right?
> >
>  I am using BeanShell, but I'm fairly sure this error is not related to that
> - BeanShell errors have always mentioned 'BeanShell' somewhere in the
> message...

Agreed. The offending code is:

		SamplePackage pack = (SamplePackage) samplerConfigMap.get(sampler);
		pack.setSampler(sampler); // NPE occurs here

For some reason, the pack cannot be found in the map.

It looks like this might perhaps be a thread synchronisation issue, in
which case the contents of the test plan may not be relevant.

>

But if the test plan is relevant:

How about checking which test elements are missing from the loaded test plan?

If it's not obvious visually, try saving the partial test plan and
comparing against the original.

If that does not work, let me know and I could send you an updated jar
with some debug added.


>         # r
>
>
>
>
> >
> > -----Original Message-----
> > From: Ronan Klyne [mailto:ronan.klyne@groupbc.com]
> > Sent: den 2 juli 2008 11:34
> > To: JMeter Users List
> > Subject: Re: TestCompiler throws NPE - how to debug?
> >
> >
> > Which would be fine, if I was writing Java and had the Java code...
> > This is somehow caused by something in my test plan, but I don't know
> > how to find out what...
> >
> >        # r
> >
> > Ivan Rodriguez wrote:
> >
> > > java.lang.NullPointerException is the same as "Whatever you are trying
> to use doesn't exist".
> > >
> > > Hard to tell without the script at hand.
> > > -----Original Message-----
> > > From: Ronan Klyne [mailto:ronan.klyne@groupbc.com]
> > > Sent: den 2 juli 2008 10:39
> > > To: JMeter Users List
> > > Subject: TestCompiler throws NPE - how to debug?
> > >
> > > Hi all,
> > >
> > > I have a test plan created in JMeter 2.3RC4, now being used in JMeter
> > > 2.3.2. When I try to run my tests, I get the following error appearing
> > > in jmeter.log:
> > >
> > > <snip>
> > > 2008/07/02 09:31:05 ERROR - jmeter.threads.JMeterThread:
> > > java.lang.NullPointerException
> > >        at
> > >
> org.apache.jmeter.threads.TestCompiler.configureSampler(TestCompiler.java:85)
> > >        at
> org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:278)
> > >        at java.lang.Thread.run(Unknown Source)
> > >
> > > </snip>
> > >
> > > I get several of these, but I can't work out what is actually wrong. I
> > > don't see any mention of which test element it is compiling when this
> > > happens.
> > >
> > > I don't know where I should be looking to find this problem - any
> > > suggestions would be greatly appreciated...
> > >
> > > Thanks,
> > >
> > >        Ronan
> > >
> >
> > --
> > Ronan Klyne
> > Business Collaborator Developer
> > Tel: +44 01189 028518
> > ronan.klyne@groupbc.com
> > www.groupbc.com
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> >
> >
> >
>
>
>  --
>  Ronan Klyne
>  Business Collaborator Developer
>  Tel: +44 01189 028518
>  ronan.klyne@groupbc.com
>  www.groupbc.com
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
>
>

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


Mime
View raw message