I'm installing Liferay 5.1.2, bundled with Jetty Servlet Container (Lightweight application server, you might say), in a Windows XP laptop. Unfortunately these errors showed up:


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mbeanServer' defined in class path resource [META-INF/management-spring.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: when resolving method "java.lang.management.ManagementFactory.getPlatformMBeanServer()Ljavax/management/MBeanServer;" the class loader (instance of org/mortbay/http/ContextLoader) of the current class, org/springframework/jmx/support/JmxUtils, and the class loader (instance of ) for resolved class, java/lang/management/ManagementFactory, have different Class objects for the type javax/management/MBeanServer used in the signature
....
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "java.lang.management.ManagementFactory.getPlatformMBeanServer()Ljavax/management/MBeanServer;" the class loader (instance of org/mortbay/http/ContextLoader) of the current class, org/springframework/jmx/support/JmxUtils, and the class loader (instance of ) for resolved class, java/lang/management/ManagementFactory, have different Class objects for the type javax/management/MBeanServer used in the signature


I resolve this by removing mx4j.jar in \liferay-portal-jetty-5.1.2\webapps\root\WEB-INF\lib. Seems that the problem is similar to the problem in this post. The case is that the Java 6's JRE already contains javax.management.MBeanServer interface class, and conflicts with mx4j.jar which are supplied for those who still use elder JRE/JDK which doesn't contain the MBeanServer interface class.

Comments

Unknown said…
This is a great blog,this website provides very useful tips.we are going to add it to out liferay consultant and Liferayinformation blog.http://www.mpowerglobal.com/web/guest/blog so our visitors can read your news,as you are a reputable source.Thanks Andrew Marks

Popular posts from this blog

Long running process in Linux using PHP

Reverse Engineering Reptile Kernel module to Extract Authentication code

SAP System Copy Lessons Learned