[jboss-user] [JCA/JBoss] - ConnectionManager Unbound before the dependant wars undeploy

samshan03 do-not-reply at jboss.com
Fri Nov 28 03:05:52 EST 2008


We have registered a session listener in portal-server.war/WEB-INF/web.xml to capture session events of user's authenicated session. On session destroy of user's authenticated session, we are updating some application tables using datasource from Connection Factory through JNDI. The problem is while stopping the server, Connection Factory are getting unbounded before portal-server.war is getting undeployed. So in the session destroy when it tries to get connection it gives the following exception



  | 11:44:48,317 INFO  [Server] JBoss SHUTDOWN: Undeploying all packages
  | 11:44:48,317 INFO  [TomcatDeployer] undeploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
  | 11:44:48,363 INFO  [TomcatDeployer] undeploy, ctxPath=/TestSUNJSF, warUrl=.../tmp/deploy/tmp55534TestSUNJSF-exp.war/
  | 11:44:48,832 INFO  [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=EformDS' from JNDI name 'java:EformDS'
  | 
  | 11:44:48,895 ERROR [LayoutServiceImpl] Couldn't find the default layout named:generic
  | 11:44:48,895 ERROR [LayoutServiceImpl] Couldn't find the default layout named:generic
  | 11:44:48,895 ERROR [LayoutServiceImpl] Couldn't find the default layout named:generic
  | 11:44:48,910 INFO  [JCRCMS] Stopping JCR CMS
  | 11:44:48,926 INFO  [JackrabbitJCRService] Shutting down repository
  | 11:44:49,082 INFO  [JackrabbitJCRService] Repository shut down successfully
  | 11:44:49,082 INFO  [SessionFactoryImpl] closing
  | 11:44:49,098 INFO  [SessionFactoryObjectFactory] Unbinding factory from JNDI name: java:/portal/cms/CMSSessionFactory
  | 11:44:49,098 INFO  [NamingHelper] JNDI InitialContext properties:{}
  | 11:44:49,098 INFO  [SessionFactoryObjectFactory] Unbound factory from JNDI name: java:/portal/cms/CMSSessionFactory
  | 11:44:49,098 INFO  [SessionFactoryImpl] closing
  | 11:44:49,113 INFO  [SessionFactoryObjectFactory] Unbinding factory from JNDI name: java:/portal/workflow/WorkFlowSessionFactory
  | 11:44:49,113 INFO  [NamingHelper] JNDI InitialContext properties:{}
  | 11:44:49,113 INFO  [SessionFactoryObjectFactory] Unbound factory from JNDI name: java:/portal/workflow/WorkFlowSessionFactory
  | 11:44:49,129 WARN  [DelegatingURLFactoryService] Unregistration of URL factory org.jboss.portal.core.model.portal.PortalObjectURLFactory at 1be8e6c failed because
  |  it is not registered
  | 11:44:49,145 INFO  [SessionFactoryImpl] closing
  | 11:44:49,145 INFO  [SessionFactoryObjectFactory] Unbinding factory from JNDI name: java:/portal/IdentitySessionFactory
  | 11:44:49,145 INFO  [NamingHelper] JNDI InitialContext properties:{}
  | 11:44:49,145 INFO  [SessionFactoryObjectFactory] Unbound factory from JNDI name: java:/portal/IdentitySessionFactory
  | 11:44:49,160 WARN  [ServerDeployer] Unknown setup url by main deployer provided by factory ObjectDeploymentFactory : file:/D:/EForm3/Software/jboss -4.2.3.GA/s
  | erver/default/deploy/jboss-portal.sar/conf/data/default-object.xml
  | 11:44:49,176 INFO  [SessionFactoryImpl] closing
  | 11:44:49,176 INFO  [SessionFactoryObjectFactory] Unbinding factory from JNDI name: java:/portal/InstanceSessionFactory
  | 11:44:49,176 INFO  [NamingHelper] JNDI InitialContext properties:{}
  | 11:44:49,192 INFO  [SessionFactoryObjectFactory] Unbound factory from JNDI name: java:/portal/InstanceSessionFactory
  | 11:44:49,192 WARN  [DelegatingURLFactoryService] Unregistration of URL factory org.jboss.portal.core.model.portal.PortalObjectURLFactory at 15c46dd failed because
  |  it is not registered
  | 11:44:49,207 INFO  [SessionFactoryImpl] closing
  | 11:44:49,207 INFO  [SessionFactoryObjectFactory] Unbinding factory from JNDI name: java:/portal/PortalObjectSessionFactory
  | 11:44:49,207 INFO  [NamingHelper] JNDI InitialContext properties:{}
  | 11:44:49,223 INFO  [SessionFactoryObjectFactory] Unbound factory from JNDI name: java:/portal/PortalObjectSessionFactory
  | 11:44:49,223 INFO  [SessionFactoryImpl] closing
  | 11:44:49,223 INFO  [SessionFactoryObjectFactory] Unbinding factory from JNDI name: java:/portal/PortletSessionFactory
  | 11:44:49,238 INFO  [NamingHelper] JNDI InitialContext properties:{}
  | 11:44:49,238 INFO  [SessionFactoryObjectFactory] Unbound factory from JNDI name: java:/portal/PortletSessionFactory
  | 11:44:49,238 INFO  [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=PortalDS' from JNDI name 'java:PortalD
  | S'
  | 11:44:49,301 INFO  [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' from JNDI name 'java:Jms
  | XA'
  | 11:44:49,317 INFO  [testTopic] Unbinding JNDI name: topic/testTopic
  | 11:44:49,332 INFO  [securedTopic] Unbinding JNDI name: topic/securedTopic
  | 11:44:49,332 INFO  [testDurableTopic] Unbinding JNDI name: topic/testDurableTopic
  | 11:44:49,332 INFO  [testQueue] Unbinding JNDI name: queue/testQueue
  | 11:44:49,332 INFO  [A] Unbinding JNDI name: queue/A
  | 11:44:49,348 INFO  [B] Unbinding JNDI name: queue/B
  | 11:44:49,348 INFO  [C] Unbinding JNDI name: queue/C
  | 11:44:49,348 INFO  [D] Unbinding JNDI name: queue/D
  | 11:44:49,348 INFO  [ex] Unbinding JNDI name: queue/ex
  | 11:44:49,363 INFO  [DLQ] Unbinding JNDI name: queue/DLQ
  | 11:44:49,363 INFO  [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' from JNDI name 'java:Defaul
  | tDS'
  | 11:44:51,020 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null
  | 11:44:51,020 ERROR [JDBCExceptionReporter] You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested thro
  | wable: (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)
  | 11:44:51,035 ERROR [CommandExecutorThread] org.hibernate.exception.GenericJDBCException: Cannot open connection
  | 11:44:51,098 INFO  [HypersonicDatabase] Database standalone closed clean
  | 11:44:51,129 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.
  | 11:44:51,129 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED paused.
  | 11:44:51,129 INFO  [SimpleThreadPool] There are still 37 worker threads active. See javadoc runInThread(Runnable) for a possible explanation
  | 11:44:51,129 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete.
  | 11:44:51,192 INFO  [MailService] Mail service 'java:/Mail' removed from JNDI
  | 11:44:51,192 INFO  [TomcatDeployer] undeploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
  | 11:44:51,285 INFO  [Http11Protocol] Pausing Coyote HTTP/1.1 on http-127.0.0.1-8080
  | 11:44:51,285 INFO  [AjpProtocol] Pausing Coyote AJP/1.3 on ajp-127.0.0.1-8009
  | 11:44:52,301 INFO  [StandardService] Stopping service jboss.web
  | Caused by: org.jboss.util.NestedSQLException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested t
  | hrowable: (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)
  |         at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
  |         at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
  |         at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
  |         at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78)
  |         ... 14 more
  | Caused by: javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.
  |         at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:393)
  |         at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
  |         at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
  |         ... 17 more
  | 11:44:52,754 INFO  [Http11Protocol] Stopping Coyote HTTP/1.1 on http-127.0.0.1-8080
  | 11:44:52,754 INFO  [AjpProtocol] Stopping Coyote AJP/1.3 on ajp-127.0.0.1-8009
  | 11:44:52,770 INFO  [TomcatDeployer] undeploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
  | 11:44:52,770 INFO  [TomcatDeployer] undeploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
  | 11:44:52,770 INFO  [TomcatDeployer] undeploy, ctxPath=/portal-admin, warUrl=.../deploy/jboss-portal.sar/portal-admin.sar/portal-admin.war/
  | 11:44:52,770 INFO  [TomcatDeployer] undeploy, ctxPath=/portal-cms, warUrl=.../deploy/jboss-portal.sar/portal-cms.sar/portal-cms.war/
  | 11:44:52,785 INFO  [TomcatDeployer] undeploy, ctxPath=/portal-identity, warUrl=.../deploy/jboss-portal.sar/portal-identity.sar/portal-identity.war/
  | 11:44:52,785 INFO  [TomcatDeployer] undeploy, ctxPath=/portal-users-samples, warUrl=.../deploy/jboss-portal.sar/samples/portal-users-samples.sar/portal-users-s
  | amples.war/
  | 11:44:52,801 INFO  [TomcatDeployer] undeploy, ctxPath=/portal-ajax, warUrl=.../deploy/jboss-portal.sar/portal-ajax.war/
  | 11:44:52,801 INFO  [TomcatDeployer] undeploy, ctxPath=/portal-core, warUrl=.../deploy/jboss-portal.sar/portal-core.war/
  | 11:44:52,801 INFO  [TomcatDeployer] undeploy, ctxPath=/portal, warUrl=.../deploy/jboss-portal.sar/portal-server.war/
  | 11:44:52,817 INFO  [TomcatDeployer] undeploy, ctxPath=/portal-widget-netvibes, warUrl=.../deploy/jboss-portal.sar/portal-widget-netvibes.war/
  | 11:44:52,817 INFO  [TomcatDeployer] undeploy, ctxPath=/portal-widget, warUrl=.../deploy/jboss-portal.sar/portal-widget.war/
  | 11:44:52,817 INFO  [TomcatDeployer] undeploy, ctxPath=/portal-jsp-samples, warUrl=.../deploy/jboss-portal.sar/samples/portal-jsp-samples.war/
  | 11:44:52,817 INFO  [TomcatDeployer] undeploy, ctxPath=/portal-news-samples, warUrl=.../deploy/jboss-portal.sar/samples/portal-news-samples.war/
  | 11:44:52,832 INFO  [TomcatDeployer] undeploy, ctxPath=/portal-weather-samples, warUrl=.../deploy/jboss-portal.sar/samples/portal-weather-samples.war/
  | 11:44:52,832 INFO  [TomcatDeployer] undeploy, ctxPath=/jbossws, warUrl=.../deploy/jbossws.sar/jbossws-context.war/
  | 11:44:52,848 INFO  [TomcatDeployer] undeploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
  | 11:44:53,223 ERROR [PortletDiscoveryService] Unable to remove all the Portlet management MBeans
  | 11:44:53,238 WARN  [DelegatingURLFactoryService] Unregistration of URL factory org.jboss.portal.core.model.instance.InstanceURLFactory at 1669976 failed because i
  | t is not registered
  | 11:44:53,238 WARN  [DelegatingURLFactoryService] Unregistration of URL factory org.jboss.portal.core.cms.CMSObjectURLFactory at e53ece failed because it is not re
  | gistered
  | 11:44:53,254 WARN  [DelegatingURLFactoryService] Unregistration of URL factory org.jboss.portal.core.model.instance.InstanceURLFactory at 7e4f0c failed because it
  |  is not registered
  | 11:44:53,785 WARN  [DelegatingURLFactoryService] Unregistration of URL factory org.jboss.portal.core.controller.command.mapper.SignOutURLFactory at 11b8a4c failed
  |  because it is not registered
  | 11:44:54,801 INFO  [TransactionManagerService] Stopping recovery manager
  | 11:44:54,910 INFO  [Server] Shutdown complete
  | Shutdown complete
  | Halting VM
  | 

Any solutions? How to change the sequence of undployement or How to specify undeployment of Connection Factory as the last one?

We are using the following softwares
Jboss Version: jboss-4.2.3GA
Jboss portal version: jboss-portal-2.6.6GA
Oracle: 9i
ORM: iBATIS 2.3.0
JDK1.5 update16

Thanks a ton for helping us. 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192938#4192938

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192938



More information about the jboss-user mailing list