Sending a Multipart Form Data Type from Custom Plugin (Confluence and Jira Server)

I’m attempting to create a plugin that calls an external service which needs to build a multi-part form data type request. The body will have a few parameters and a file included.

I can get everything working as expected with the exception of creating this multi-part form data. I decided to use FileDataBodyPart and FormDataMultiPart:

import com.sun.jersey.multipart.FormDataMultiPart;
import com.sun.jersey.multipart.file.FileDataBodyPart;

from either of these dependencies: (Please note, I am not using both)

 <!-- https://mvnrepository.com/artifact/com.sun.jersey.contribs/jersey-multipart-->
        <dependency>
            <groupId>com.sun.jersey.contribs</groupId>
            <artifactId>jersey-multipart</artifactId>
            <version>1.8-atlassian-1</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.sun.jersey.contribs/jersey-multipart -->
        <dependency>
            <groupId>com.sun.jersey.contribs</groupId>
            <artifactId>jersey-multipart</artifactId>
            <version>1.19.4</version>
        </dependency>

Including this one dependency results in this error as it gets to that point of the code:
com.sun.jersey.server.impl.application.RootResourceUriRules. The ResourceConfig instance does not contain any root resource classes.

There may also be a ServiceRegistrationImpl error.

Remove this code and it runs as desired (besides the fact it cannot get what I need because the request needs the data and file to be a multipart form type). I’m fine with other alternatives to creating a multipart form type as I’ve been looking for solutions - but I just don’t know which to proceed with and how far the rabbit hole is going to take me.

Also, here are the main atlassian dependencies I am using:

<!-- https://mvnrepository.com/artifact/com.atlassian.plugins.rest/atlassian-rest-common -->
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
            <version>6.0.2</version>
            <scope>provided</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.atlassian.plugins.rest/atlassian-rest-module -->
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-module</artifactId>
            <version>6.0.2</version>
            <scope>provided</scope>
        </dependency>

         <!--https://mvnrepository.com/artifact/com.atlassian.plugins.rest/com.atlassian.jersey-library-->
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>com.atlassian.jersey-library</artifactId>
            <version>6.0.2</version>
            <type>pom</type>
        </dependency>

Finally, I will be doing this on server Jira and server Confluence.

Thanks for any help you can provide!