Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9135985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:53:37+00:00 2026-06-17T08:53:37+00:00

I could create a jira issue using the rest client API, but i wasn’t

  • 0

I could create a jira issue using the rest client API, but i wasn’t able to attach the screeshot/attachment to the exsiting JIRA issue. Would be really helpful if anyone could provide a solution which would be really appreciated.

I just wrote the below code snippet for attaching a jpeg file to the existing JIRA Issue. But then i experienced “Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpConnectionManager"

Code Snippet :-

private static String addAttachment(String attachmentfilepath) throws URISyntaxException, FileNotFoundException{

    final java.net.URI jiraServerUri = new java.net.URI("https://oliveits.atlassian.net");
    FileInputStream fileStreamPath = new FileInputStream(attachmentfilenamepath);
    JerseyJiraRestClientFactory factory = new JerseyJiraRestClientFactory();
    NullProgressMonitor pm = new NullProgressMonitor();
    System.out.println("Server Url  :"+jiraServerUri);
    JiraRestClient restClient = factory.createWithBasicHttpAuthentication(jiraServerUri,"mobileqa","MobileQA1234");
    Issue issue1 = restClient.getIssueClient().getIssue(newKey, pm);
    final java.net.URI AttachmentUri = new java.net.URI(jiraServerUri+"/rest/api/2/issue/"+newKey+"/attachments");
    System.out.println("URI    :"+issue1.getAttachmentsUri());
    //restClient.getIssueClient().addAttachment(pm,issue1.getAttachmentsUri(), fileStreamPath , imageName);
    restClient.getIssueClient().addAttachment(pm, AttachmentUri, fileStreamPath, imageName);
    return attachmentfilepath;
}

Exception:-

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/httpclient/HttpConnectionManager
at com.atlassian.jira.rest.client.internal.jersey.JerseyJiraRestClientFactory.create(JerseyJiraRestClientFactory.java:34)
at com.atlassian.jira.rest.client.internal.jersey.JerseyJiraRestClientFactory.createWithBasicHttpAuthentication(JerseyJiraRestClientFactory.java:39)
at com.jtricks.JTricksRESTClient.addAttachment(JTricksRESTClient.java:157)
at com.jtricks.JTricksRESTClient.main(JTricksRESTClient.java:101)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.HttpConnectionManager
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 4 more

Just added the missing jar files to the classpath. But I’m getting an exception as mentioned below.

Exception Msg-1: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java class com.sun.jersey.multipart.MultiPart, and Java type class com.sun.jersey.multipart.MultiPart, and MIME media type multipart/form-data; boundary=Boundary_1_18541827_1358346116249 was not found

Exception Msg-2: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java class com.sun.jersey.multipart.MultiPart, and Java type class com.sun.jersey.multipart.MultiPart, and MIME media type multipart/form-data; boundary=Boundary_1_18541827_1358346116249 was not found

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:53:38+00:00Added an answer on June 17, 2026 at 8:53 am

    You issue comes from inability to find org.apache.commons.httpclient.HttpConnectionManager class. Look for commons-httpclient JAR in your classpath.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How could I create embedded objects in an MS office document using Python? I
I am using Google Checkout and I could like to create an absolute URL
I could create two ajax requests, but I'm wondering if there is an easy
I could create an ASP.NET ListBox with horizontal scroll bar using the following code
I recently wanted to see if I could create an excel spreadsheet using c#
Is there any way we could create a folder on google drive using PHP?
I could create multiple wiki with '+new' link, but after creating it, there is
I was using pycurl to transfer files over ftp in python. I could create
Someone on IRC told me I could create objective c objects directly from plist
I am wondering how I could create a custom data type to use within

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.