Migration from Confluence / Filter Streams Converter: Error number 3201

Hi,

we are testing the migration of several Confluence wiki spaces to XWiki. After exporting the complete space, we use the Filter Streams Converter and Nested Pages Migration.

Unfortunately, the Filter Streams Converter failes to save some pages with errors like this:

        Failed to save document [Home » public » 2016/06/03 - Protokoll]
    class com.xpn.xwiki.XWikiException: Error number 0 in 0: Error number 3201 in 3: Exception while saving document xwiki:public.2016/06/03 - Protokoll
        at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:729)
        at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:258)
        at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:218)
        at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:2048)
        at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1953)
        at com.xpn.xwiki.internal.filter.output.DocumentInstanceOutputFilterStream.maybeSaveDocument(DocumentInstanceOutputFilterStream.java:282)
        at com.xpn.xwiki.internal.filter.output.DocumentInstanceOutputFilterStream.endWikiDocumentRevision(DocumentInstanceOutputFilterStream.java:179)
        at jdk.internal.reflect.GeneratedMethodAccessor828.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90)
        at org.xwiki.filter.internal.CompositeFilter.invoke(CompositeFilter.java:75)
        at com.sun.proxy.$Proxy271.endWikiDocumentRevision(Unknown Source)
        at jdk.internal.reflect.GeneratedMethodAccessor828.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90)
        at org.xwiki.filter.internal.CompositeFilter.invoke(CompositeFilter.java:75)
        at com.sun.proxy.$Proxy272.endWikiDocumentRevision(Unknown Source)
        at jdk.internal.reflect.GeneratedMethodAccessor828.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90)
        at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:63)
        at com.sun.proxy.$Proxy273.endWikiDocumentRevision(Unknown Source)
        at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:747)
        at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:559)
        at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPage(ConfluenceInputFilterStream.java:452)
        at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readInternal(ConfluenceInputFilterStream.java:202)
        at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:138)
        at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:84)
        at org.xwiki.filter.input.AbstractBeanInputFilterStream.read(AbstractBeanInputFilterStream.java:79)
        at org.xwiki.filter.internal.job.FilterStreamConverterJob.runInternal(FilterStreamConverterJob.java:97)
        at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:243)
        at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
        at org.xwiki.filter.script.internal.ScriptFilterStreamConverterJob.run(ScriptFilterStreamConverterJob.java:75)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
    Caused by: class java.lang.ClassCastException: null

Database is set to UTF-8. We tried with and without version history, the error occurs every time. The content itself does not contain anything weird.

Thanks in advance for your help!

Regards

Hard to interpret this error without knowing the version of XWiki you are using.

Sorry:

  • XWiki Version 13.8
  • Debian Bullseye
  • PostgreSQL 13.3
  • Filter Streams Converter Application 13.8
  • Nested Pages Migrator Application 0.8

Hi Thomas,

any further information / log files that I could provide? Please just let me know. Not sure where to look next.

Thanks and regards
Fabian

The error you pasted in the first message seems incomplete, there is really nothing more after Caused by: class java.lang.ClassCastException: null ? I would have expected to see the line where this classcast happen.

Basically, with this kind of error, the ideal is always the same: detailed steps and data to reproduce it.

Ok, thanks. I have created a new export just with one of the pages which produce this error.

Steps to recreate:

Open Filter Streams Converter
Input
Input type: Confluence XML input stream (confluence+xml)
The source: file:/transfer/confluence_error.zip

Output
Output type: XWiki instance output stream (xwiki+instance)
Stop when document save fail: false

All other parameters are left with the default values.

Full job log
Starting job of type [filter.converter] with identifier [filter/converter/confluence+xml/xwiki+instance]
Created document [Home » public » WebHome]
Created document [Home » public » Wandern]
Updated document [Home » public » Wandern]
Updated document [Home » public » Wandern]
Updated document [Home » public » Wandern]
Updated document [Home » public » Wandern]
Updated document [Home » public » Wandern]
Updated document [Home » public » Wandern]
Updated document [Home » public » Wandern]
Updated document [Home » public » Wandern]
Updated document [Home » public » Wandern]
Updated document [Home » public » Wandern]
Updated document [Home » public » Wandern]
class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are in module java.base of loader 'bootstrap'
class com.xpn.xwiki.XWikiException: Error number 0 in 0: Error number 3201 in 3: Exception while saving document xwiki:public.Wandern
    at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:729)
    at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:258)
    at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:218)
    at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:2048)
    at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1953)
    at com.xpn.xwiki.internal.filter.output.DocumentInstanceOutputFilterStream.maybeSaveDocument(DocumentInstanceOutputFilterStream.java:282)
    at com.xpn.xwiki.internal.filter.output.DocumentInstanceOutputFilterStream.endWikiDocumentRevision(DocumentInstanceOutputFilterStream.java:179)
    at jdk.internal.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90)
    at org.xwiki.filter.internal.CompositeFilter.invoke(CompositeFilter.java:75)
    at com.sun.proxy.$Proxy181.endWikiDocumentRevision(Unknown Source)
    at jdk.internal.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90)
    at org.xwiki.filter.internal.CompositeFilter.invoke(CompositeFilter.java:75)
    at com.sun.proxy.$Proxy182.endWikiDocumentRevision(Unknown Source)
    at jdk.internal.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90)
    at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:63)
    at com.sun.proxy.$Proxy183.endWikiDocumentRevision(Unknown Source)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:747)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:559)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPage(ConfluenceInputFilterStream.java:452)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readInternal(ConfluenceInputFilterStream.java:202)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:138)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:84)
    at org.xwiki.filter.input.AbstractBeanInputFilterStream.read(AbstractBeanInputFilterStream.java:79)
    at org.xwiki.filter.internal.job.FilterStreamConverterJob.runInternal(FilterStreamConverterJob.java:97)
    at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:243)
    at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
    at org.xwiki.filter.script.internal.ScriptFilterStreamConverterJob.run(ScriptFilterStreamConverterJob.java:75)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: class java.lang.ClassCastException: class java.lang.Long cannot be cast to class java.lang.Integer (java.lang.Long and java.lang.Integer are in module java.base of loader 'bootstrap'
    at org.hibernate.type.descriptor.java.IntegerTypeDescriptor.unwrap(IntegerTypeDescriptor.java:19)
    at org.hibernate.type.descriptor.sql.IntegerTypeDescriptor$1.doBind(IntegerTypeDescriptor.java:46)
    at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:73)
    at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:276)
    at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:271)
    at org.hibernate.type.AbstractSingleColumnStandardBasicType.nullSafeSet(AbstractSingleColumnStandardBasicType.java:39)
    at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:3071)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3370)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3906)
    at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:107)
    at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)
    at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478)
    at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
    at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475)
    at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:344)
    at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40)
    at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
    at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1391)
    at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:482)
    at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3274)
    at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2409)
    at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:449)
    at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:183)
    at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$300(JdbcResourceLocalTransactionCoordinatorImpl.java:40)
    at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:281)
    at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101)
    at com.xpn.xwiki.internal.store.hibernate.HibernateStore.endTransaction(HibernateStore.java:848)
    at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:603)
    at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:720)
    at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:258)
    at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:218)
    at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:2048)
    at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1953)
    at com.xpn.xwiki.internal.filter.output.DocumentInstanceOutputFilterStream.maybeSaveDocument(DocumentInstanceOutputFilterStream.java:282)
    at com.xpn.xwiki.internal.filter.output.DocumentInstanceOutputFilterStream.endWikiDocumentRevision(DocumentInstanceOutputFilterStream.java:179)
    at jdk.internal.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90)
    at org.xwiki.filter.internal.CompositeFilter.invoke(CompositeFilter.java:75)
    at com.sun.proxy.$Proxy181.endWikiDocumentRevision(Unknown Source)
    at jdk.internal.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90)
    at org.xwiki.filter.internal.CompositeFilter.invoke(CompositeFilter.java:75)
    at com.sun.proxy.$Proxy182.endWikiDocumentRevision(Unknown Source)
    at jdk.internal.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90)
    at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:63)
    at com.sun.proxy.$Proxy183.endWikiDocumentRevision(Unknown Source)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:747)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:559)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPage(ConfluenceInputFilterStream.java:452)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readInternal(ConfluenceInputFilterStream.java:202)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:138)
    at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:84)
    at org.xwiki.filter.input.AbstractBeanInputFilterStream.read(AbstractBeanInputFilterStream.java:79)
    at org.xwiki.filter.internal.job.FilterStreamConverterJob.runInternal(FilterStreamConverterJob.java:97)
    at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:243)
    at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
    at org.xwiki.filter.script.internal.ScriptFilterStreamConverterJob.run(ScriptFilterStreamConverterJob.java:75)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
Finished job of type [filter.converter] with identifier [filter/converter/confluence+xml/xwiki+instance]

I can provide the zip file from the export to reproduce it. I just looked at the content of the zip file - I would prefer not to attach it here publicly as it contains several other email addresses. Any way to provide the file without attaching it here?

Thanks and regards
Fabian

You could pass by the Matrix chat and send it to me (tmortagne).

Might be the same as Loading..., but I will try both.

So it does seem it was Loading... (bad handling of page comments replies), and I just released a new version of the plugin with a fix.

I can confirm that the fix solved the issue. I updated the extension to 9.14.1 and the error does not occur anymore. I have testet several spaces which produced mulitple errors before, no error after the update. Thanks a lot!