Workbox Notification Shows Error Message When Clicked
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
When clicking the Workbox Notification icon in Confluence, an error and stack trace is thrown:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Cause
com.atlassian.activeobjects.internal.ActiveObjectsInitException: Active Objects failed to initalize for bundle com.atlassian.mywork.confluence-host-plugin
at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory$5.apply(ActiveObjectsServiceFactory.java:207)
caused by: com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library: Database: - name:MySQL - version:5.1.69 - minor version:1 - major version:5 Driver: - name:MySQL-AB JDBC Driver - version:mysql-connector-java-5.1.11 ( Revision: $
{svn.Revision} ) com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`confluence`.`AO_9412A1_USER_APP_LINK`, CONSTRAINT `fk_ao_9412a1_user_app_link_user_id` FOREIGN KEY (`USER_ID`) REFERENCES `AO_9412A1_AOUSER` (`ID`))
at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.delete(EntityManagedActiveObjects.java:135)
caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`confluence`.`AO_9412A1_USER_APP_LINK`, CONSTRAINT `fk_ao_9412a1_user_app_link_user_id` FOREIGN KEY (`USER_ID`) REFERENCES `AO_9412A1_AOUSER` (`ID`))
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Stack Trace:[hide]
com.atlassian.activeobjects.internal.ActiveObjectsInitException: Active Objects failed to initalize for bundle com.atlassian.mywork.confluence-host-plugin
at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory$5.apply(ActiveObjectsServiceFactory.java:207)
at com.atlassian.activeobjects.osgi.ActiveObjectsServiceFactory$5.apply(ActiveObjectsServiceFactory.java:187)
at com.atlassian.util.concurrent.Promises$Of$2.apply(Promises.java:259)
at com.atlassian.util.concurrent.Promises$Of$2.apply(Promises.java:256)
at com.atlassian.util.concurrent.Promises$2.onFailure(Promises.java:162)
at com.google.common.util.concurrent.Futures$7.run(Futures.java:1074)
at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253)
at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:161)
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:146)
at com.google.common.util.concurrent.JdkFutureAdapters$ListenableFutureAdapter$1.run(JdkFutureAdapters.java:151)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
Database:
- name:MySQL
- version:5.1.69
- minor version:1
- major version:5
Driver:
- name:MySQL-AB JDBC Driver
- version:mysql-connector-java-5.1.11 ( Revision: ${svn.Revision})
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`confluence`.`AO_9412A1_USER_APP_LINK`, CONSTRAINT `fk_ao_9412a1_user_app_link_user_id` FOREIGN KEY (`USER_ID`) REFERENCES `AO_9412A1_AOUSER` (`ID`))
at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.delete(EntityManagedActiveObjects.java:135)
at com.atlassian.mywork.host.upgrade.v8.UserIdMigrationUpgradeTask$2.apply(UserIdMigrationUpgradeTask.java:53)
at com.atlassian.mywork.host.upgrade.v8.UserIdMigrationUpgradeTask$2.apply(UserIdMigrationUpgradeTask.java:46)
at com.atlassian.mywork.host.upgrade.v8.UserIdMigrationUpgradeTask.update(UserIdMigrationUpgradeTask.java:110)
...
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`confluence`.`AO_9412A1_USER_APP_LINK`, CONSTRAINT `fk_ao_9412a1_user_app_link_user_id` FOREIGN KEY (`USER_ID`) REFERENCES `AO_9412A1_AOUSER` (`ID`))
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.Util.getInstance(Util.java:381)
...
The following appears in the atlassian-confluence.log
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2014-05-09 18:28:12,708 ERROR [http-8090-46] [mywork.host.rest.ExceptionLogger] toResponse Exception thrown from resource
-- url: /rest/mywork/latest/status/notification/count | userName: Dave_shanker | referer: http://confluence.miniclip.com:8090/plugins/servlet/notifications-miniview
com.atlassian.activeobjects.internal.ActiveObjectsInitException: Active Objects failed to initalize for bundle com.atlassian.mywork.confluence-host-plugin
...
Caused by: com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
Database:
- name:MySQL
- version:5.1.69
- minor version:1
- major version:5
Driver:
- name:MySQL-AB JDBC Driver
- version:mysql-connector-java-5.1.11 ( Revision: ${svn.Revision} )
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`confluence`.`AO_9412A1_USER_APP_LINK`, CONSTRAINT `fk_ao_9412a1_user_app_link_user_id` FOREIGN KEY (`USER_ID`) REFERENCES `AO_9412A1_AOUSER` (`ID`))
Cause
The issue occurs after upgrading to Confluence 5.3 and above. This is a bug and is being tracked here: CONFSERVER-32014 - UserIdMigrationUpgradeTask should delete from UserApplicationLink
Workaround
Please see the workaround provided in the bug report mentioned above. You will have to manually purge the invalid rows from the AO_9412A1_USER_APP_LINK
table.
Was this helpful?