javajmetercxfcontent-typejbossfuse

Uncoherent behaviour of CXF in JMeter tests


I have a problem with Apache JMeter testing Fuse in my company computer: I'm working with Java 7, JBoss Fuse 6.1.1 and JMEter 3.0 (and 3.2).

I have a set of test where

  1. I send an HTTP Request;
  2. The deployed application read the request, by the path of the HTTP Request;
  3. It realizes that I'm calling a stub file in XML;
  4. The application read the correct file in the stub directory;
  5. The application follows the business logic.

My surprise is that this process works correctly in the notebooks of mine and of a my colleague, but in the company computer it doesn't work.

In my company computer the process arrives at the second to last step, at the last step I receive this error:

ID: 1 Response-Code: 500

Content-Type: text/plain

Headers: {/*some stuff/}

Payload: No message body writer has been found for response class AnyBusinessProCessResultImpl.

the class AnyBusinessProCessResultImpl is a Java Bean created by other files (like a DSL) not modifiable by me.

Reading this question, the error likes to be born by marshalling/unmarshalling or an uncorrect use of Jackson, then it could be need to coding the fix in source code and deploy the new version of the artifact.

But this version of the artifact runs correctly in our notebooks,then I think it's a problem of JMeter or Fuse (that are the same in the 3 workstation). The configuration is the same in the 3 workstations, the main difference is I have not any admin priviledge in company computer (I'm working in a virtual machine), in my notebook I have, but I suppose sending/receiving HTTP Request in Windows 7 workstation works on user space, without any admin priviledge.

Another idea is a problem of the loading the libraries in the correct order: maybe in the company computer the libraries / modules OSGI of Fuse, but it's seem a surmise in too much low level.

I noticed that the only difference is in the header in the payload of the response: in company computer it lacks the header about the content-type

Content-Type: text/plain
 
Headers: {/**some stuff*/} 

when in the notebooks it looks like

Content-Type: text/xml
 
Headers: {blabla, content-type="text/xml", blabla} 

but, again, I don't understand the differences between the same configuration in the workstations.

Do you have another suggest or idea to investigate, please?


Solution

  • Your AnyBusinessProCessResultImpl doesn't belong to JMeter, it is something custom, most probably it's a some form of a Java Class which is being used for generating the request body.

    You need to cross-check the contents of the following folders:

    and the values of the following properties

    Assuming that you will have the same set of Java libraries under JMeter Classpath - you will be able to get the same behaviour.

    The easiest way is just copying the JMeter installation from one of your colleagues machines to your machine/VM.

    Also be aware that according to 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article you should always be using the latest version of JMeter so consider upgrading to JMeter 5.1.1 (or whatever is the latest stable JMeter version available at JMeter Downloads page) on next available opportunity.