Derby gets stuck closing?
Posted
by bmargulies
on Stack Overflow
See other posts from Stack Overflow
or by bmargulies
Published on 2009-11-17T01:32:57Z
Indexed on
2010/05/26
22:01 UTC
Read the original article
Hit count: 346
I've got unit tests (in maven) that use derby.
At the end of the test run, there is a very long pause, with these log messages before the pause.
INFO: Closing Hibernate SessionFactory Nov 16, 2009 8:30:31 PM org.hibernate.impl.SessionFactoryImpl close INFO: closing Nov 16, 2009 8:30:31 PM org.hibernate.tool.hbm2ddl.SchemaExport execute INFO: Running hbm2ddl schema export Nov 16, 2009 8:30:31 PM org.hibernate.tool.hbm2ddl.SchemaExport execute INFO: exporting generated schema to database
Hibernate config:
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.DerbyDialect</property>
<property name="hbm2ddl.auto">create-drop</property>
<property name="show_sql">false</property>
</session-factory>
</hibernate-configuration>
referenced from:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<!-- data source elsewhere -->
<property name="dataSource" ref="dataSource" />
<property name="mappingResources">
<list>
<value>com/basistech/configdb/dao/Gazetteer.hbm.xml</value>
<value>com/basistech/configdb/dao/FileGazetteer.hbm.xml</value>
<value>com/basistech/configdb/dao/Regexpset.hbm.xml</value>
<value>com/basistech/configdb/dao/Redactjoiner.hbm.xml</value>
<value>com/basistech/configdb/dao/Misc.hbm.xml</value>
</list>
</property>
<property name="configLocation" value="classpath:com/basistech/configdb/dao/hibernate.xml"/>
and finally maven:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>codegen</id>
<goals>
<goal>hbm2java</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<components>
<component>
<name>hbm2java</name>
</component>
</components>
<componentProperties>
<configurationfile>src/main/hibernate/codegen-hibernate.xml</configurationfile>
</componentProperties>
</configuration>
</execution>
</executions>
</plugin>
© Stack Overflow or respective owner