[richfaces-issues] [JBoss JIRA] (RF-11905) showcase - shutdown of the JBoss AS with showcase deployed throws DB error

Juraj Huska (JIRA) jira-events at lists.jboss.org
Fri Jan 27 07:05:49 EST 2012


    [ https://issues.jboss.org/browse/RF-11905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662401#comment-12662401 ] 

Juraj Huska commented on RF-11905:
----------------------------------

I have successfully tried what was described in the AS7-2045 as workaround, with positive effects. So the problem can be solved in these ways:

*1.* use proposed workaround, which means alter default datasource configuration of JBoss AS 7, which means to add to documentation, that this error is thrown if it is not set....

*2.* do not use datasource for connecting to database but use proper setting of connection, and then the workaround can be applied to showcase configuration instead of container one

*3.* change hibernate.hbm2ddl.auto from create-drop to only create, which takes care of that exception, since it will not try to drop database schema after shutting down of AS, but instead will create new schema in each deploy

Personally, I like the most the option 3.
                
> showcase - shutdown of the JBoss AS with showcase deployed throws DB error
> --------------------------------------------------------------------------
>
>                 Key: RF-11905
>                 URL: https://issues.jboss.org/browse/RF-11905
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: showcase
>    Affects Versions: 4.1.0.Final
>         Environment: container: JBoss AS 7.1.0.CR1b, 7.0.2.Final
> app: showcase 4.2.0-SNAPSHOT
>            Reporter: Juraj Huska
>            Assignee: Juraj Huska
>            Priority: Minor
>
> When shutting down JBoss AS 7 with showcase deployed, then the DB error is thrown:
> {code}
> 16:09:52,334 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] HHH000231: Schema export unsuccessful: org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-161]
> 	at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
> 	at org.h2.message.DbException.get(DbException.java:169)
> 	at org.h2.message.DbException.get(DbException.java:146)
> 	at org.h2.message.DbException.get(DbException.java:135)
> 	at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1394)
> 	at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1369)
> 	at org.h2.jdbc.JdbcConnection.createStatement(JdbcConnection.java:191)
> 	at org.jboss.jca.adapters.jdbc.WrappedConnection.createStatement(WrappedConnection.java:301)
> 	at org.hibernate.tool.hbm2ddl.DatabaseExporter.<init>(DatabaseExporter.java:54) [hibernate-core-4.0.0.Final.jar:4.0.0.Final]
> 	at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:368) [hibernate-core-4.0.0.Final.jar:4.0.0.Final]
> 	at org.hibernate.tool.hbm2ddl.SchemaExport.drop(SchemaExport.java:319) [hibernate-core-4.0.0.Final.jar:4.0.0.Final]
> 	at org.hibernate.tool.hbm2ddl.SchemaExport.drop(SchemaExport.java:315) [hibernate-core-4.0.0.Final.jar:4.0.0.Final]
> 	at org.hibernate.internal.SessionFactoryImpl.close(SessionFactoryImpl.java:1305) [hibernate-core-4.0.0.Final.jar:4.0.0.Final]
> 	at org.hibernate.ejb.EntityManagerFactoryImpl.close(EntityManagerFactoryImpl.java:126) [hibernate-entitymanager-4.0.0.Final.jar:4.0.0.Final]
> 	at org.richfaces.demo.arrangeablemodel.PersistenceService.destroy(PersistenceService.java:159) [classes:]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]
> 	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]
> 	at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130) [jboss-as-ee-7.1.0.CR1b.jar:7.1.0.CR1b]
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> 	at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> 	at org.jboss.as.ee.component.ManagedReferenceReleaseInterceptorFactory$ManagedReferenceReleaseInterceptor.processInvocation(ManagedReferenceReleaseInterceptorFactory.java:90) [jboss-as-ee-7.1.0.CR1b.jar:7.1.0.CR1b]
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> 	at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> 	at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.0.CR1b.jar:7.1.0.CR1b]
> 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
> 	at org.jboss.as.ee.component.BasicComponentInstance.destroy(BasicComponentInstance.java:122) [jboss-as-ee-7.1.0.CR1b.jar:7.1.0.CR1b]
> 	at org.jboss.as.web.deployment.component.WebComponentInstantiator$2.release(WebComponentInstantiator.java:102) [jboss-as-web-7.1.0.CR1b.jar:7.1.0.CR1b]
> 	at org.jboss.as.web.deployment.WebInjectionContainer.destroyInstance(WebInjectionContainer.java:67) [jboss-as-web-7.1.0.CR1b.jar:7.1.0.CR1b]
> 	at org.jboss.as.web.deployment.jsf.JsfInjectionProvider.invokePreDestroy(JsfInjectionProvider.java:56) [jboss-as-web-7.1.0.CR1b.jar:7.1.0.CR1b]
> 	at com.sun.faces.mgbean.BeanBuilder.destroy(BeanBuilder.java:116) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
> 	at com.sun.faces.mgbean.BeanManager.destroy(BeanManager.java:283) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
> 	at com.sun.faces.application.WebappLifecycleListener.handleAttributeEvent(WebappLifecycleListener.java:314) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
> 	at com.sun.faces.application.WebappLifecycleListener.contextDestroyed(WebappLifecycleListener.java:368) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
> 	at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:308) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
> 	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3489) [jbossweb-7.0.7.Final.jar:]
> 	at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3999) [jbossweb-7.0.7.Final.jar:]
> 	at org.jboss.as.web.deployment.WebDeploymentService.stop(WebDeploymentService.java:96) [jboss-as-web-7.1.0.CR1b.jar:7.1.0.CR1b]
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1909)
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1872)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]
> 	at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list