Bug 54326 - AjpSampler send file in post throws FileNotFoundException
Summary: AjpSampler send file in post throws FileNotFoundException
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.8
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-19 08:47 UTC by widzian
Modified: 2012-12-20 12:55 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description widzian 2012-12-19 08:47:15 UTC
java.io.FileNotFoundException: 
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(Unknown Source)
	at org.apache.jmeter.protocol.http.sampler.AjpSampler.setConnectionHeaders(AjpSampler.java:266)
	at org.apache.jmeter.protocol.http.sampler.AjpSampler.setupConnection(AjpSampler.java:192)
	at org.apache.jmeter.protocol.http.sampler.AjpSampler.sample(AjpSampler.java:116)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1075)
	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1064)
	at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:426)
	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255)
	at java.lang.Thread.run(Unknown Source)
Comment 1 Philippe Mouawad 2012-12-19 22:29:20 UTC
Hello,
Can you attach a simple Test plan showing the issue , also attach jmeter.log and finally tell where is the folder in which you put the file to send and where it is relative to jmeter install folder and jmx file
Comment 2 widzian 2012-12-20 09:05:09 UTC
Hello,
Unfortunately, I can't do this, but I'm suppouse the proboblem lying in AjpSampler
 263 String fn = fa.getName();
 264 File input = new File(fn);
In my opinion this should look like:
 263 String fn = fa.getPath();
 264 File input = new File(fn);
Comment 3 Philippe Mouawad 2012-12-20 12:55:51 UTC
Date: Thu Dec 20 12:55:00 2012
New Revision: 1424442

URL: http://svn.apache.org/viewvc?rev=1424442&view=rev
Log:
Bug 54326 - AjpSampler send file in post throws FileNotFoundException
Fix also file leak
Bugzilla Id: 54326

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java
    jmeter/trunk/xdocs/changes.xml
Comment 4 The ASF infrastructure team 2022-09-24 20:37:52 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3019