1

I am trying to get some junit tests to run on jenkins through jmeter for some GAE cost testing. It has been a real headache to say the least. As far as what is going on right now, I have fought my way up to getting this issue, which I hope will be the last. Some key points:

  1. I have no issues what-so-ever when running it locally through the GUI
  2. The follow stack trace error is taken from the log via running it on Jenkins through a shell script that calls a java program that runs it

Here is the stack trace:

2016/07/12 08:53:13 ERROR - jmeter.threads.JMeterThread: Test failed! java.lang.NoSuchFieldError: INSTANCE
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.setupClient(HTTPHC4Impl.java:774)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:327)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1146)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1135)
    at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:465)
    at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:410)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:241)
    at java.lang.Thread.run(Thread.java:745)

2016/07/12 08:53:13 INFO  - jmeter.threads.JMeterThread: Thread finished: jp@gc - Ultimate Thread Group 1-1 
2016/07/12 08:53:13 INFO  - jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test 
2016/07/12 08:53:13 INFO  - jmeter.reporters.Summariser: summary =      0 in 00:00:00 = ******/s Avg:     0 Min: 9223372036854775807 Max: -9223372036854775808 Err:     0 (0.00%) 
2016/07/12 08:53:23 ERROR - jmeter.JMeter: Uncaught exception:  java.lang.NumberFormatException: For input string: "******"
    at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
    at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
    at java.lang.Double.parseDouble(Double.java:538)
    at AutoTest.AutoTestUtil.CheckStats(AutoTestUtil.java:219)
    at AutoTest.AutoTestUtil.main(AutoTestUtil.java:68)
moonboy
  • 1,296
  • 4
  • 16
  • 29
  • 1
    did you check Java version and presence of all dependencies you have locally on Jenkins' Jmeter? – timbre timbre Jul 12 '16 at 20:50
  • yes, if you want i can update it with all that information? – moonboy Jul 12 '16 at 21:47
  • which version of httpclient and httpcore does lib folder has (on your machine vs jenkins jmeter? this error is coming from that dependency, but not sure why, are all files identical in both libs? – timbre timbre Jul 12 '16 at 22:30
  • 1
    here's similar issue: http://stackoverflow.com/questions/22330848/httpclient-example-exception-in-thread-main-java-lang-nosuchfielderror-inst (not the same, but can give you some clues on what to check) – timbre timbre Jul 12 '16 at 22:31
  • hmm interesting. I am going to check and see what version the jenkins server is using – moonboy Jul 12 '16 at 23:08
  • looks like there was a conflict in a dependency that the unit tests were using and jmeter. We cookin. if you make an answer ill accept it. – moonboy Jul 13 '16 at 17:15
  • Since an answer was never posted, consider making this a self-answer to help future readers and to close out the question. – Adam Jan 21 '17 at 22:11

1 Answers1

0

It can be resolved by classpath has same jars with different versions of httpcore.

Keep any one jar compatible and remove another one, applied to httpclient jar also.

Devarajan
  • 131
  • 1
  • 2
  • 12