Upload App from my computer Error occurs: Can?t DROP ?index_ao_c77861_aud96775159?; check that colu
Asked by Michael:

Hi, guys  
I'm now develop my plugin according to [Confluence plugin guide](https://developer.atlassian.com/server/confluence/confluence-plugin-guide). When I'm gonna to upload my plugin to Confluence Data Center 7.13.7, error occurs in *atlassian-confluence.log* . But there is nothing wrong when I do the same thing locally with the same version of Confluence (*atlassian-confluence-7.13.7-x64* ) installed on my computer. Bellow is the error stack:

==============================  
2023-03-22 12:25:29,804 WARN \[audit-broker-consumer-thread-470983346\] \[confluence.impl.hibernate.ConfluenceHibernateTransactionManager\] doRollback Performing rollback. Transactions:  
-\>\[PluginReadWriteTx\]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT (Session #1682053207)  
2023-03-22 12:25:29,805 ERROR \[audit-broker-consumer-thread-470983346\] \[atlassian.audit.broker.LoggingAuditConsumerExceptionHandler\] handle Error occurred in com.atlassian.audit.ao.consumer.DatabaseAuditConsumer@3943df83 while processing 1 events  
com.atlassian.activeobjects.internal.ActiveObjectsInitException: bundle \[com.atlassian.audit.atlassian-audit-plugin\]  
at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:95)  
at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:86)  
at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)  
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:84)  
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:68)  
at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$withRequestContext$1(VCacheRequestContextOperations.java:59)  
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)  
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
at java.base/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.7.36-txsql-log  
- minor version:7  
- major version:5  
Driver:  
- name:MySQL Connector/J  
- version:mysql-connector-java-8.0.22 (Revision: d64b664fa93e81296a377de031b8123a67e6def2)

++java.sql.SQLSyntaxErrorException: Can't DROP 'index_ao_c77861_aud96775159'; check that column/key exists++  
at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:54)  
at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory.lambda$create$0(AbstractActiveObjectsFactory.java:73)  
at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21)  
at com.atlassian.sal.spring.component.SpringHostContextAccessor.lambda$doInTransaction$0(SpringHostContextAccessor.java:70)  
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)  
at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:68)  
at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.access$001(ConfluenceSpringHostContextAccessor.java:21)  
at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.lambda$doInTransaction$3(ConfluenceSpringHostContextAccessor.java:72)  
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:84)  
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:68)  
at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.doInTransaction(ConfluenceSpringHostContextAccessor.java:72)  
at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)  
at jdk.internal.reflect.GeneratedMethodAccessor286.invoke(Unknown Source)  
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
at java.base/java.lang.reflect.Method.invoke(Unknown Source)  
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)  
at com.sun.proxy.$Proxy276.execute(Unknown Source)  
at jdk.internal.reflect.GeneratedMethodAccessor286.invoke(Unknown Source)  
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
at java.base/java.lang.reflect.Method.invoke(Unknown Source)  
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)  
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:186)  
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)  
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)  
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)  
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:186)  
at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)  
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)  
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137)  
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)  
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)  
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)  
at com.sun.proxy.$Proxy1183.execute(Unknown Source)  
at com.atlassian.activeobjects.internal.AbstractActiveObjectsFactory.create(AbstractActiveObjectsFactory.java:70)  
at com.atlassian.activeobjects.internal.DelegatingActiveObjectsFactory.create(DelegatingActiveObjectsFactory.java:32)  
at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects$1$1$1.call(TenantAwareActiveObjects.java:91)  
... 9 more  
Caused by: java.sql.SQLSyntaxErrorException: Can't DROP 'index_ao_c77861_aud96775159'; check that column/key exists  
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)  
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)  
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)  
at com.mysql.cj.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1335)  
at com.mysql.cj.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2108)  
at com.mysql.cj.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1245)  
at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:410)  
at net.java.ao.DatabaseProvider.executeUpdate(DatabaseProvider.java:2342)  
at net.java.ao.DatabaseProvider.executeUpdateForAction(DatabaseProvider.java:2398)  
at net.java.ao.DatabaseProvider.executeUpdatesForActions(DatabaseProvider.java:2370)  
at net.java.ao.schema.SchemaGenerator.migrate(SchemaGenerator.java:91)  
at net.java.ao.EntityManager.migrate(EntityManager.java:131)  
at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.migrate(EntityManagedActiveObjects.java:52)


Answers:
author: Nic Brough -Adaptavist-
body: Welcome to the Atlassian Community!

This usually means that MySQL is not correctly configured. If you've been using the SDK to develop your app, then it's likely that it is using the H2 database, so you won't have seen the problem happen there.

Make sure your main server is set up as per <https://confluence.atlassian.com/doc/database-setup-for-mysql-128747.html> (the one that usually bites me is something about "no auto blank on 0")


Tags: confluence-server

server