All issues

When we remove a @Unique constraint, Active Objects is not able to drop the constraint
AO-3489
MSSQL driverName doesn't match in JdbcDriverDatabaseProviderFactory
AO-701
Database type returns UNKNOWN on PostgreSQL database
AO-692
We have lifecycle problems again in AO in JIRA 7.0
AO-667
AO listens on wrong event publisher
AO-666
"Import site" failed on trial confluence
AO-649
During AO Entity instantiation, AO does not apply a correct filtering of Column when accessing the Metadata
AO-562
MS SQL Server reserved keyword "MERGE" is not quoted
AO-543
Use AO Specific Names For Cluster Locks
AO-536
Jira startup error on Postgres
AO-526
Active Objects tables do not get created on import in Confluence
AO-397
It should be possible to do an restore without the plugin being loaded
AO-394
ActiveObjects lock after several minutes in c3p0 pool
AO-388
AO will drop schema columns if a plugin is downgraded
AO-355
Failing GreenHopper TMP build - NPE in MSSQL tests
AO-301
0.19.1.1 causes plugin problems in Studio
AO-291
AO 0.19.1 frequently kills JIRA with OSGi errors
AO-290
Postgres, exception when migrating: relation already exists
AO-268
Error in Postgres predicate - AO adds quotes around some column names
AO-261
Connection leak in ActiveObjectsTableReader
AO-225
Tables or columns MUST not be dropped implicitly
AO-220
Oracle: Dropping sequence fails in case of long table name.
AO-217
AO does not seem to be able to insert rows into a table with Autogenerated ID on Oracle11g
AO-210
Since upgrading to AO 0.17.3 the func tests are hanging due to DB Pool exhaustion.
AO-203
Non-default MSSQL schemas not properly supported, only works with dbo schema
AO-202
Tables are not always cleared on restore
AO-178
Getting a PSQLException when using PostgreSQL DB
AO-161
Getting SQLException when trying to load a self referential AO Entity class
AO-147
JIRA backup can't write null column values
AO-141
Error importing 'long' types with AO
AO-128
Prevent calls to EntityManager#migrate to read/access data other than the plugin's
AO-63
The ActiveObjects migrate (on EntityManager) method call must happen in a transaction
AO-61
Get active objects to pass its current tests
AO-12
Create Oracle 18/19 tests for Active Objects
AO-3496
Bitbucket branch created via Jira but no commits appear
AO-3494
Removing non-null constraint in a column with a pre-existing default value breaks MSSQL upgrade task
AO-3493
Universal Importer
AO-3492
Access to rapidView / board.id in jiraReports not functioning
AO-3474
Deadlock when inserting entities on MSSQL
AO-3468
Table name and field name comparison in index equality checks should be case insensitive
AO-3380
JIRA Subversion plugin queries
AO-3319
CLONE - Creating Multiple Generic AppLinks causes the outgoing settings to be "lost"
AO-705
CLONE - Creating Multiple Generic AppLinks causes the outgoing settings to be "lost"
AO-704
Cannot set null value in AO on MSSQL
AO-699
After schema changes ActiveObjects yields exception "cached plan must not change result type" with PostgreSQL - JDBC driver 9.4
AO-697
Open AO database importer packages to other plugins
AO-689
Distinct query on an entity having an unlimited length text field results in exception on MS SQL Server
AO-687
Set up MS JDBC 4 driver tests for AO and AO Plugin
AO-686
MS SQL Server exception when setting fields of unlimited length to null using MS JDBC driver
AO-681
ActiveObjects fails after adding a new column in PostgreSQL
AO-680
issue 1 of 674

When we remove a @Unique constraint, Active Objects is not able to drop the constraint

Description

We removed @Unique constraints from some of our tables and some Exceptions were thrown in the log file.

We have several MSSQL cases with the following log.

1 2019-05-22 14:27:48,555 active-objects-init-JiraTenantImpl{id='system'}-0 ERROR anonymous [n.java.ao.sql] Exception executing SQL update <ALTER TABLE jiraschema.AO_3C6513_XPORTER_TEMPLATE ALTER COLUMN FILENAME NVARCHAR(255) NOT NULL>2019-05-22 14:27:48,555 active-objects-init-JiraTenantImpl{id='system'}-0 ERROR anonymous [n.java.ao.sql] Exception executing SQL update <ALTER TABLE jiraschema.AO_3C6513_XPORTER_TEMPLATE ALTER COLUMN FILENAME NVARCHAR(255) NOT NULL>com.microsoft.sqlserver.jdbc.SQLServerException: The object 'U_AO_3C6513_XPORTER980075700' is dependent on column 'FILENAME'. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:258) at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1535) at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:845) at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:752) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7151) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2478) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:219) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:199) at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(SQLServerStatement.java:680) at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234) at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234) at net.java.ao.DatabaseProvider.executeUpdate(DatabaseProvider.java:2245) at net.java.ao.DatabaseProvider.executeUpdateForAction(DatabaseProvider.java:2301) at net.java.ao.DatabaseProvider.executeUpdatesForActions(DatabaseProvider.java:2273) at net.java.ao.schema.SchemaGenerator.migrate(SchemaGenerator.java:91) at net.java.ao.EntityManager.migrate(EntityManager.java:128) at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:51) at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:77) at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:72) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21) at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:50) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy465.doInTransaction(Unknown Source) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:131) at com.sun.proxy.$Proxy465.doInTransaction(Unknown Source) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) at com.sun.proxy.$Proxy1035.execute(Unknown Source) at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory.create(AbstractActiveObjectsFactory.java:72) at com.atlassian.activeobjects.internal.DelegatingActiveObjectsFactory.create(DelegatingActiveObjectsFactory.java:32) at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:102) at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:97) at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)2019-05-22 14:27:48,571 active-objects-init-JiraTenantImpl{id='system'}-0 WARN anonymous [n.j.ao.db.MsJdbcSQLServerDatabaseProvider] Error in schema creation: The object 'U_AO_3C6513_XPORTER980075700' is dependent on column 'FILENAME'.; attempting to roll back last partially generated table2019-05-22 14:27:48,571 active-objects-init-JiraTenantImpl{id='system'}-0 WARN anonymous [c.a.activeobjects.osgi.TenantAwareActiveObjects] bundle [com.xpandit.plugins.jiraxporter] failed to create ActiveObjectscom.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:Database: - name:Microsoft SQL Server - version:11.00.2100 - minor version:0 - major version:11Driver: - name:Microsoft JDBC Driver 6.2 for SQL Server - version:6.2.1.0

 

and one Oracle SQL scenario with the error:

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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 2019-06-27 14:36:53,848 active-objects-init-JiraTenantImpl{id='system'}-0 WARN anonymous [n.j.ao.db.OracleDatabaseProvider] Error in schema creation: ORA-02443: Cannot drop constraint - nonexistent constraint ; attempting to roll back last partially generated table 2019-06-27 14:36:53,990 active-objects-init-JiraTenantImpl{id='system'}-0 WARN anonymous [c.a.activeobjects.osgi.TenantAwareActiveObjects] bundle [com.xpandit.plugins.jiraxporter] failed to create ActiveObjects com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library: Database: - name:Oracle - version:Oracle Database 11g Release 11.2.0.3.0 - 64bit Production - minor version:2 - major version:11 Driver: - name:Oracle JDBC driver - version:12.2.0.1.0 java.sql.SQLException: ORA-02443: Cannot drop constraint - nonexistent constraint at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:53) at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:77) at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory$1.doInTransaction(AbstractActiveObjectsFactory.java:72) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21) at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:50) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy336.doInTransaction(Unknown Source) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:131) at com.sun.proxy.$Proxy336.doInTransaction(Unknown Source) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) at com.sun.proxy.$Proxy1031.execute(Unknown Source) at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory.create(AbstractActiveObjectsFactory.java:72) at com.atlassian.activeobjects.internal.DelegatingActiveObjectsFactory.create(DelegatingActiveObjectsFactory.java:32) at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:102) at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:97) at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.sql.SQLException: ORA-02443: Cannot drop constraint - nonexistent constraint at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494) at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:213) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:37) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:896) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1119) at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1661) at oracle.jdbc.driver.OracleStatement.executeLargeUpdate(OracleStatement.java:1626) at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1613) at oracle.jdbc.driver.OracleStatementWrapper.executeUpdate(OracleStatementWrapper.java:282) at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234) at org.apache.commons.dbcp2.DelegatingStatement.executeUpdate(DelegatingStatement.java:234) at net.java.ao.DatabaseProvider.executeUpdate(DatabaseProvider.java:2245) at net.java.ao.DatabaseProvider.executeUpdateForAction(DatabaseProvider.java:2301) at net.java.ao.DatabaseProvider.executeUpdatesForActions(DatabaseProvider.java:2273) at net.java.ao.schema.SchemaGenerator.migrate(SchemaGenerator.java:91) at net.java.ao.EntityManager.migrate(EntityManager.java:128) at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:51) ... 44 more Caused by: Error : 2443, Position : 57, Sql = ALTER TABLE "AO_3C6513_XPORTER_TEMPLATE" DROP CONSTRAINT U_AO_3C6513_XPORTER1963927984, OriginalSql = ALTER TABLE "AO_3C6513_XPORTER_TEMPLATE" DROP CONSTRAINT U_AO_3C6513_XPORTER1963927984, Error Msg = ORA-02443: Cannot drop constraint - nonexistent constraint at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498) ... 65 more

 

The only change in our plugin was removing the @Unique annotation.
Our plugin active objects dependency:

1 2 3 4 5 6 <dependency> <groupId>com.atlassian.activeobjects</groupId> <artifactId>activeobjects-plugin</artifactId> <version>1.0.0</version> <scope>provided</scope> </dependency>

What can we do fix this issue?

Environment

None

Testing Notes

Add notes...

Status

Assignee

Unassigned

Reporter

Hugo Freixo

Labels

None

Add-on Type

Server

Team

None

CC

None

Risk factor

None

QA Kickoff Status

None

QA Demo Status

None

Components

Priority

Blocker
Configure