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 <[EMAIL PROTECTED]> 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:
[EMAIL PROTECTED]
 For additional commands, e-mail:
[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
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
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.0">
  <hashTree>
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
      <stringProp name="TestPlan.comments"></stringProp>
      <boolProp name="TestPlan.functional_mode">false</boolProp>
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
        <collectionProp name="Arguments.arguments"/>
      </elementProp>
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
    </TestPlan>
    <hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="ThreadGroup1" enabled="true">
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <boolProp name="LoopController.continue_forever">false</boolProp>
          <stringProp name="LoopController.loops">1</stringProp>
        </elementProp>
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
        <stringProp name="ThreadGroup.ramp_time">0</stringProp>
        <longProp name="ThreadGroup.start_time">1194965062000</longProp>
        <longProp name="ThreadGroup.end_time">1194965062000</longProp>
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
        <stringProp name="ThreadGroup.duration"></stringProp>
        <stringProp name="ThreadGroup.delay"></stringProp>
      </ThreadGroup>
      <hashTree>
        <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
          <collectionProp name="Arguments.arguments">
            <elementProp name="emailaddress" elementType="Argument">
              <stringProp name="Argument.name">emailaddress</stringProp>
              <stringProp name="Argument.value">[EMAIL PROTECTED]</stringProp>
              <stringProp name="Argument.metadata">=</stringProp>
            </elementProp>
            <elementProp name="password" elementType="Argument">
              <stringProp name="Argument.name">password</stringProp>
              <stringProp name="Argument.value">xxxx</stringProp>
              <stringProp name="Argument.metadata">=</stringProp>
            </elementProp>
            <elementProp name="name_rcpt" elementType="Argument">
              <stringProp name="Argument.name">name_rcpt</stringProp>
              <stringProp name="Argument.value">xxxx</stringProp>
              <stringProp name="Argument.metadata">=</stringProp>
            </elementProp>
            <elementProp name="emailaddress_rcpt" elementType="Argument">
              <stringProp name="Argument.name">emailaddress_rcpt</stringProp>
              <stringProp name="Argument.value">[EMAIL PROTECTED]</stringProp>
              <stringProp name="Argument.metadata">=</stringProp>
            </elementProp>
            <elementProp name="password_rcpt" elementType="Argument">
              <stringProp name="Argument.name">password_rcpt</stringProp>
              <stringProp name="Argument.value">xxxx</stringProp>
              <stringProp name="Argument.metadata">=</stringProp>
            </elementProp>
          </collectionProp>
        </Arguments>
        <hashTree/>
        <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
            <collectionProp name="Arguments.arguments"/>
          </elementProp>
          <stringProp name="HTTPSampler.domain">xxxx.com</stringProp>
          <stringProp name="HTTPSampler.port"></stringProp>
          <stringProp name="HTTPSampler.protocol">https</stringProp>
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
          <stringProp name="HTTPSampler.path"></stringProp>
        </ConfigTestElement>
        <hashTree/>
        <IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="Login" enabled="true">
          <stringProp name="IncludeController.includepath">ModuleTest_Login.jmx</stringProp>
        </IncludeController>
        <hashTree/>
        <IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="WriteMail" enabled="true">
          <stringProp name="IncludeController.includepath">ModuleTest_WriteMail.jmx</stringProp>
        </IncludeController>
        <hashTree/>
        <IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="Logout" enabled="true">
          <stringProp name="IncludeController.includepath">ModuleTest_Logout.jmx</stringProp>
        </IncludeController>
        <hashTree/>
        <IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="ReadMailwithMuc" enabled="true">
          <stringProp name="IncludeController.includepath">ModuleTest_ReadMailWithMuc.jmx</stringProp>
        </IncludeController>
        <hashTree/>
        <IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="QuickReg" enabled="true">
          <stringProp name="IncludeController.includepath">ModuleTest_QuickReg.jmx</stringProp>
        </IncludeController>
        <hashTree/>
        <IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="Logout" enabled="true">
          <stringProp name="IncludeController.includepath">ModuleTest_Logout.jmx</stringProp>
        </IncludeController>
        <hashTree/>
      </hashTree>
      <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
        <boolProp name="ResultCollector.error_logging">false</boolProp>
        <objProp>
          <value class="SampleSaveConfiguration">
            <time>true</time>
            <latency>true</latency>
            <timestamp>true</timestamp>
            <success>true</success>
            <label>true</label>
            <code>true</code>
            <message>true</message>
            <threadName>true</threadName>
            <dataType>true</dataType>
            <encoding>false</encoding>
            <assertions>true</assertions>
            <subresults>true</subresults>
            <responseData>false</responseData>
            <samplerData>false</samplerData>
            <xml>true</xml>
            <fieldNames>false</fieldNames>
            <responseHeaders>false</responseHeaders>
            <requestHeaders>true</requestHeaders>
            <responseDataOnError>false</responseDataOnError>
            <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
            <assertionsResultsToSave>0</assertionsResultsToSave>
            <bytes>true</bytes>
          </value>
          <name>saveConfig</name>
        </objProp>
        <stringProp name="filename"></stringProp>
      </ResultCollector>
      <hashTree/>
    </hashTree>
  </hashTree>
</jmeterTestPlan>
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.0">
  <hashTree>
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
      <stringProp name="TestPlan.comments"></stringProp>
      <boolProp name="TestPlan.functional_mode">false</boolProp>
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
        <collectionProp name="Arguments.arguments"/>
      </elementProp>
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
    </TestPlan>
    <hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="ThreadGroup1" enabled="true">
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <boolProp name="LoopController.continue_forever">false</boolProp>
          <stringProp name="LoopController.loops">1</stringProp>
        </elementProp>
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
        <stringProp name="ThreadGroup.ramp_time">0</stringProp>
        <longProp name="ThreadGroup.start_time">1194965062000</longProp>
        <longProp name="ThreadGroup.end_time">1194965062000</longProp>
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
        <stringProp name="ThreadGroup.duration"></stringProp>
        <stringProp name="ThreadGroup.delay"></stringProp>
      </ThreadGroup>
      <hashTree>
        <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
          <collectionProp name="Arguments.arguments">
            <elementProp name="emailaddress" elementType="Argument">
              <stringProp name="Argument.name">emailaddress</stringProp>
              <stringProp name="Argument.value">[EMAIL PROTECTED]</stringProp>
              <stringProp name="Argument.metadata">=</stringProp>
            </elementProp>
            <elementProp name="password" elementType="Argument">
              <stringProp name="Argument.name">password</stringProp>
              <stringProp name="Argument.value">xxxx</stringProp>
              <stringProp name="Argument.metadata">=</stringProp>
            </elementProp>
            <elementProp name="name_rcpt" elementType="Argument">
              <stringProp name="Argument.name">name_rcpt</stringProp>
              <stringProp name="Argument.value">xxxx</stringProp>
              <stringProp name="Argument.metadata">=</stringProp>
            </elementProp>
            <elementProp name="emailaddress_rcpt" elementType="Argument">
              <stringProp name="Argument.name">emailaddress_rcpt</stringProp>
              <stringProp name="Argument.value">[EMAIL PROTECTED]</stringProp>
              <stringProp name="Argument.metadata">=</stringProp>
            </elementProp>
            <elementProp name="password_rcpt" elementType="Argument">
              <stringProp name="Argument.name">password_rcpt</stringProp>
              <stringProp name="Argument.value">xxxx</stringProp>
              <stringProp name="Argument.metadata">=</stringProp>
            </elementProp>
          </collectionProp>
        </Arguments>
        <hashTree/>
        <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
            <collectionProp name="Arguments.arguments"/>
          </elementProp>
          <stringProp name="HTTPSampler.domain">xxxx.com</stringProp>
          <stringProp name="HTTPSampler.port"></stringProp>
          <stringProp name="HTTPSampler.protocol">https</stringProp>
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
          <stringProp name="HTTPSampler.path"></stringProp>
        </ConfigTestElement>
        <hashTree/>
        <IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="Login" enabled="true">
          <stringProp name="IncludeController.includepath">ModuleTest_Login.jmx</stringProp>
        </IncludeController>
        <hashTree/>
        <IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="WriteMail" enabled="true">
          <stringProp name="IncludeController.includepath">ModuleTest_WriteMail.jmx</stringProp>
        </IncludeController>
        <hashTree/>
        <IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="Logout" enabled="true">
          <stringProp name="IncludeController.includepath">ModuleTest_Logout.jmx</stringProp>
        </IncludeController>
        <hashTree/>
        <IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="ReadMailwithMuc" enabled="true">
          <stringProp name="IncludeController.includepath">ModuleTest_ReadMailWithMuc.jmx</stringProp>
        </IncludeController>
        <hashTree/>
        <IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="QuickReg" enabled="true">
          <stringProp name="IncludeController.includepath">ModuleTest_QuickReg.jmx</stringProp>
        </IncludeController>
        <hashTree/>
        <IncludeController guiclass="IncludeControllerGui" testclass="IncludeController" testname="Logout_2" enabled="true">
          <stringProp name="IncludeController.includepath">ModuleTest_Logout.jmx</stringProp>
        </IncludeController>
        <hashTree/>
      </hashTree>
      <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
        <boolProp name="ResultCollector.error_logging">false</boolProp>
        <objProp>
          <value class="SampleSaveConfiguration">
            <time>true</time>
            <latency>true</latency>
            <timestamp>true</timestamp>
            <success>true</success>
            <label>true</label>
            <code>true</code>
            <message>true</message>
            <threadName>true</threadName>
            <dataType>true</dataType>
            <encoding>false</encoding>
            <assertions>true</assertions>
            <subresults>true</subresults>
            <responseData>false</responseData>
            <samplerData>false</samplerData>
            <xml>true</xml>
            <fieldNames>false</fieldNames>
            <responseHeaders>false</responseHeaders>
            <requestHeaders>true</requestHeaders>
            <responseDataOnError>false</responseDataOnError>
            <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
            <assertionsResultsToSave>0</assertionsResultsToSave>
            <bytes>true</bytes>
          </value>
          <name>saveConfig</name>
        </objProp>
        <stringProp name="filename"></stringProp>
      </ResultCollector>
      <hashTree/>
    </hashTree>
  </hashTree>
</jmeterTestPlan>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to