構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Daniele Poodados
javax.management.InstanceAlreadyExistsException: Hibernate:name=statistics
2011/03/26 16:40
答え

Daniele Poodados

ランク: New Member

投稿: 5

参加年月日: 2011/03/26

最近の投稿

Hey,

I'm trying to deploy liferay(6.0.5) as ROOT on an existing tomcat (v6, without any other webapps) ... I did that a several times, but now I always get the following Exception.

As you can see liferay seems to load the property files twice? Is that correct? If not, what could make this happen? I have nothing special here... Just a tomcat, mysql and liferay... Tomcat is not using the default webapps-folder for deploying webapps. But I can't imagine that this could be the reason for this kind of prob...

Thanks for ANY ideas!!

 1
 2INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
 3Loading jar:file:/srv/www/vhosts/takteins.de/tomcat/webapps/takteins.de/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
 4Loading jar:file:/srv/www/vhosts/takteins.de/tomcat/webapps/takteins.de/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
 5Loading file:/srv/www/vhosts/takteins.de/tomcat/webapps/takteins.de/webapps/ROOT/WEB-INF/classes/portal-ext.properties
 623:17:47,111 INFO  [DialectDetector:69] Determining dialect for MySQL 4
 723:17:47,222 INFO  [DialectDetector:49] Using dialect org.hibernate.dialect.MySQLDialect
 823:17:55,367 INFO  [PortalImpl:277] Global lib directory /srv/www/vhosts/takteins.de/tomcat/lib/
 923:17:55,370 INFO  [PortalImpl:297] Portal lib directory /srv/www/vhosts/takteins.de/tomcat/webapps/takteins.de/webapps/ROOT/WEB-INF/lib/
10Starting Liferay Portal Community Edition 6.0.5 CE (Bunyan / Build 6005 / August 16, 2010)
1123:18:24,249 INFO  [BaseDB:399] Database does not support case sensitive queries
1223:18:36,196 INFO  [HotDeployUtil:69] Initializing hot deploy manager 174083544
1323:18:37,386 INFO  [AutoDeployDir:105] Auto deploy scanner started for /srv/www/vhosts/takteins.de/private/www-data/takteins.de/ROOT/deploy
1423:18:37,739 INFO  [PluginPackageUtil:1109] Reloading repositories
15Loading jar:file:/srv/www/vhosts/takteins.de/tomcat/webapps/takteins.de/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
16Loading jar:file:/srv/www/vhosts/takteins.de/tomcat/webapps/takteins.de/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
17Loading file:/srv/www/vhosts/takteins.de/tomcat/webapps/takteins.de/webapps/ROOT/WEB-INF/classes/portal-ext.properties
1823:19:02,368 WARN  [ActiveManagementCoordinator:56] A C3P0Registry mbean is already registered. This probably means that an application using c3p0 was undeployed, but not all PooledDataSources were closed prior to undeployment. This may lead to resource leaks over time. Please take care to close all PooledDataSources.
1923:19:06,043 INFO  [DialectDetector:69] Determining dialect for MySQL 4
2023:19:06,206 INFO  [DialectDetector:49] Using dialect org.hibernate.dialect.MySQLDialect
2123:19:11,798 ERROR [ContextLoader:220] Context initialization failed
22org.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@4c6cea8a] with key 'Hibernate:name=statistics'; nested exception is javax.management.InstanceAlreadyExistsException: Hibernate:name=statistics
23    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
24    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
25    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
26    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
27    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
28    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
29    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
30    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:575)
31    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
32    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
33    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
34    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
35    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
36    at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:47)
37    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
38    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
39    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
40    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
41    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
42    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
43    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
44    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
45    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
46    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
47    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
48    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
49    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
50    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
51    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
52    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
53    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
54    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
55    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
56    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
57    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
58    at java.lang.reflect.Method.invoke(Method.java:597)
59    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
60    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
61Caused by: org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [com.liferay.portal.dao.orm.hibernate.jmx.HibernateStatisticsService@4c6cea8a] with key 'Hibernate:name=statistics'; nested exception is javax.management.InstanceAlreadyExistsException: Hibernate:name=statistics
62    at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:602)
63    at org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExporter.java:527)
64    at org.springframework.jmx.export.MBeanExporter.afterPropertiesSet(MBeanExporter.java:413)
65    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
66    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
67    ... 37 more
68Caused by: javax.management.InstanceAlreadyExistsException: Hibernate:name=statistics
69    at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
70    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)
71    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)
72    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
73    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
74    at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
75    at org.springframework.jmx.support.MBeanRegistrationSupport.doRegister(MBeanRegistrationSupport.java:169)
76    at org.springframework.jmx.export.MBeanExporter.registerBeanInstance(MBeanExporter.java:647)
77    at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:592)
78    ... 41 more
Mika Koivisto
RE: javax.management.InstanceAlreadyExistsException: Hibernate:name=statist
2011/03/28 11:28
答え

Mika Koivisto

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1505

参加年月日: 2006/08/07

最近の投稿

The problem is that something has already registered those Mbeans into the mbean server. Maybe the webapp is initialized twice or something like that.
Daniele Poodados
RE: javax.management.InstanceAlreadyExistsException: Hibernate:name=statist
2011/04/01 6:49
答え

Daniele Poodados

ランク: New Member

投稿: 5

参加年月日: 2011/03/26

最近の投稿

OK.. I got it. You are right. Tomcat deployed my webapps twice. Now it's working fine.

Thank you!
Ben Smart
RE: javax.management.InstanceAlreadyExistsException: Hibernate:name=statist
2012/04/09 6:17
答え

Ben Smart

ランク: Junior Member

投稿: 79

参加年月日: 2010/01/09

最近の投稿

Hi,

I am also experiencing the same problem. Can you pls tell me what settings you did so that tomcat didn't load it twice?

Thanks
Fabien Coppens
RE: javax.management.InstanceAlreadyExistsException: Hibernate:name=statist
2012/06/26 16:11
答え

Fabien Coppens

ランク: New Member

投稿: 2

参加年月日: 2012/06/26

最近の投稿

I am having the same problem on tc server (i.e. Tomcat) and I actually just posted about it here in the forum:
http://www.liferay.com/community/forums/-/message_boards/message/14587698

Can you explain how you solved the problem ? I have deployed the WAR only once under webapps/ROOT, and have no idea why it is getting loaded twice.