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 7908743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:05:06+00:00 2026-06-03T12:05:06+00:00

I am using the Apache HttpClient libs to handle my communication with an API.

  • 0

I am using the Apache HttpClient libs to handle my communication with an API. All of my code compiles and runs without error when I unit test the exploded code. However, when I JAR my source and test the code in a isolated integration test I get this error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logmanager/Logger$AttachmentKey
    at org.slf4j.impl.Slf4jLoggerFactory.<clinit>(Slf4jLoggerFactory.java:31)
    at org.slf4j.impl.StaticLoggerBinder.getLoggerFactory(StaticLoggerBinder.java:33)
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:240)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:208)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:645)
    at org.apache.http.impl.client.AbstractHttpClient.<init>(AbstractHttpClient.java:159)
    at org.apache.http.impl.client.DefaultHttpClient.<init>(DefaultHttpClient.java:178)
    at opart.api.client.trasnsport.Transport.get(Transport.java:81)
    at opart.api.client.dao.objects.ObjectsDao.getInterestingObjects(ObjectsDao.java:70)
    at opart.api.client.OpartApiClient.getInterestingObjects(OpartApiClient.java:79)
    at ApiTest.interesting(ApiTest.java:32)
    at ApiTest.main(ApiTest.java:21)
Caused by: java.lang.ClassNotFoundException: org.jboss.logmanager.Logger$AttachmentKey
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
    ... 14 more

When I try to instantiate a DefaultHttpClient object thusly:

DefaultHttpClient defaultHttpClient = new DefaultHttpClient();

The libs I have included in my JAR are:

  • guava-r09.jar
  • commons-logging-1.1.1.jar
  • httpclient-4.1.2.jar
  • httpcore-4.1.2.jar
  • gson-1.7.1.jar

Any ideas as to why it is trying to reference JBoss?

  • 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-03T12:05:08+00:00Added an answer on June 3, 2026 at 12:05 pm

    The solution I found was to use the zipfileset ant target which safely explodes the contents of the JARchives inside the root of the uber JAR.

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

Sidebar

Related Questions

I am using Apache HTTPClient 4 to connect to twitter's streaming api with default
I'm using Apache HttpClient to connect with a WS. All works fine but when
I'm using apache HttpClient to post several files to server. Here's the code: public
I'm using Apache HttpClient 3.x for contacting a Big IP that will then redirect
I am trying to connect to a secure server using Apache Commons HttpClient 3.1
I am using apache's common httpclient library. Is it possible to make HTTP request
I am trying to familiarize myself with the Apache HttpClient by using Vogella's tutorial
Using Apache 2.2 and PHP 5, what's the best way to run PHP without
I am using Apache HttpClient to upload a file through MultipartEntity, I need to
I'm using Apache commons HTTPClient with Apache Axis 1.5 and I'm trying to log

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.