when I use SessionFilter I receive NullPointerException in the result. After a bit of debugging I found out it is the problem that the CookieManager's cookie handler is not initialized. Currently I fixed it by adding "testStarted" call after creating new CookieManager at line 176: if(cm == null) { cm = new CookieManager(); cm.testStarted(); cookieManagers.put(ipAddr,cm); } I am not certain whether it is the most appropriate solution but it seems to be working...
Hello, Calling testStarted this way is not the right fix. Can you attach your failing JMX plan and the file jmeter.log which contains the stacktrace ? ANd also if possible the access.log file used to run this test. Thank you Regards Philippe M.
Created attachment 29076 [details] Test plan reproducing issue
Issue was introduced by partial fix to 51512. CookieHandler is not initialized as testStarted is not called in SessionFilter#getCookieManager since CookieManager is built outside of TestElement lifecycle. Date: Wed Jul 18 21:20:53 2012 New Revision: 1363120 URL: http://svn.apache.org/viewvc?rev=1363120&view=rev Log: Bug 53511 - access log sampler SessionFilter throws NullPointerException - cookie manager not initialized properly Bugzilla Id: 53511 Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/SessionFilter.java jmeter/trunk/xdocs/changes.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2855