-
Feb 26th, 2011, 09:04 PM
#1
java.lang.LinkageError: Class javax/management/MBeanServer violates loader constraint
Hello. I've started a new grails project and switched on the POM dependency resolution in the BuildConfig. When I try to do a grails run-app I get this stack trace:
Running Grails application..
java.lang.LinkageError: Class javax/management/MBeanServer violates loader constraints
at javax.management.MBeanServerBuilder.newMBeanServer Delegate(MBeanServerBuilder.java:49)
at javax.management.MBeanServerFactory.newMBeanServer (MBeanServerFactory.java:308)
at javax.management.MBeanServerFactory.createMBeanSer ver(MBeanServerFactory.java:219)
at javax.management.MBeanServerFactory.createMBeanSer ver(MBeanServerFactory.java:180)
at java.lang.management.ManagementFactory.getPlatform MBeanServer(ManagementFactory.java:512)
at org.grails.tomcat.TomcatServer.start(TomcatServer. groovy:212)
at grails.web.container.EmbeddableServer$start.call(U nknown Source)
...
Server failed to start: java.lang.LinkageError: Class javax/management/MBeanServer violates loader constraints
From what I've researched it looks like one of the dependencies I added is pulling in a conflicting version of jmxri or another jar that includes javax.management.MBeanServer. I tried adding an exclusion on jmxri to those new dependencies but that doesn't get rid of the exception. When I run a grails dependency-report it shows me the list of who uses jmxri. But it doesn't show jmxri being evicted. I don't fully understand how the tomcat plugin is working, which may be part of my problem. Anyone got any advice on troubleshooting this further? Any way to find out where the conflict is?
Best regards.
-
Feb 27th, 2011, 09:57 AM
#2
Using grails run-war seems to work so far as an alternative. It doesn't have the nice features that run-app does, where it detects and runs changes in real time, but it gets around the classpath collision. I was browsing around in the tomcat grails plugin jars and saw that it included some javax packages, but not javax.management in particular. I assume that's where the collision is.
-
Mar 9th, 2011, 05:06 AM
#3
If jmxri is still appearing as a dependency, then the exclusion is obviously not working. What depends on it? What does your BuildConfig.groovy look like?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules