jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Rennhard <marc.rennh...@zhaw.ch>
Subject Re: Testcase with include controller produces NullPointerException in non-GUI mode
Date Fri, 09 May 2008 11:09:36 GMT
Thanks for your reply.

In fact, I believe I have identified the cause of the problem. In my 
test plan, I include the same module twice and gave it the same name 
both times (Logout). In GUI mode, this does not seem to be a problem, 
but non-GUI mode didn't like that. When using different names, it works 
flawlessly in GUI and non-GUI mode.

The attached test plans demonstrate this (I removed sensitive 
information from the user variables). TestPlan1 does not work in GUI 
mode (and produses the previously described NullPointerException), 
TestPlan2 does. The only difference between the two is the following:

$ diff TestPlan1.jmx TestPlan2.jmx
90c90
<         <IncludeController guiclass="IncludeControllerGui" 
testclass="IncludeController" testname="Logout" enabled="true">
---
 >         <IncludeController guiclass="IncludeControllerGui" 
testclass="IncludeController" testname="Logout_2" enabled="true">

So although a workaround exists, it looks like a bug. I hope the 
information provided above is enough to fix it. Otherwise, let me know 
if you need more datails about the modules included in the attached test 
plan.

Cheers,
Marc

sebb wrote:
> Does this happen with all tests? Or just some?
> 
> The failure is in a common routine, so it won't be possible to fix
> this without a test case.
> Please create a Bugzilla issue and then attach a test case that shows
> the problem.
> 
> Please ensure that the test case does not use any private servers.
> And ensure that there are no sensitive details left in the plan.
> 
> On 07/05/2008, Marc Rennhard <marc.rennhard@zhaw.ch> wrote:
>> Dear all,
>>
>>  I'm using Jmeter 2.3.1 and am experimenting with the include controller.
>>  In GUI mode, everything works correctly. However, in non-GUI mode, a
>>  NullPointerException is produced. Without using include controllers,
>> non-GUI
>>  mode works flawlessly.
>>
>>  This is the output of Jmeter:
>>
>>  C:\Tools\jakarta-jmeter-2.3.1\bin>jmeter -n -t
>> ModuleTest_Master.jmx
>>  Created the tree successfully
>>  Starting the test @ Wed May 07 15:57:09 CEST 2008 (1210168629468)
>>  Uncaught Exception java.lang.NullPointerException. See log file for
>> details.
>>
>>  And here's the log:
>>
>>  2008/05/07 15:57:09 INFO  - jmeter.util.JMeterUtils: Setting Locale to en
>>  2008/05/07 15:57:09 INFO  - jmeter.JMeter: Loading user properties from:
>> C:\Tools\jakarta-jmeter-2.3.1\bin\user.properties
>>  2008/05/07 15:57:09 INFO  - jmeter.JMeter: Loading system properties from:
>> C:\Tools\jakarta-jmeter-2.3.1\bin\system.properties
>>  2008/05/07 15:57:09 INFO  - jmeter.JMeter: Copyright (c) 1998-2007 The
>> Apache Software Foundation
>>  2008/05/07 15:57:09 INFO  - jmeter.JMeter: Version 2.3.1
>>  2008/05/07 15:57:09 INFO  - jmeter.JMeter: java.version=1.6.0_03
>>  2008/05/07 15:57:09 INFO  - jmeter.JMeter: os.name=Windows XP
>>  2008/05/07 15:57:09 INFO  - jmeter.JMeter: os.arch=x86
>>  2008/05/07 15:57:09 INFO  - jmeter.JMeter: os.version=5.1
>>  2008/05/07 15:57:09 INFO  - jmeter.JMeter: file.encoding=Cp1252
>>  2008/05/07 15:57:09 INFO  - jmeter.JMeter: Default Locale=Deutsch (Schweiz)
>>  2008/05/07 15:57:09 INFO  - jmeter.JMeter: JMeter  Locale=Englisch
>>  2008/05/07 15:57:09 INFO  - jmeter.JMeter:
>> JMeterHome=C:\Tools\jakarta-jmeter-2.3.1
>>  2008/05/07 15:57:09 INFO  - jmeter.JMeter: user.dir
>> =C:\Tools\jakarta-jmeter-2.3.1\bin
>>  2008/05/07 15:57:09 INFO  - jmeter.JMeter: PWD
>> =C:\Tools\jakarta-jmeter-2.3.1\bin
>>  2008/05/07 15:57:09 INFO  - jmeter.services.FileServer: Default
>> base=C:\Tools\jakarta-jmeter-2.3.1\bin
>>  2008/05/07 15:57:09 INFO  - jmeter.services.FileServer: Set new
>> base=C:\Tools\jakarta-jmeter-2.3.1\bin
>>  2008/05/07 15:57:09 INFO  - jmeter.JMeter: Loading file:
>> ModuleTest_Master.jmx
>>  2008/05/07 15:57:09 INFO  - jmeter.save.SaveService: Testplan (JMX)
>> version: 2.2. Testlog (JTL) version: 2.2
>>  2008/05/07 15:57:09 INFO  - jmeter.save.SaveService: Using SaveService
>> properties file encoding UTF-8
>>  2008/05/07 15:57:09 INFO  - jmeter.save.SaveService: Using SaveService
>> properties file version 594567
>>  2008/05/07 15:57:09 INFO  - jmeter.samplers.SampleResult: Note: Sample
>> TimeStamps are START times
>>  2008/05/07 15:57:09 INFO  - jmeter.samplers.SampleResult:
>> sampleresult.default.encoding is set to ISO-8859-1
>>  2008/05/07 15:57:09 INFO  - jmeter.save.SaveService: Using SaveService
>> properties version 2.0
>>  2008/05/07 15:57:09 INFO  - jmeter.save.SaveService: All converter versions
>> present and correct
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.control.IncludeController: loadIncludedElements --
>> try to load included module: ModuleTest_Login.jmx
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.protocol.http.sampler.HTTPSamplerBase: Cannot find
>> .className property for htmlParser, using default
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for
>> text/html is
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for
>> application/xhtml+xml is
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for
>> application/xml is
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for
>> text/xml is
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for
>> text/vnd.wap.wml is
>> org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.protocol.http.sampler.HTTPSampler: Maximum
>> connection retries = 10
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.control.IncludeController: loadIncludedElements --
>> try to load included module: ModuleTest_WriteMail.jmx
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.control.IncludeController: loadIncludedElements --
>> try to load included module: ModuleTest_Logout.jmx
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.control.IncludeController: loadIncludedElements --
>> try to load included module: ModuleTest_ReadMailWithMuc.jmx
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.control.IncludeController: loadIncludedElements --
>> try to load included module: ModuleTest_QuickReg.jmx
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.control.IncludeController: loadIncludedElements --
>> try to load included module: ModuleTest_Logout.jmx
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.control.IncludeController: loadIncludedElements --
>> try to load included module: ModuleTest_Login.jmx
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.control.IncludeController: loadIncludedElements --
>> try to load included module: ModuleTest_WriteMail.jmx
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.control.IncludeController: loadIncludedElements --
>> try to load included module: ModuleTest_Logout.jmx
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.control.IncludeController: loadIncludedElements --
>> try to load included module: ModuleTest_ReadMailWithMuc.jmx
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.control.IncludeController: loadIncludedElements --
>> try to load included module: ModuleTest_QuickReg.jmx
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.control.IncludeController: loadIncludedElements --
>> try to load included module: ModuleTest_Logout.jmx
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.engine.StandardJMeterEngine: Listeners will be
>> started after enabling running version
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.engine.StandardJMeterEngine: To revert to the
>> earlier behaviour, define
>> jmeterengine.startlistenerslater=false
>>  2008/05/07 15:57:09 INFO  -
>> jmeter.engine.StandardJMeterEngine: Running the test!
>>  2008/05/07 15:57:09 ERROR -
>> jmeter.engine.StandardJMeterEngine: Uncaught exception:
>> java.lang.NullPointerException
>>         at
>> org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:973)
>>         at
>> org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:973)
>>         at
>> org.apache.jorphan.collections.HashTree.traverse(HashTree.java:956)
>>         at
>> org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:332)
>>         at java.lang.Thread.run(Unknown Source)
>>
>>  Using absolute paths for the included modules or working with the
>>  includecontroller.prefix property does not change anything.
>>
>>  Thanks for any help,
>>  Marc
>>
>> ---------------------------------------------------------------------
>>  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
> 

-- 
Prof. Dr. Marc Rennhard, CISSP
ZHAW Zuercher Hochschule für Angewandte Wissenschaften
Institut fuer Angewandte Informationstechnologie InIT
Schwerpunktleiter Information Security
Technikumstrasse 9 / Postfach / CH-8401 Winterthur
Buero TG 210 / Fon: +41 58 934-7245 / Fax: +41 58 935-7245
PGP-KeyID: 84AEB193, PGP encrypted mail welcome

Mime
View raw message