During the Setup Wizard, Crowd errors with "Transaction is already completed - do not call commit or rollback more than once per transaction"

Still need help?

The Atlassian Community is here for you.

Ask the community

Diagnosis

While going through the setup wizard. Crowd fails with an error showing:

Transaction is already completed - do not call commit or rollback more than once per transaction

Looking over logs, the following errors are shown:

2011-06-13 09:53:48,244 http-8095-1 INFO [atlassian.xwork.interceptors.TransactionalInvocation] Invoking rollback for transaction on action '/console/setup/defaultadministrator.action (DefaultAdministrator.default())' due to throwable: org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
	at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:636)
        ...
Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
        ...
Caused by: java.sql.BatchUpdateException: Duplicate entry '2-CROWD-0' for key 'PRIMARY'
	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2024)
	at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1449)
	...
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '2-CROWD-0' for key 'PRIMARY'
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        ...
2011-06-13 09:53:48,250 http-8095-1 ERROR [atlassian.xwork.interceptors.TransactionalInvocation] Action /console/setup/defaultadministrator.action (DefaultAdministrator.default()) is already completed and can not be committed again.
2011-06-13 09:53:48,251 http-8095-1 ERROR [[Catalina].[localhost].[/crowd].[default]] Servlet.service() for servlet default threw exception
org.springframework.transaction.IllegalTransactionStateException: Transaction is already completed - do not call commit or rollback more than once per transaction
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:795)
	at com.atlassian.xwork.interceptors.TransactionalInvocation.commitOrRollbackTransaction(TransactionalInvocation.java:93)
	at com.atlassian.xwork.interceptors.TransactionalInvocation.invokeInTransaction(TransactionalInvocation.java:63)
	at com.atlassian.xwork.interceptors.XWorkTransactionInterceptor.intercept(XWorkTransactionInterceptor.java:56)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
	at com.atlassian.crowd.console.interceptor.SetupCheckInterceptor.intercept(SetupCheckInterceptor.java:29)

Cause

Database is set to be case insensitive.

Resolution

Set database to be case sensitive.

Last modified on Jun 14, 2011

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.