错误信息!A C3P0Registry mbean is already registered.

小蛋强 2011-05-06 09:43:33
2011-5-6 9:28:34 org.apache.catalina.startup.HostConfig checkResources
信息: Reloading context [/bookstore]
2011-5-6 9:28:36 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "com.sun.faces.util.ReflectionUtils$ReflectionUtilsListener" is already configured for this context. The duplicate definition has been ignored.
2011-5-6 9:28:36 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
2011-5-6 9:28:36 org.apache.catalina.core.StandardContext addApplicationListener
信息: The listener "com.sun.faces.application.WebappLifecycleListener" is already configured for this context. The duplicate definition has been ignored.
2011-5-6 9:29:02 com.mchange.v2.log.MLog <clinit>
信息: MLog clients using java 1.4+ standard logging.
2011-5-6 9:29:03 com.mchange.v2.c3p0.C3P0Registry banner
信息: Initializing c3p0-0.9.2-pre1 [built 27-May-2010 01:00:49 -0400; debug? true; trace: 10]
2011-5-6 9:29:03 com.mchange.v2.c3p0.management.ActiveManagementCoordinator attemptManageC3P0Registry
警告: 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.

使用的是c3p0数据库连接池 dao service web层都写好,运行出现这样的错误.我用的tomcat是 6.0.20
...全文
1061 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
hellolck123 2011-12-13
  • 打赏
  • 举报
回复
我也碰到这个问题,不知道如何是好
tfish2014 2011-05-06
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 tikkat3 的回复:]
已经解决该问题,

警告: 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……
[/Quote]
解决就是你不知觉的成长
小蛋强 2011-05-06
  • 打赏
  • 举报
回复
已经解决该问题,

警告: 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.
这个问题不影响程序运行的,原因在于我写JdbcUtils时,在静态代码块中已经初始化数据库连接池,Tomcat在启动的时候又初始化了一遍,如果要不想出现警告,则应该使用Listener来处理.

通过debug,我发现 我的提交数据(post方式)根本没有进入到相应的Servlet中,原因在于...我把判断是何种方法放在get()中,而post()内忘了写doGet(request,response);

总结:这是我写的第一个项目Demo,就出现了很多意外的问题。很沮丧!
小蛋强 2011-05-06
  • 打赏
  • 举报
回复
我重新把Tomcat换掉了,不行。 Server.xml文件没错.我看了.
ak47zhoujun123 2011-05-06
  • 打赏
  • 举报
回复

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

C3P04egistry 没有用过 但是你这里的警告好像是说在你之前部署的项目中使用到了,在删除部署项目时忘记删除数据源,所以现在启动时,会有多个数据源,而又的没有关闭导致的,检查下你的server.xml中的配置,将之前的数据源删除

81,095

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧