Bug 51869 - NullPointer Exception when using Include Controller
Summary: NullPointer Exception when using Include Controller
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.5
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2011-09-22 15:31 UTC by vh.garcia.valencia
Modified: 2011-10-01 22:00 UTC (History)
2 users (show)

Contains a zip file of the two test plans files. (5.44 KB, application/x-zip-compressed)
2011-09-22 15:31 UTC, vh.garcia.valencia
Patch for fixing this. (7.79 KB, patch)
2011-09-22 15:35 UTC, vh.garcia.valencia
Details | Diff
Test plans fixed without 3rd party components (4.85 KB, application/x-zip-compressed)
2011-09-22 20:36 UTC, vh.garcia.valencia

Note You need to log in before you can comment on or make changes to this bug.
Description vh.garcia.valencia 2011-09-22 15:31:27 UTC
Created attachment 27565 [details]
Contains a zip file of the two test plans files.

I'm getting the following exception when including a Test Fragment via an include controller:

2011/09/22 11:21:46 ERROR - jmeter.gui.action.ActionRouter:  java.lang.NullPointerException
	at org.apache.jmeter.control.IncludeController.clone(IncludeController.java:81)
	at org.apache.jmeter.gui.action.CheckDirty.addNode(CheckDirty.java:133)
	at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:986)
	at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:987)
	at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:969)
	at org.apache.jmeter.gui.action.CheckDirty.doAction(CheckDirty.java:88)
	at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:82)
	at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:42)
	at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:61)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$000(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.awt.EventQueue$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Sour

I'm attaching a zip file with the following:

[-]The test plan using the include controller (Use.Include.jmx)
[-]The test fragment (Test.Fragment.jmx)

I've debugged the problem and the fix is pretty simple. Is there any way I can submit the patch?
Comment 1 vh.garcia.valencia 2011-09-22 15:35:47 UTC
Created attachment 27566 [details]
Patch for fixing this.

Fixed 'Include Controller.java'
Comment 2 Sebb 2011-09-22 17:13:07 UTC

BTW, the patch file is not actually a patch - it's the full source.
In this case it was easy to apply, but in general patches are better because they usually still work even if the file has been updated; also they are easier to evaluate.

I'm assuming the fix works (it's unlikely to make things worse), but cannot test because the test plan contains a reference to a 3rd party library. Please only provide test cases using standard JMeter components.

URL: http://svn.apache.org/viewvc?rev=1174269&view=rev
Bug 51869 - NullPointer Exception when using Include Controller

Comment 3 vh.garcia.valencia 2011-09-22 20:36:11 UTC
Created attachment 27572 [details]
Test plans fixed without 3rd party components

The "entry point" is 'Use.Include.jmx', the fragment is 'Test.Fragment.jmx'. I removed the 3rd party component.
Comment 4 vh.garcia.valencia 2011-09-22 20:37:20 UTC
Where can I find documentation about creating a patch correctly? I uploaded the corrected test plans. Shouldn't contain the 3rd party components any more.
Comment 5 Sebb 2011-09-22 20:52:21 UTC
Thanks for the updated test plan, it does load OK.
However the include file has lots of elements which make it hard to see what is happening.

Could you provide simpler test case?

Patches are described on the Jakarta web-site, for example

Comment 6 Philippe Mouawad 2011-10-01 22:00:04 UTC
I think this one is fixed looking at changes.xml and testing plan.
So I close it, if I am wrong reopen.
Fixed in 2.5.1.