This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Machine Learning with R: Expert techniques for predictive modeling and have Brett Lantz on-line!
See this thread for details.
Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

JMeter and AJP

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm feeling stupid again (these last two weeks have been tough this way), so I hope someone can help me out.

After a frustrating day or two, I've decided maybe I really should focus on load testing my tomcat *application*, which I can protect by configuring IIS correctly once I know the appropriate limits, rather than load testing the whole domain controller - IIS - tomcat chain, which corporate IT has to worry about protecting from the outside world and *shouldn't* have to worry about protecting from employees logged into the corporate network.

So, I have tomcat running on an internal server with an AJP connector. I want to convert my existing JMeter Test Plan from using HTTPRequestSamplers to using AJPSamplers. Should be easy, right?

But if I create a new Thread Group from scratch in the JMeter UI and add an AJPSampler to it, JMeter doesn't seem to run it at all.
And if I hand-edit the Test Plan file using Notepad++, changing the sampler element name and the class attributes of the element for an existing sampler, the sampler fails with a null response.

In both cases, I'm getting the following in my JMeter log:

2011/03/23 14:59:22 ERROR - jmeter.threads.JMeterThread: java.lang.StringIndexOutOfBoundsException: String index out of range: 41099
at java.lang.String.checkBounds(Unknown Source)
at java.lang.String.<init>(Unknown Source)
at org.apache.jmeter.protocol.http.sampler.AjpSampler.getString(AjpSampler.java:479)
at org.apache.jmeter.protocol.http.sampler.AjpSampler.parseHeaders(AjpSampler.java:423)
at org.apache.jmeter.protocol.http.sampler.AjpSampler.handshake(AjpSampler.java:372)
at org.apache.jmeter.protocol.http.sampler.AjpSampler.execute(AjpSampler.java:361)
at org.apache.jmeter.protocol.http.sampler.AjpSampler.sample(AjpSampler.java:106)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1021)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1007)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:290)
at java.lang.Thread.run(Unknown Source)

What am I doing wrong? This is JMeter 2.3.2 r665936.

Any help appreciated.

Thanks,

Rebeccah
 
Rebeccah Quevedo-Prastein
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Turns out this is a bug in JMeter's AJPClient, and there is a year-old patch that evidently hasn't been merged into JMeter yet. So at least in this respect it's not my fault.

Rebeccah
 
This looks like a job for .... legal tender! It says so right in this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!