Fisheye Crucible upgrade fails with MySQL database
Symptoms
The following appears in the atlassian-fisheye-<date>.log
:
2013-06-04 14:35:15,131 ERROR - The Web context could not be started
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbControlFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.cenqua.crucible.hibernate.DBControlFactoryImpl]: Constructor threw exception; nested exception is com.cenqua.crucible.hibernate.CruDBException: Problem upgrading with script /usr/lib/foong/crucible/sql/MYSQL/upgrade/upgrade_81.sql: Connection.close() has already been called. Invalid operation in this state.
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:288)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
...
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.cenqua.crucible.hibernate.DBControlFactoryImpl]: Constructor threw exception; nested exception is com
.cenqua.crucible.hibernate.CruDBException: Problem upgrading with script /usr/lib/foong/crucible/sql/MYSQL/upgrade/upgrade_81.sql: Connection.close() has already been called. Invalid operation in this st
ate.
..
Caused by: com.cenqua.crucible.hibernate.CruDBException: Problem upgrading with script /usr/lib/foong/crucible/sql/MYSQL/upgrade/upgrade_81.sql: Connection.close() has already been called. Invalid operat
ion in this state.
...
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Connection.close() has already been called. Invalid operation in this state.
Cause
Due to the use of socketTimeout option in the JDBC URL, any long lasting DB statements will be interrupted with this timeout.
Workaround
Remove the socketTimeout option in the JDBC URL (FISHEYE_INST/config.xml
):
<database type="mysql">
<connection dialect="org.hibernate.dialect.MySQL5InnoDBDialect" driver="com.mysql.jdbc.Driver" jdbcurl="jdbc:mysql://localhost/crucible?useUnicode=true&characterEncoding=UTF-8&socketTimeout=60000" password="crucible" username="crucible" maxPoolSize="20" minPoolSize="5" driverSource="user"/>
</database>
Resolution
Upgrade to Fisheye/Crucible 3.0.2+ that has fixed the bug - CRUC-6503Getting issue details... STATUS
Last modified on Jul 31, 2018
Powered by Confluence and Scroll Viewport.