Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8347937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:32:08+00:00 2026-06-09T07:32:08+00:00

The idea is to build a sampler in JMeter that will upload a file

  • 0

The idea is to build a sampler in JMeter that will upload a file using the HTTP PUT method. I’m trying to follow the official documentation to specify the entire content body as a file with no parameter name.

  • What should happen: The file gets uploaded and the server returns 201: created
  • What actually happens:

java.lang.NullPointerException: charsetName
at java.lang.String.<init>(Unknown Source)
at java.lang.String.<init>(Unknown Source)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sendPutData(HTTPHC4Impl.java:1067)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:274)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1054)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1043)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:416)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:271)
at java.lang.Thread.run(Unknown Source)

This seems to indicate that JMeter has a problem with filling out the body of a request. I can get rid of this error by specifying a parameter with the request, but I want the entire body to be the photo data. Here’s the CURL line of what I want accomplished:

curl -u testuser:testpass "http://localhost:8080/photo" -T photo.jpg -H "content-type:image/jpeg"

I’ve tried setting the content-encoding to UTF-8 as I’ve seen in one post, but that changed nothing.

I’m running Java 1.7.0 on Windows 7 x64. Nothing of interest gets generated in jmeter.log, and wireshark tells me that JMeter isn’t sending the request.

Any ideas? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:32:09+00:00Added an answer on June 9, 2026 at 7:32 am

    Turns out it was a bug that the nice folks at JMeter were able to fix very quickly: https://issues.apache.org/bugzilla/show_bug.cgi?id=52897

    Using the nightly build solved my problem, and by now it has probably made it into the release.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

we are trying to build the Haskell-MaybeMonad sample from http://www.haskell.org/all_about_monads/html/maybemonad.html in F#. The idea
I'm trying to grasp the idea with build scripts, nightly builds and technologies like
Trying to build my project with ANT in idea 10 and I get a
I have an idea for an app that I would like to build which
I'm using intelliJ IDEA version 9.0.1 build #IU 93.94 with JDK 1.6.0_17. This error
I'm trying to build my own template tags. I have no idea why I
I'm trying to build a simple application to download and play a music file.
I'm trying to build a class which will initalise its self either by passing
I'm trying to build this iPhone sample: http://trac.pjsip.org/repos/wiki/Getting-Started/iPhone but I'm having trouble since I
I'm just trying to build an old project of mine using cuda 5.0 preview.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.