Link to home
Start Free TrialLog in
Avatar of Manish
ManishFlag for India

asked on

java.lang.LinkageError: loader constraint violation

I am getting following exception while deploying application on jetty server using maven.(mvn -o jetty:run -u)

java.lang.LinkageError: loader constraint violation: loader (instance of org/mortbay/jetty/webapp/WebAppClassLoader) previously initiated loading for a different type with name "javax/management/MBeanServer"

How to resolve this.?
/manish
Avatar of Mick Barry
Mick Barry
Flag of Australia image

that means two classes of the same name are loaded inconsistently.

great explanation of it here
http://frankkieviet.blogspot.com/2009/03/javalanglinkageerror-loader-constraint.html
Avatar of Manish

ASKER

Sorry I am not able to open above link.
Some imp part can you paste?
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Check if you have a jmx.jar within your application as well as in Jetty. Remove yours and test...
Avatar of Manish

ASKER

No, I didnt find jmx jar in our application.
Avatar of Manish

ASKER

Thanks.