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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:41:25+00:00 2026-06-01T21:41:25+00:00

I am working on a Grails project that has a transitive dependency on mx4j

  • 0

I am working on a Grails project that has a transitive dependency on mx4j jar. I cannot avoid the dependency which is using the mx4j jar, and I have used this jar in the provided scope.

But whenever I run my application using grails run-app I get the following error:


Error loader constraint violation: loader (instance of ) previously initiated loading for a different type with name "javax/management/MBeanServer"
java.lang.LinkageError: loader constraint violation: loader (instance of ) previously initiated loading for a different type with name "javax/management/MBeanServer"
at javax.management.MBeanServerBuilder.newMBeanServerDelegate(MBeanServerBuilder.java:49)
at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:302)

If I remove the provided 'mx4j:mx4j:3.0.2' dependency, I get a ClassNotFoundException on an mx4j Class.

I think the internal grails tomcat is loading “javax/management/MBeanServer” class and since it is also loaded via mx4j, it is causing the above issue. Is there anyway I can resolve this issue at the grails end? I cannot avoid the mx4j dependency in my project.

  • 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-01T21:41:26+00:00Added an answer on June 1, 2026 at 9:41 pm

    I could solve it. I removed the mx4j dependency and also excluded the dependency that was bringing in mx4j dependency from the original dependency I had added. When I removed mx4j I got the same ClassNotFoundException, but I avoided the dependency which was needing it. Some how all started working 🙂

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

Sidebar

Related Questions

I have been working with a project which is using grails / hibernate with
I am working on a grails project and I have put a .jar file
I'm working on a Grails 1.0.4 project that has to be released in less
I'm working on a Grails project that is internationalized (using the .properties resource bundles),
I am working in a previously existing grails project that has some search functionality
I have been working on a project which uses Grails with Hibernate... Now the
I have been working on the project where application is using grails 1.2.2.... Now
I'm currently working on a project using netbeans 6.9 and grails 1.3. I'm trying
I'm working through the Grails In Action book and have noticed 2 instances that
I am working on a web application (using Grails) which will generate a gift

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.