Unable to create a decision with the Decision Blueprint

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

  • Unable to create a decision with stakeholders declared. The process hangs when you click Create.

The following appears in the atlassian-confluence.log:

2013-12-06 13:18:33,598 ERROR [http-443-3] [atlassian.event.internal.AsynchronousAbleEventDispatcher] run There was an exception thrown trying to dispatch event 'com.atlassian.confluence.plugins.mentions.api.ConfluenceMentionEvent@1a78ef8a' from the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.mywork.providers.confluence.ConfluenceEventListener.onConfluenceMentionEvent(com.atlassian.confluence.plugins.mentions.api.ConfluenceMentionEvent) throws java.lang.Exception, listener=com.atlassian.mywork.providers.confluence.ConfluenceEventListener@75cf84ab}'
...
Caused by: com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
Database:
	- name:MySQL
	- version:5.5.25-log
	- minor version:5
	- major version:5
Driver:
	- name:MySQL-AB JDBC Driver
	- version:mysql-connector-java-5.1.11 ( Revision: ${svn.Revision} )
java.sql.SQLException: Field 'ID' doesn't have a default value
	at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.create(EntityManagedActiveObjects.java:111)
	at com.atlassian.activeobjects.osgi.DelegatingActiveObjects.create(DelegatingActiveObjects.java:129)
	at sun.reflect.GeneratedMethodAccessor674.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy1560.create(Unknown Source)
	at com.atlassian.mywork.host.dao.ao.AONotificationDao.create(AONotificationDao.java:55)
	at com.atlassian.mywork.host.dao.ao.AONotificationDao.create(AONotificationDao.java:50)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.atlassian.activeobjects.tx.TransactionalProxy.invoke(TransactionalProxy.java:79)
	at com.atlassian.activeobjects.tx.TransactionalProxy.access$000(TransactionalProxy.java:18)
	at com.atlassian.activeobjects.tx.TransactionalProxy$1.doInTransaction(TransactionalProxy.java:63)
	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25)
	at com.atlassian.sal.spring.component.SpringHostContextAccessor$1.doInTransaction(SpringHostContextAccessor.java:88)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
	at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:82)
	at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)

Diagnosis

  • Process hangs when the Create button is clicked.
  • Occurs with a MySQL database

Inspect the schema of the AO_9412A1_AONOTIFICATION table. Next, describe the table and look for the ID column. If you're facing this error, the column should be missing the "auto_increment" modifier, which you can confirm by checking the extra column and seeing if it's empty or otherwise missing auto_increment:

describe AO_9412A1_AONOTIFICATION;

+---------+-------------+------+---------+---------+-------+
| Field   | Type        | Null | Key     | Default | Extra |
+---------+-------------+------+---------+---------+-------+
| ...     | ...         | ...  | ...     | ...     | ...   |
| id      | bigint(20)  | NO   | PRIMARY | NULL    |       |  
| ...     | ...         | ...  | ...     | ...     | ...   |
+---------+-------------+------+---------+---------+-------+

Cause

The ID column (primary key) of the AO_9412A1_AONOTIFICATION table is set without the auto_increment modifier. This can happen during an upgrade if you dump your Confluence tables to a file using mysqldump and used the --skip-opt setting, as this generates a SQL script that does not include the auto_increment modifier in create table statements. Subsequently, when you re-import your Confluence data via MySQL the tables will be reconstructed and will lack the auto_increment modifier. 

e.g.
mysqldump --skip-opt -p confluence > confluence.sql
mysql -p confluence < confluence.sql 

(info) When using mysqldump, do not use the --skip-opt flag, OR supplement it with --create-opt if you must use --skip-opt.

Resolution

 

  • You will need to modify the ID column of the AO_9412A1_AONOTIFICATION table with the auto_increment modifier, which you can do with the following script:

 

ALTER TABLE AO_9412A1_AONOTIFICATION MODIFY COLUMN ID BIGINT auto_increment;
Last modified on Mar 30, 2016

Was this helpful?

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