Bitbucket restore client 3.8.0 throws error "PSQLException: ERROR: relation" AO_02A6C0_REJECTED_REF
Asked by Nedeljko Markovic:

Bitbucket restore client 3.8.0 throws error "PSQLException: ERROR: relation" AO_02A6C0_REJECTED_REF "does not exist".

I checked in the database and saw that the table was not created.  
Has anyone encountered this problem?

Regards \& thanks in advance,

Ned


Answers:
author: Nedeljko Markovic
body: here is full stack

2022-03-03 14:18:08,174 ERROR \[main\] c.a.b.i.backup.client.RestoreMain bitbucket-20220301-121812-231.tar could not be restored  
java.lang.RuntimeException: Could not read fields for table AO_02A6C0_REJECTED_REF  
at net.java.ao.schema.helper.DatabaseMetaDataReaderImpl.getFields(DatabaseMetaDataReaderImpl.java:141)  
at net.java.ao.schema.ddl.SchemaReader.readFields(SchemaReader.java:126)  
at net.java.ao.schema.ddl.SchemaReader.readTable(SchemaReader.java:110)  
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47)  
at com.google.common.collect.Iterators.addAll(Iterators.java:358)  
at com.google.common.collect.Lists.newArrayList(Lists.java:147)  
at com.google.common.collect.Lists.newArrayList(Lists.java:133)  
at net.java.ao.schema.ddl.SchemaReader.readSchema(SchemaReader.java:97)  
at net.java.ao.schema.ddl.SchemaReader.readSchema(SchemaReader.java:88)  
at net.java.ao.schema.ddl.SchemaReader.readSchema(SchemaReader.java:81)  
at com.atlassian.activeobjects.backup.ActiveObjectsDatabaseCleaner.doCleanup(ActiveObjectsDatabaseCleaner.java:58)  
at com.atlassian.activeobjects.backup.ActiveObjectsDatabaseCleaner.cleanup(ActiveObjectsDatabaseCleaner.java:45)  
at com.atlassian.dbexporter.importer.AbstractImporter.importNode(AbstractImporter.java:41)  
at com.atlassian.dbexporter.DbImporter.importData(DbImporter.java:70)  
at com.atlassian.activeobjects.backup.ActiveObjectsBackup.restore(ActiveObjectsBackup.java:151)  
at com.atlassian.bitbucket.internal.backup.client.RestoreClientUtils.restoreFile(RestoreClientUtils.groovy:91)  
at com.atlassian.bitbucket.internal.backup.client.DefaultRestoreClient.withDataSource(DefaultRestoreClient.groovy:218)  
at com.atlassian.bitbucket.internal.backup.client.DefaultRestoreClient.restoreDatabase(DefaultRestoreClient.groovy:169)  
at com.atlassian.bitbucket.internal.backup.client.DefaultRestoreClient.restoreSystem(DefaultRestoreClient.groovy:204)  
at com.atlassian.bitbucket.internal.backup.client.DefaultRestoreClient.restore(DefaultRestoreClient.groovy:79)  
at com.atlassian.bitbucket.internal.backup.client.spring.SpringMain.run(SpringMain.groovy:28)  
at com.atlassian.bitbucket.internal.backup.client.RestoreMain.main(RestoreMain.groovy:52)  
at com.atlassian.bitbucket.internal.backup.client.JavaVersionCheckingShim.invokeClientClassMain(JavaVersionCheckingShim.java:71)  
at com.atlassian.bitbucket.internal.backup.client.JavaVersionCheckingShim.run(JavaVersionCheckingShim.java:85)  
... 107 frames suppressed  
Caused by: org.postgresql.util.PSQLException: ERROR: relation "AO_02A6C0_REJECTED_REF" does not exist  
Position: 15  
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553)  
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285)  
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323)  
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:481)  
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:401)  
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164)  
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:114)  
at net.java.ao.schema.helper.DatabaseMetaDataReaderImpl.getResultSetMetaData(DatabaseMetaDataReaderImpl.java:271)  
at net.java.ao.schema.helper.DatabaseMetaDataReaderImpl.getFields(DatabaseMetaDataReaderImpl.java:91)  
... 130 common frames omitted


Tags: bitbucket-server

restore

server