Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven 2 德比在接近时被卡住了?_Maven 2_Derby_Surefire - Fatal编程技术网

Maven 2 德比在接近时被卡住了?

Maven 2 德比在接近时被卡住了?,maven-2,derby,surefire,Maven 2,Derby,Surefire,我有使用derby的单元测试(在maven中) 在测试运行结束时,会有一个很长的暂停,暂停前会有这些日志消息 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 IN

我有使用derby的单元测试(在maven中)

在测试运行结束时,会有一个很长的暂停,暂停前会有这些日志消息

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 SessionFactory 2009年11月16日晚上8:30:31 org.hibernate.impl.SessionFactoryImpl close 信息:关闭 2009年11月16日晚上8:30:31 org.hibernate.tool.hbm2ddl.SchemaExport执行 信息:正在运行hbm2ddl架构导出 2009年11月16日晚上8:30:31 org.hibernate.tool.hbm2ddl.SchemaExport执行 信息:将生成的架构导出到数据库 休眠配置:

<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>

org.hibernate.dialogue.derbydialogue
创建下降
假的
引用自:

<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"/>

com/basistech/configdb/dao/gazetter.hbm.xml
com/basistech/configdb/dao/filegazetter.hbm.xml
com/basistech/configdb/dao/Regexpset.hbm.xml
com/basistech/configdb/dao/Redactjoiner.hbm.xml
com/basistech/configdb/dao/Misc.hbm.xml

最后,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>

org.codehaus.mojo
hibernate3 maven插件
2.2
编码基因
hbm2java
生成源
hbm2java
src/main/hibernate/codegen-hibernate.xml

您可以尝试使用
hibernate.connection.autocommit=true
?它帮助我解决了Maven Hibernate3插件的一些问题(请参阅)。但不确定它是否相关。

您可以尝试使用
hibernate.connection.autocommit=true
?它帮助我解决了Maven Hibernate3插件的一些问题(请参阅)。不确定它是否相关。

我不确定,这是否仍然会产生影响,但我只是想让你知道,我在不久前设计了一个derby maven插件,旨在能够针对derby数据库运行测试。您可以看看GitHub项目。

我不确定这是否仍然会产生影响,但我只是想让您知道,我刚才设计了一个derby maven插件,目的是能够针对derby数据库运行测试。您可以看看GitHub项目。

这里没有足够的细节来给出答案。请提供您的hibernate和/或hibernate3 maven插件配置。那会有帮助的。看起来除了暂停1分钟之外,一切都很好。为什么要在最后额外序列化模式?这里没有足够的细节来给出答案。请提供您的hibernate和/或hibernate3 maven插件配置。那会有帮助的。看起来除了暂停1分钟之外,一切都很好。为什么要在最后额外序列化模式呢?