留言板
MBean already exists when deploying multiple portal servers in same Tomcat
Franklin Phan,修改在14 年前。
MBean already exists when deploying multiple portal servers in same Tomcat
Regular Member 帖子: 137 加入日期: 09-3-10 最近的帖子
Inside a pre-existing Tomcat 5.5.16, I deployed one installation of Liferay 5.2.2 under the context /liferay. Then I tried to deploy a second installation under a different context, /portal. This caused an javax.management.InstanceAlreadyExistsException:
I'm unfamiliar with MBeans. Can't I have more than one in the same server?
2009-05-12 15:46:55,021 [main] ERROR [ContextLoader:215] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateMBeanExporter' defined in class path resource [META-INF/hibernate-spring.xml]: Invocation of init method failed; nested exception is org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [com.liferay.portal.dao.orm.hibernate.jmx.HibernateStatisticsService@1eb2ae7] with key 'Hibernate:name=statistics'; nested exception is javax.management.InstanceAlreadyExistsException: Hibernate:name=statistics
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1112)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [com.liferay.portal.dao.orm.hibernate.jmx.HibernateStatisticsService@1eb2ae7] with key 'Hibernate:name=statistics'; nested exception is javax.management.InstanceAlreadyExistsException: Hibernate:name=statistics
at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:625)
at org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExporter.java:541)
at org.springframework.jmx.export.MBeanExporter.afterPropertiesSet(MBeanExporter.java:428)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 40 more
I'm unfamiliar with MBeans. Can't I have more than one in the same server?
Herve Costa Ferreira,修改在14 年前。
RE: MBean already exists when deploying multiple portal servers in same Tom
New Member 帖子: 9 加入日期: 09-6-25 最近的帖子
Hi,
I'm using WebSphere and I have the same problem.
The workaround is stop/start the server
Regards
Hervé
I'm using WebSphere and I have the same problem.
The workaround is stop/start the server
Regards
Hervé
Franklin Phan,修改在14 年前。
RE: MBean already exists when deploying multiple portal servers in same Tom
Regular Member 帖子: 137 加入日期: 09-3-10 最近的帖子
That does not work.
Jeff Zhuk,修改在14 年前。
RE: MBean already exists when deploying multiple portal servers in same Tom
Junior Member 帖子: 64 加入日期: 09-9-9 最近的帖子
Franklin, Herve,
Did you solve the problem?
Anyone else?
If so, please share.
Thank you!
Jeff
Did you solve the problem?
Anyone else?
If so, please share.
Thank you!
Jeff
Jeff Zhuk,修改在14 年前。
RE: MBean already exists when deploying multiple portal servers in same Tom
Junior Member 帖子: 64 加入日期: 09-9-9 最近的帖子
In my case, the problem was resolved by cleaning the Tomcat/lib and Tomcat/lib/ext libraries.
Jeff
Jeff