Bug 51869

Summary: NullPointer Exception when using Include Controller
Product: JMeter - Now in Github Reporter: vh.garcia.valencia
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal CC: p.mouawad, vh.garcia.valencia
Priority: P2    
Version: 2.5   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Contains a zip file of the two test plans files.
Patch for fixing this.
Test plans fixed without 3rd party components

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
Thanks!

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
Log:
Bug 51869 - NullPointer Exception when using Include Controller

Modified:
   jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/IncludeController.java
   jakarta/jmeter/trunk/xdocs/changes.xml
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

http://jakarta.apache.org/site/source.html#Patches
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.
Regards
Comment 7 The ASF infrastructure team 2022-09-24 20:37:47 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2558