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

  • Home
  • SEARCH
  • 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 7521889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:21:37+00:00 2026-05-30T02:21:37+00:00

I am adding a dependency to my Grails Project which brings in both commons-logging

  • 0

I am adding a dependency to my Grails Project which brings in both commons-logging and log4j as transitive dependencies. When I run my app I then get an error

Error Error executing script RunApp: Could not initialize class
org.apache.log4j.LogManager (NOTE: Stack trace has been filtered. Use --verbose to see 
entiretrace.) java.lang.NoClassDefFoundError: Could not initialize class 
org.apache.log4j.LogManager

I tried to remove the commons-logging dependency as per this link by excluding the commons-logging. But it never helped. I see that commons-logging is not a direct dependency of the dependency I am adding. So if do

    runtime ('com.company.i18n:i18n:1.3.4')
    { 
        excludes 'commons-logging'
    }

does it exclude all the commons-logging dependencies in my dependency ? Or only the immediate ones. How do I solve this issue?

  • 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-05-30T02:21:39+00:00Added an answer on May 30, 2026 at 2:21 am

    I tried hard by excluding “log4j” from all the dependencies, but nothing worked. Finally I solved this by avoiding all the transitive dependencies and then adding what ever was necessary.

    //add necessary dependencies.
    
    runtime ('com.company.i18n:i18n:1.3.4')
    { 
        transitive = false
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm adding Google App Engine, Spring and Tiles2 to same project, for some reason
After adding ASIHTTPRequest to my project (which incidentally I've now removed) I get linking
I have been adding dependency injection to my code because it makes by code
When adding a DLL as a reference to an ASP.Net project, VS2008 adds several
When adding an EditItemTemplate of some complexity (mulitple fields in one template), and then
I tried to install google salve http://code.google.com/p/salve/ by adding following statements in the project's
I have a Grails app consisting of main app and its local module linked
I am adding zxing to my project. I first copied the iphone folder to
I have a .NET project which references another assembly that is built outside of
Hi I am developing a C libtool library. I have an issue adding dependency

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.