-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: A C3P0Registry mbean is already registered
PostPosted: Thu Jul 10, 2008 3:42 pm 
Newbie

Joined: Sun Nov 26, 2006 12:53 pm
Posts: 13
Hello everybody.
I'm using Hibernate and C3P0 in my Content Management System.
I have installed 4 instances of the CMS to mantain 4 web sites. The java under each application is obiously the same while the static files and the db (mysql) are differentiated for every instance.

Under Tomcat, when I start the server, I'm receiving this warning at the startup of every app but the first, so from the second app to the last:

Code:
com.mchange.v2.c3p0.management.ActiveManagementCoordinator|WARN - 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.


Since only the first app doesn't cast this warning it is obvious that the next instances try to create their C3P0Registry and C3P0 complains about it.

The awful drawback of the problem is that the applications crash since memory leak...

I've tried to google the problem but I cannot find any good answer to configure my applications or C3P0 or Hibernate or Tomcat to work properly...

I feel that the problem has a very simple solution but I cannot find it, does anyone of you have any idea?

thank you in advance
bluedog


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 04, 2008 4:06 pm 
Newbie

Joined: Thu Sep 04, 2008 4:03 pm
Posts: 2
Hello,
I'm having a similar problem, and I was wondering if you ever came upon a solution. Thanks for any advice!
-Evan


Top
 Profile  
 
 Post subject: solution
PostPosted: Fri Sep 05, 2008 6:09 am 
Newbie

Joined: Sun Nov 26, 2006 12:53 pm
Posts: 13
To avoid the creation of multiple instances of C3P0Registry, just add this line at your c3p0.properties file:

com.mchange.v2.c3p0.management.ManagementCoordinator=com.mchange.v2.c3p0.management.NullManagementCoordinator

if you are experiencing memory leak problems, however, this won't resolve the situation. In my post I supposed that the crashes I had were a direct effetct of the wrong management of C3P0, but it turned not to be the real issue.

hope it helps
cheers


Top
 Profile  
 
 Post subject: thanks
PostPosted: Fri Sep 05, 2008 9:38 am 
Newbie

Joined: Thu Sep 04, 2008 4:03 pm
Posts: 2
thanks so much for your quick reply. I do also have a memory leak, but I think I'm on the path to figuring it out. But it's good to know how to fix this error message, and it helps to isolate that it is not the cause of my other problems. Thanks again for you help!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.