-->
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.  [ 2 posts ] 
Author Message
 Post subject: Shutdown JBoss not cleanly
PostPosted: Thu Aug 19, 2010 5:23 am 
Newbie

Joined: Thu Feb 18, 2010 8:56 am
Posts: 4
Hi,
I deployed my application in JBoss. Everything works well, until JBoss shutdown not cleanly.
I am using JBoss: version 5.1.0 and its build-in Hibernate 3.3.1.GA. Additionally because of using c3p0 ConnectionPool, I use also the c3p0-0.9.1.jar and hibernate-c3p0-3.3.1.GA.jar. They are added in my application libs folder.
When I stop JBoss, I became the Warning:
Code:
2010-08-19 10:14:55,515 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (JBoss Shutdown Hook) Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/localhost-test09' from JNDI name 'java:jdbc/localhost-test09'
2010-08-19 10:14:55,515 INFO  [org.jboss.jpa.deployment.PersistenceUnitDeployment] (JBoss Shutdown Hook) Stopping persistence unit persistence.unit:unitName=EingangsDB.ear/EingangsDB.war#http://www.destatis.de/database/idbtestapp1l/mysql/test14
2010-08-19 10:14:55,515 INFO  [org.hibernate.impl.SessionFactoryImpl] (JBoss Shutdown Hook) closing
2010-08-19 10:14:55,625 INFO  [org.hibernate.impl.SessionFactoryObjectFactory] (JBoss Shutdown Hook) Unbinding factory from JNDI name: persistence.unit:unitName=EingangsDB.ear/EingangsDB.war#http://www.destatis.de/database/idbtestapp1l/mysql/test14
2010-08-19 10:14:55,640 INFO  [org.hibernate.util.NamingHelper] (JBoss Shutdown Hook) JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
2010-08-19 10:14:55,640 WARN  [org.hibernate.impl.SessionFactoryObjectFactory] (JBoss Shutdown Hook) Could not unbind factory from JNDI
javax.naming.NameNotFoundException:  not bound
   at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
   at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
   at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
   at org.jnp.server.NamingServer.unbind(NamingServer.java:315)
   at org.jnp.server.NamingServer.unbind(NamingServer.java:318)
   at org.jnp.server.NamingServer.unbind(NamingServer.java:318)
   at org.jnp.interfaces.NamingContext.unbind(NamingContext.java:871)
   at org.jnp.interfaces.NamingContext.unbind(NamingContext.java:854)
   at javax.naming.InitialContext.unbind(InitialContext.java:416)
   at org.hibernate.impl.SessionFactoryObjectFactory.removeInstance(SessionFactoryObjectFactory.java:139)
   at org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:846)
   at org.hibernate.ejb.EntityManagerFactoryImpl.close(EntityManagerFactoryImpl.java:46)
   at org.jboss.jpa.deployment.ManagedEntityManagerFactory.destroy(ManagedEntityManagerFactory.java:93)
   at org.jboss.jpa.deployment.PersistenceUnitDeployment.stop(PersistenceUnitDeployment.java:333)
   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:597)
   at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
   at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
   at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
   at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
   at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
   at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
   at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
   at org.jboss.kernel.plugins.dependency.LifecycleAction.uninstallActionInternal(LifecycleAction.java:249)
   at org.jboss.kernel.plugins.dependency.InstallsAwareAction.uninstallAction(InstallsAwareAction.java:157)
   at org.jboss.kernel.plugins.dependency.InstallsAwareAction.uninstallAction(InstallsAwareAction.java:42)
   at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleUninstallAction(SimpleControllerContextAction.java:79)
   at org.jboss.dependency.plugins.action.AccessControllerContextAction.uninstall(AccessControllerContextAction.java:131)
   at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58)
   at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
   at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1664)
   at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1275)
   at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1179)
   at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1234)
   at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1179)
   at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1234)
   at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1179)
   at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1234)
   at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:827)
   at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
   at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
   at org.jboss.system.ServiceController.stop(ServiceController.java:510)
   at org.jboss.system.microcontainer.jmx.ServiceControllerStartStopLifecycleCallback.uninstall(ServiceControllerStartStopLifecycleCallback.java:52)
   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:597)
   at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
   at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
   at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
   at org.jboss.beans.info.plugins.AbstractBeanInfo.invoke(AbstractBeanInfo.java:300)
   at org.jboss.kernel.plugins.dependency.AbstractKernelControllerContext.invoke(AbstractKernelControllerContext.java:286)
   at org.jboss.dependency.plugins.AbstractLifecycleCallbackItem.uninstall(AbstractLifecycleCallbackItem.java:112)
   at org.jboss.dependency.plugins.AbstractController.handleLifecycleCallbacks(AbstractController.java:1570)
   at org.jboss.dependency.plugins.AbstractController.handleUninstallLifecycleCallbacks(AbstractController.java:1546)
   at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1273)
   at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1179)
   at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:655)
   at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:568)
   at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.undeploy(BeanMetaDataDeployer.java:153)
   at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.undeploy(BeanMetaDataDeployer.java:51)
   at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalUndeploy(AbstractSimpleRealDeployer.java:69)
   at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:112)
   at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:196)
   at org.jboss.deployers.plugins.deployers.DeployersImpl.doUndeploy(DeployersImpl.java:1469)
   at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1376)
   at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1369)
   at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1331)
   at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
   at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1664)
   at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1275)
   at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:827)
   at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
   at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:694)
   at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679)
   at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
   at org.jboss.system.server.profileservice.repository.ProfileDeployAction.uninstall(ProfileDeployAction.java:95)
   at org.jboss.system.server.profileservice.repository.AbstractProfileAction.uninstall(AbstractProfileAction.java:70)
   at org.jboss.system.server.profileservice.repository.AbstractProfileService.uninstall(AbstractProfileService.java:375)
   at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
   at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1664)
   at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1275)
   at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1179)
   at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1234)
   at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:827)
   at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
   at org.jboss.system.server.profileservice.repository.AbstractProfileService.deactivateProfile(AbstractProfileService.java:402)
   at org.jboss.system.server.profileservice.ProfileServiceBootstrap.deactivateProfiles(ProfileServiceBootstrap.java:388)
   at org.jboss.system.server.profileservice.ProfileServiceBootstrap.shutdown(ProfileServiceBootstrap.java:345)
   at org.jboss.bootstrap.AbstractServerImpl.shutdownServer(AbstractServerImpl.java:571)
   at org.jboss.bootstrap.AbstractServerImpl$ShutdownHook.run(AbstractServerImpl.java:909)

Do you face the same problem or have any Solution?


Top
 Profile  
 
 Post subject: Re: Shutdown JBoss not cleanly
PostPosted: Thu Aug 19, 2010 4:50 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
the datasources in JBoss are pooled already, you shouldn't use c3p0 when deploying in a container as the latter provides many nice improvements, one of them is stopping the pool at the right time, which is the issue you're dealing with.
Look for the datasource configuration documentation of the application server to tune the pool size and behaviour.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.