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

SQL error related to XWL_ID with link indexer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Major
    • None
    • 14.4.6
    • Index
    • MariaDB
    • Unknown
    • N/A
    • N/A

    Description

      We obtained several occurences of those errors when upgrading to 14.4.6:

      2022-10-24 10:14:43,320 [task-manager-consumer] WARN  o.x.i.i.DefaultTasksManager    - Error during the execution of task [org.xwiki.index.internal.TaskData@62255508[timestamp=1664882688849,docId=9136518365131936797,type=links,attempts=1,stop=false,wikiId=playground,version=]]. Cause: [SQLException: (conn=3195) Field 'XWL_ID' doesn't have a default value]. 
      2022-10-24 10:14:43,321 [task-manager-consumer] DEBUG o.x.i.i.DefaultTasksManager    - Stack trace for previous error:  
      org.xwiki.index.IndexException: Failed to updated links for document [playground:Blog.ArchiveSheet()] version [1.1].
      	at org.xwiki.index.internal.DefaultLinksTaskConsumer.consume(DefaultLinksTaskConsumer.java:78)
      	at org.xwiki.index.internal.TaskExecutor.internalExecute(TaskExecutor.java:103)
      	at org.xwiki.index.internal.TaskExecutor.execute(TaskExecutor.java:83)
      	at org.xwiki.index.internal.DefaultTasksManager.consume(DefaultTasksManager.java:225)
      	at org.xwiki.index.internal.DefaultTasksManager.run(DefaultTasksManager.java:208)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:835)
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeWrite(XWikiHibernateBaseStore.java:948)
      	at com.xpn.xwiki.store.XWikiHibernateStore.saveLinks(XWikiHibernateStore.java:2266)
      	at org.xwiki.index.internal.DefaultLinksTaskConsumer.consume(DefaultLinksTaskConsumer.java:75)
      	... 5 common frames omitted
      Caused by: org.hibernate.exception.GenericJDBCException: could not execute statement
      	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:200)
      	at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:58)
      	at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:43)
      	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3279)
      	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3885)
      	at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:84)
      	at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:645)
      	at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:282)
      	at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:263)
      	at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:317)
      	at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:330)
      	at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:287)
      	at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:193)
      	at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:123)
      	at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:194)
      	at org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:38)
      	at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:179)
      	at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:32)
      	at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:75)
      	at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
      	at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:672)
      	at org.hibernate.internal.SessionImpl.save(SessionImpl.java:665)
      	at org.hibernate.internal.SessionImpl.save(SessionImpl.java:660)
      	at org.hibernate.engine.spi.SessionDelegatorBaseImpl.save(SessionDelegatorBaseImpl.java:835)
      	at com.xpn.xwiki.store.XWikiHibernateStore.lambda$saveLinks$17(XWikiHibernateStore.java:2285)
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:826)
      	... 8 common frames omitted
      Caused by: java.sql.SQLException: (conn=3195) Field 'XWL_ID' doesn't have a default value
      	at org.mariadb.jdbc.export.ExceptionFactory.createException(ExceptionFactory.java:299)
      	at org.mariadb.jdbc.export.ExceptionFactory.create(ExceptionFactory.java:370)
      	at org.mariadb.jdbc.message.ClientMessage.readPacket(ClientMessage.java:137)
      	at org.mariadb.jdbc.client.impl.StandardClient.readPacket(StandardClient.java:840)
      	at org.mariadb.jdbc.client.impl.StandardClient.readResults(StandardClient.java:779)
      	at org.mariadb.jdbc.client.impl.StandardClient.readResponse(StandardClient.java:698)
      	at org.mariadb.jdbc.client.impl.StandardClient.execute(StandardClient.java:641)
      	at org.mariadb.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:95)
      	at org.mariadb.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:334)
      	at org.mariadb.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:311)
      	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:197)
      	... 33 common frames omitted
      
      
      

      Attachments

        Issue Links

          Activity

            People

              mleduc Manuel Leduc
              surli Simon Urli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: