Problem after deleting a subwiki

#1

Hello,

after deleting a subwiki named “test” xwiki tries to do tasks on the delete subwiki.
It tries to index the deleted wiki:

2019-08-14 15:34:04,943 [XWiki Solr index thread] ERROR o.h.e.j.s.SqlExceptionHelper   - ERROR: relation "xwikidbversion" does not exist
  Position: 13 
2019-08-14 15:34:04,944 [XWiki Solr index thread] ERROR .HibernateDataMigrationManager - The empty database test seems to be not writable, please check your configuration! 
com.xpn.xwiki.store.migration.DataMigrationException: Unable to store new data version 1130000 into database test
	at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.setDBVersionToDatabase(HibernateDataMigrationManager.java:178)
	at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.updateMigrationStatus(AbstractDataMigrationManager.java:510)
	at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.setDBVersion(AbstractDataMigrationManager.java:471)
	at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.initializeEmptyDB(HibernateDataMigrationManager.java:158)
	at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initNewDB(AbstractDataMigrationManager.java:446)
	at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initializeCurrentDatabase(AbstractDataMigrationManager.java:551)
	at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.checkDatabase(AbstractDataMigrationManager.java:534)
	at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:657)
	at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:618)
	at com.xpn.xwiki.internal.store.hibernate.HibernateStore.beginTransaction(HibernateStore.java:795)
	at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:577)
	at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:870)
	at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:365)
	at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2105)
	at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2167)
	at org.xwiki.search.solr.internal.reference.DocumentSolrReferenceResolver.getLocale(DocumentSolrReferenceResolver.java:200)
	at org.xwiki.search.solr.internal.reference.DocumentSolrReferenceResolver.getId(DocumentSolrReferenceResolver.java:181)
	at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getSolrDocument(AbstractSolrMetadataExtractor.java:124)
	at org.xwiki.search.solr.internal.DefaultSolrIndexer.getSolrDocument(DefaultSolrIndexer.java:504)
	at org.xwiki.search.solr.internal.DefaultSolrIndexer.processBatch(DefaultSolrIndexer.java:411)
	at org.xwiki.search.solr.internal.DefaultSolrIndexer.run(DefaultSolrIndexer.java:377)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute
	at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:826)
	at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeWrite(XWikiHibernateBaseStore.java:935)
	at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.setDBVersionToDatabase(HibernateDataMigrationManager.java:171)
	... 21 common frames omitted
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute statement
	at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
	at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
	at org.hibernate.query.internal.AbstractProducedQuery.executeUpdate(AbstractProducedQuery.java:1617)
	at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.lambda$setDBVersionToDatabase$0(HibernateDataMigrationManager.java:172)
	at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:820)
	... 23 common frames omitted
Caused by: org.hibernate.exception.SQLGrammarException: could not execute statement
	at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106)
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:178)
	at org.hibernate.hql.internal.ast.exec.BasicExecutor.doExecute(BasicExecutor.java:100)
	at org.hibernate.hql.internal.ast.exec.BasicExecutor.execute(BasicExecutor.java:59)
	at org.hibernate.hql.internal.ast.exec.DeleteExecutor.execute(DeleteExecutor.java:109)
	at org.hibernate.hql.internal.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:454)
	at org.hibernate.engine.query.spi.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:377)
	at org.hibernate.internal.SessionImpl.executeUpdate(SessionImpl.java:1561)
	at org.hibernate.query.internal.AbstractProducedQuery.doExecuteUpdate(AbstractProducedQuery.java:1626)
	at org.hibernate.query.internal.AbstractProducedQuery.executeUpdate(AbstractProducedQuery.java:1608)
	... 25 common frames omitted
Caused by: org.postgresql.util.PSQLException: ERROR: relation "xwikidbversion" does not exist
  Position: 13
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2468)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2211)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:309)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:370)
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
	at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:124)
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136)
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:175)
	... 33 common frames omitted
2019-08-14 15:34:04,944 [XWiki Solr index thread] ERROR o.x.s.s.i.DefaultSolrIndexer   - Failed to process entry [INDEX test:XWiki.XWikiSyntaxLists] 
org.xwiki.search.solr.internal.api.SolrIndexerException: Failed to get input Solr document for entity 'test:XWiki.XWikiSyntaxLists'
	at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getSolrDocument(AbstractSolrMetadataExtractor.java:140)
	at org.xwiki.search.solr.internal.DefaultSolrIndexer.getSolrDocument(DefaultSolrIndexer.java:504)
	at org.xwiki.search.solr.internal.DefaultSolrIndexer.processBatch(DefaultSolrIndexer.java:411)
	at org.xwiki.search.solr.internal.DefaultSolrIndexer.run(DefaultSolrIndexer.java:377)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.xwiki.search.solr.internal.api.SolrIndexerException: Exception while fetching the locale of the document 'test:XWiki.XWikiSyntaxLists'
	at org.xwiki.search.solr.internal.reference.DocumentSolrReferenceResolver.getLocale(DocumentSolrReferenceResolver.java:203)
	at org.xwiki.search.solr.internal.reference.DocumentSolrReferenceResolver.getId(DocumentSolrReferenceResolver.java:181)
	at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getSolrDocument(AbstractSolrMetadataExtractor.java:124)
	... 4 common frames omitted
Caused by: com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading document [test:XWiki.XWikiSyntaxLists]
	at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:1000)
	at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:365)
	at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2105)
	at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2167)
	at org.xwiki.search.solr.internal.reference.DocumentSolrReferenceResolver.getLocale(DocumentSolrReferenceResolver.java:200)
	... 6 common frames omitted
Caused by: com.xpn.xwiki.XWikiException: Error number 3301 in 3: Exception while switching to database test
	at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:663)
	at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:618)
	at com.xpn.xwiki.internal.store.hibernate.HibernateStore.beginTransaction(HibernateStore.java:795)
	at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:577)
	at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:870)
	... 10 common frames omitted
Caused by: com.xpn.xwiki.store.migration.DataMigrationException: The empty database test seems to be not writable, please check your configuration!
	at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initializeCurrentDatabase(AbstractDataMigrationManager.java:557)
	at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.checkDatabase(AbstractDataMigrationManager.java:534)
	at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:657)
	... 14 common frames omitted
Caused by: com.xpn.xwiki.store.migration.DataMigrationException: Unable to store new data version 1130000 into database test
	at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.setDBVersionToDatabase(HibernateDataMigrationManager.java:178)
	at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.updateMigrationStatus(AbstractDataMigrationManager.java:510)
	at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.setDBVersion(AbstractDataMigrationManager.java:471)
	at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.initializeEmptyDB(HibernateDataMigrationManager.java:158)
	at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initNewDB(AbstractDataMigrationManager.java:446)
	at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initializeCurrentDatabase(AbstractDataMigrationManager.java:551)
	... 16 common frames omitted
Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute
	at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:826)
	at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeWrite(XWikiHibernateBaseStore.java:935)
	at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.setDBVersionToDatabase(HibernateDataMigrationManager.java:171)
	... 21 common frames omitted
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute statement
	at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
	at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
	at org.hibernate.query.internal.AbstractProducedQuery.executeUpdate(AbstractProducedQuery.java:1617)
	at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.lambda$setDBVersionToDatabase$0(HibernateDataMigrationManager.java:172)
	at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:820)
	... 23 common frames omitted
Caused by: org.hibernate.exception.SQLGrammarException: could not execute statement
	at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106)
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:178)
	at org.hibernate.hql.internal.ast.exec.BasicExecutor.doExecute(BasicExecutor.java:100)
	at org.hibernate.hql.internal.ast.exec.BasicExecutor.execute(BasicExecutor.java:59)
	at org.hibernate.hql.internal.ast.exec.DeleteExecutor.execute(DeleteExecutor.java:109)
	at org.hibernate.hql.internal.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:454)
	at org.hibernate.engine.query.spi.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:377)
	at org.hibernate.internal.SessionImpl.executeUpdate(SessionImpl.java:1561)
	at org.hibernate.query.internal.AbstractProducedQuery.doExecuteUpdate(AbstractProducedQuery.java:1626)
	at org.hibernate.query.internal.AbstractProducedQuery.executeUpdate(AbstractProducedQuery.java:1608)
	... 25 common frames omitted
Caused by: org.postgresql.util.PSQLException: ERROR: relation "xwikidbversion" does not exist
  Position: 13
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2468)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2211)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:309)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:370)
	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
	at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:124)
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136)
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136)
	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:175)
	... 33 common frames omitted

It also tries todo sql queries on the gone wiki:
2019-08-14 15:38:01 CEST [10521-68009] xwiki@xwiki ERROR: schema "test" does not exist
2019-08-14 15:38:01 CEST [10521-68010] xwiki@xwiki STATEMENT: alter table test.activitystream_events_targets add constraint FK2bj2ghquiq79toomkvugw7iie foreign key (eventId) references test.activitystream_events
2019-08-14 15:38:01 CEST [10521-68011] xwiki@xwiki ERROR: schema "test" does not exist
2019-08-14 15:38:01 CEST [10521-68012] xwiki@xwiki STATEMENT: alter table test.feeds_aggregatorurlgroups add constraint FKi44e1ie6x9s80y4umn09018ja foreign key (agl_id) references test.feeds_aggregatorurl
2019-08-14 15:38:01 CEST [10521-68013] xwiki@xwiki ERROR: schema "test" does not exist
2019-08-14 15:38:01 CEST [10521-68014] xwiki@xwiki STATEMENT: alter table test.feeds_feedentrytags add constraint FK2u68px06ael6f73r3uudp6835 foreign key (fet_id) references test.feeds_feedentry
2019-08-14 15:38:01 CEST [10521-68015] xwiki@xwiki ERROR: schema "test" does not exist
2019-08-14 15:38:01 CEST [10521-68016] xwiki@xwiki STATEMENT: alter table test.xwikidates add constraint FK1xm6gpw6wh35haho3tf7i3n4b foreign key (XWS_ID, XWS_NAME) references test.xwikiproperties
2019-08-14 15:38:01 CEST [10521-68017] xwiki@xwiki ERROR: schema "test" does not exist
2019-08-14 15:38:01 CEST [10521-68018] xwiki@xwiki STATEMENT: alter table test.xwikidoubles add constraint FKislk01fhfjl018fsievpl1i8g foreign key (XWD_ID, XWD_NAME) references test.xwikiproperties
2019-08-14 15:38:01 CEST [10521-68019] xwiki@xwiki ERROR: schema "test" does not exist
2019-08-14 15:38:01 CEST [10521-68020] xwiki@xwiki STATEMENT: alter table test.xwikifloats add constraint FKgomsxak3f8adh9r2r7i4rrwqw foreign key (XWF_ID, XWF_NAME) references test.xwikiproperties
2019-08-14 15:38:01 CEST [10521-68021] xwiki@xwiki ERROR: schema "test" does not exist
2019-08-14 15:38:01 CEST [10521-68022] xwiki@xwiki STATEMENT: alter table test.xwikiintegers add constraint FK8k6ecdg0ekjyin8x7v1jk1c4f foreign key (XWI_ID, XWI_NAME) references test.xwikiproperties
2019-08-14 15:38:01 CEST [10521-68023] xwiki@xwiki ERROR: schema "test" does not exist
2019-08-14 15:38:01 CEST [10521-68024] xwiki@xwiki STATEMENT: alter table test.xwikilargestrings add constraint FK38o52utm62kct6bou41whwk74 foreign key (XWL_ID, XWL_NAME) references test.xwikiproperties
2019-08-14 15:38:01 CEST [10521-68025] xwiki@xwiki ERROR: schema "test" does not exist
2019-08-14 15:38:01 CEST [10521-68026] xwiki@xwiki STATEMENT: alter table test.xwikilistitems add constraint FKir4nsg6xqdx6mbc0ginj17ckd foreign key (XWL_ID, XWL_NAME) references test.xwikilists
2019-08-14 15:38:01 CEST [10521-68027] xwiki@xwiki ERROR: schema "test" does not exist
2019-08-14 15:38:01 CEST [10521-68028] xwiki@xwiki STATEMENT: alter table test.xwikilists add constraint FKsneohafq81w2sgywprwl5o1lh foreign key (XWL_ID, XWL_NAME) references test.xwikiproperties2019-08-14 15:38:01 CEST [10521-68029] xwiki@xwiki ERROR: schema “test” does not exist
2019-08-14 15:38:01 CEST [10521-68030] xwiki@xwiki STATEMENT: alter table test.xwikilongs add constraint FKsvs1wxa1omg5hfh6pn0giyqv8 foreign key (XWL_ID, XWL_NAME) references test.xwikiproperties2019-08-14 15:38:01 CEST [10521-68031] xwiki@xwiki ERROR: schema “test” does not exist
2019-08-14 15:38:01 CEST [10521-68032] xwiki@xwiki STATEMENT: alter table test.xwikistrings add constraint FKplajldi1yq2cutcbwh1c433n0 foreign key (XWS_ID, XWS_NAME) references test.xwikiproperties2019-08-14 15:38:01 CEST [10521-68033] xwiki@xwiki ERROR: schema “test” does not exist
2019-08-14 15:38:01 CEST [10521-68034] xwiki@xwiki STATEMENT: create sequence test.hibernate_sequence2019-08-14 15:38:01 CEST [10521-68035] xwiki@xwiki ERROR: relation “xwikidbversion” does not exist at character 13

How can I stop this?
I have deleted the wiki via the admin interface.

Kindly regards
Lutz

0 Likes