Forum Discussion

mantrobus's avatar
mantrobus
New Contributor
4 years ago

Running tests on Ubuntu server errors out while windows client works

The backstory is we're migrating our tests over to an Ubuntu system (20.04) so we can hook them up to Jenkins and automate running them. We are using the Jenkins Plugin: ReadyApi Functional Testing Plugin to run our tests

 

However upon running one of our tests we end up getting an error (I've included the full stack trace as an attachment)

java.lang.ClassCastException: class com.sun.mail.handlers.text_plain cannot be cast to class jakarta.activation.DataContentHandler

 

The test that is failing is calling an API that allows us to upload a file to the system via formdata, in this test in particular we are using uploading a PNG file with content-type application/octet-stream, not text/plain as suggested by the error. So It doesn't sound like this issue is being caused by our test being poorly configured.

 

We've had no other issues with any of our other tests thus far.

 

Any idea as how to fix this issue?

3 Replies

    • mantrobus's avatar
      mantrobus
      New Contributor

      So I had looked at that and quickly dismissed it because this is a fairly fresh/focused server and we really don't have jars anywhere else on the system. This was under the assumption that all of the Jars ReadyAPI has in their /lib folder work nicely together however that doesn't seem to be the case...

       

      After removing mailapi-1.4.3.jar from ReadyAPI.../lib my tests now automagically work. I'm hesitant to call this a solution and am unsure why this is an issue on only ubuntu and not windows as well seeing as how the jar lives on both systems.

      • nmrao's avatar
        nmrao
        Champion Level 3
        Ok.
        Glad to know that you could get it to work though it is expressed not elegant.