https://issues.apache.org/bugzilla/show_bug.cgi?id=50898

           Summary: NullPointerException on loading script
           Product: JMeter
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Main
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


I am facing a problem which appeared after my colleague updated one of our
scripts. He saved the script with the jmeter revision 1077948

I am able to load and execute my script without any problems if I do it from
the GUI without providing it in the command line. However if I pass the script
in the command line I get the following exception:

2010/09/20 17:12:09 ERROR - jmeter.engine.StandardJMeterEngine: Uncaught
exception:  java.lang.NullPointerException
    at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:989)
    at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:989)
    at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:989)
    at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:989)
    at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:971)
    at
org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:385)
    at java.lang.Thread.run(Thread.java:619)

    The problem seems to be in Iterator<?> iter = list().iterator();
            while (iter.hasNext()) {
                Object item = iter.next();
                final HashTree treeItem = getTree(item);
                visitor.addNode(item, treeItem);
                treeItem.traverseInto(visitor);
            }

     I don't understand how this problem can even happen. What occurs is that
treeItem is null. 
     Adding some expressions evaluation I got the following results:
     list().contains(item) => true
     containsKey(item) => false
     get(item) != null => false

     I noticed that in the script that no longer works some elements are saved
differently than they used to be:
     This is how it used to work:
     <org.apache.jmeter.protocol.smtp.sampler.SmtpSampler
guiclass="org.apache.jmeter.protocol.smtp.sampler.gui.SmtpSamplerGui"
testclass="org.apache.jmeter.protocol.smtp.sampler.SmtpSampler" testname="SMTP
1" enabled="true">

     This is how it is now:
     <SmtpSampler guiclass="SmtpSamplerGui" testclass="SmtpSampler"
testname="SMTP 1" enabled="true">

     However I do not know if this is the cause of the problem...

     Any light in this matter would be very appreciated.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

Reply via email to