Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16528

Errors when running XWiki on Oracle, subwikis still cannot be created: ORA-00942: table or view does not exist

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Duplicate
    • Affects Version/s: 11.5
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      Windows 10 Pro 64 bit, Chrome 75, Edge 18, Firefox 67, using a local instance of XWiki 11.5, on Oracle 12c and Oracle 11.2 XE
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      STEPS TO REPRODUCE

      1. Configure an XWiki 11.5 instance with Oracle (11.2 or 12c)
      2. Start the instance and run the Distribution Wizard to the end
      3. Go to Wiki Index
      4. Click 'Create Wiki'
      5. Type a Pretty Name for the new subwiki (e.g. subwikiglobal)
      6. Select Standard Flavor
      7. Click 'Next Step'
      8. Select an 'User Scope' and a 'Membership Type'
      9. Click 'Create'

      EXPECTED RESULTS

      The XWiki instance and the subwiki are created successfully.

      ACTUAL RESULTS

      When the instance is started the first time (at initialization), there are some consistent errors in console that keep being displayed. Partial stacktrace:

      2019-06-25 15:09:41,287 [XWiki initialization] WARN  o.h.e.j.s.SqlExceptionHelper   - SQL Error: 942, SQLState: 42000 
      2019-06-25 15:09:41,288 [XWiki initialization] ERROR o.h.e.j.s.SqlExceptionHelper   - ORA-00942: tabelul sau vizualizarea nu există
       
      2019-06-25 15:09:41,303 [XWiki initialization] ERROR o.x.e.s.i.LegacyEventSaver     - Failed to save an event in the event stream. 
      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.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188)
      	at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1489)
      	at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:514)
      	at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3353)
      	at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2525)
      	at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:473)
      	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:178)
      	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$300(JdbcResourceLocalTransactionCoordinatorImpl.java:39)
      	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:271)
      	at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:104)
      	at com.xpn.xwiki.internal.store.hibernate.HibernateStore.endTransaction(HibernateStore.java:746)
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:603)
      	at org.xwiki.eventstream.store.internal.LegacyEventSaver.lambda$saveLegacyEvent$0(LegacyEventSaver.java:187)
      	at com.xpn.xwiki.internal.namespace.DefaultNamespaceContextExecutor.execute(DefaultNamespaceContextExecutor.java:63)
      	at org.xwiki.eventstream.store.internal.LegacyEventSaver.saveLegacyEvent(LegacyEventSaver.java:179)
      	at org.xwiki.eventstream.store.internal.LegacyEventSaver.saveEvent(LegacyEventSaver.java:104)
      	at org.xwiki.eventstream.store.internal.LegacyEventStream.addEvent(LegacyEventStream.java:57)
      	at org.xwiki.eventstream.store.internal.DocumentEventRecorder.recordEvent(DocumentEventRecorder.java:141)
      	at org.xwiki.eventstream.store.internal.DocumentEventRecorder.recordEvent(DocumentEventRecorder.java:121)
      	at org.xwiki.eventstream.store.internal.DocumentEventListener.onEvent(DocumentEventListener.java:127)
      	at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:320)
      	at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:285)
      	at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1931)
      	at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1810)
      	at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1800)
      	at com.xpn.xwiki.plugin.feed.FeedPlugin.getAggregatorURLClass(FeedPlugin.java:690)
      	at com.xpn.xwiki.plugin.feed.FeedPlugin.init(FeedPlugin.java:166)
      	at com.xpn.xwiki.plugin.feed.FeedPlugin.<init>(FeedPlugin.java:132)
      	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.xpn.xwiki.plugin.XWikiPluginManager.addPlugin(XWikiPluginManager.java:85)
      	at com.xpn.xwiki.plugin.XWikiPluginManager.addPlugins(XWikiPluginManager.java:118)
      	at com.xpn.xwiki.XWiki.preparePlugins(XWiki.java:1585)
      	at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1282)
      	at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1204)
      	at com.xpn.xwiki.XWiki.<init>(XWiki.java:1177)
      	at com.xpn.xwiki.internal.XWikiInitializerJob.runInternal(XWikiInitializerJob.java:117)
      	at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:236)
      	at org.xwiki.job.AbstractJob.run(AbstractJob.java:213)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.hibernate.exception.SQLGrammarException: could not execute statement
      	at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)
      	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.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3181)
      	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3695)
      	at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:90)
      	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)
      	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:478)
      	at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:356)
      	at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
      	at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1483)
      	... 40 common frames omitted
      Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: tabelul sau vizualizarea nu există
      
      	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.T4CTTIfun.doRPC(T4CTTIfun.java:252)
      	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612)
      	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:226)
      	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:59)
      	at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:910)
      	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1119)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3780)
      	at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1343)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeLargeUpdate(OraclePreparedStatement.java:3865)
      	at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3845)
      	at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1061)
      	at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136)
      	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)
      	... 48 common frames omitted
      Caused by: oracle.jdbc.OracleDatabaseException: ORA-00942: tabelul sau vizualizarea nu există
      
      	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)
      	... 66 common frames omitted

       

      Most of the times, the instance cannot be created at all, see Oracle_subwiki_failed_11_5.jpg

      Other times, the subwiki seems to be created 1_Oracle_subwiki_errors_11_5.jpg (although there are errors also in browser), but it cannot be accessed: 2_Oracle_subwiki_browser_cannot_access.jpg

      Please find attached the full log from Oracle 12c. Was used ojdbc8.jar connector.

      Probably due to the fact that the respective table doesn't exist, I got also the issue from XWIKI-16447.

      I've tested also on MySQL 5.7, PostgreSQL 11, HSQLDB 2.5.0 and the issue could not be reproduced.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tmortagne Thomas Mortagne
                Reporter:
                iandriuta Ilie Andriuta
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: