Uploaded image for project: 'Confluence'
  1. Confluence
  2. CONFLUENCE-55

Could not convert xxxxxxxxxx to java.lang.Integer

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 9.2.3
    • Fix Version/s: 9.2.4
    • Component/s: XML
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Hi, we're considering switching our organization from a Confluence installation to XWiki.  In doing a test import of a confluence space using the confluence extension, I get the following (truncated... see below for full stack) :

      For input string: "3575448853"
      class org.apache.commons.configuration.ConversionException: 'space' doesn't map to an Integer object
       at org.apache.commons.configuration.AbstractConfiguration.getInteger(AbstractConfiguration.java:848)
       at org.apache.commons.configuration.AbstractConfiguration.getInt(AbstractConfiguration.java:809)
       at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.getReferenceFromId(ConfluenceXMLPackage.java:408)
      ...
      Caused by: class org.apache.commons.configuration.ConversionException: Could not convert 3575448853 to java.lang.Integer at org.apache.commons.configuration.PropertyConverter.toNumber(PropertyConverter.java:461)
      ...
      Caused by: class java.lang.NumberFormatException: For input string: "3575448853"
       at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      ...
      

      I'm guessing this line

       

      long spaceId = pageProperties.getInt(KEY_PAGE_SPACE);

       

      should be changed to 

      long spaceId = pageProperties.getLong(KEY_PAGE_SPACE);

       at https://github.com/xwiki-contrib/confluence/blob/master/confluence-xml/src/main/java/org/xwiki/contrib/confluence/filter/internal/ConfluenceXMLPackage.java#L408?

       

      Here's the full stack:

      For input string: "3575448853"
      class org.apache.commons.configuration.ConversionException: 'space' doesn't map to an Integer object
       at org.apache.commons.configuration.AbstractConfiguration.getInteger(AbstractConfiguration.java:848)
       at org.apache.commons.configuration.AbstractConfiguration.getInt(AbstractConfiguration.java:809)
       at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.getReferenceFromId(ConfluenceXMLPackage.java:408)
       at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:386)
       at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:374)
       at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPage(ConfluenceInputFilterStream.java:347)
       at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:258)
       at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:64)
       at org.xwiki.filter.input.AbstractBeanInputFilterStream.read(AbstractBeanInputFilterStream.java:79)
       at org.xwiki.filter.internal.job.FilterStreamConverterJob.runInternal(FilterStreamConverterJob.java:100)
       at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:236)
       at org.xwiki.job.AbstractJob.run(AbstractJob.java:213)
       at org.xwiki.filter.script.internal.ScriptFilterStreamConverterJob.run(ScriptFilterStreamConverterJob.java:75)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at java.lang.Thread.run(Thread.java:748)
      Caused by: class org.apache.commons.configuration.ConversionException: Could not convert 3575448853 to java.lang.Integer
       at org.apache.commons.configuration.PropertyConverter.toNumber(PropertyConverter.java:461)
       at org.apache.commons.configuration.PropertyConverter.toInteger(PropertyConverter.java:294)
       at org.apache.commons.configuration.AbstractConfiguration.getInteger(AbstractConfiguration.java:844)
       at org.apache.commons.configuration.AbstractConfiguration.getInt(AbstractConfiguration.java:809)
       at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.getReferenceFromId(ConfluenceXMLPackage.java:408)
       at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:386)
       at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:374)
       at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPage(ConfluenceInputFilterStream.java:347)
       at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:258)
       at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:64)
       at org.xwiki.filter.input.AbstractBeanInputFilterStream.read(AbstractBeanInputFilterStream.java:79)
       at org.xwiki.filter.internal.job.FilterStreamConverterJob.runInternal(FilterStreamConverterJob.java:100)
       at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:236)
       at org.xwiki.job.AbstractJob.run(AbstractJob.java:213)
       at org.xwiki.filter.script.internal.ScriptFilterStreamConverterJob.run(ScriptFilterStreamConverterJob.java:75)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at java.lang.Thread.run(Thread.java:748)
      Caused by: class java.lang.NumberFormatException: For input string: "3575448853"
       at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
       at java.lang.Integer.parseInt(Integer.java:583)
       at java.lang.Integer.<init>(Integer.java:867)
       at sun.reflect.GeneratedConstructorAccessor229.newInstance(Unknown Source)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
       at org.apache.commons.configuration.PropertyConverter.toNumber(PropertyConverter.java:457)
       at org.apache.commons.configuration.PropertyConverter.toInteger(PropertyConverter.java:294)
       at org.apache.commons.configuration.AbstractConfiguration.getInteger(AbstractConfiguration.java:844)
       at org.apache.commons.configuration.AbstractConfiguration.getInt(AbstractConfiguration.java:809)
       at org.xwiki.contrib.confluence.filter.internal.ConfluenceXMLPackage.getReferenceFromId(ConfluenceXMLPackage.java:408)
       at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:386)
       at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:374)
       at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPage(ConfluenceInputFilterStream.java:347)
       at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:258)
       at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:64)
       at org.xwiki.filter.input.AbstractBeanInputFilterStream.read(AbstractBeanInputFilterStream.java:79)
       at org.xwiki.filter.internal.job.FilterStreamConverterJob.runInternal(FilterStreamConverterJob.java:100)
       at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:236)
       at org.xwiki.job.AbstractJob.run(AbstractJob.java:213)
       at org.xwiki.filter.script.internal.ScriptFilterStreamConverterJob.run(ScriptFilterStreamConverterJob.java:75)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at java.lang.Thread.run(Thread.java:748)

       

       

       

        Attachments

          Activity

            People

            • Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              sfblake Shaun Blake
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: