incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harry Metske <harry.met...@gmail.com>
Subject Re: java.io.IOException: Improperly padded Base64 input during JCR import
Date Sat, 26 Sep 2009 18:35:47 GMT
This is an export of a 2 page repo, one of them with an small binary
attachment (.jpg file):
<?xml version="1.0" encoding="UTF-8"?>
<!--
This is an JSR-170 -compliant Document Tree export of a jspwiki 2.8
repository.
It is meant to be imported to the /wiki:spaces/ node of the JCR repository,
as it
describes an entire wiki space.
-->
<sv:node xmlns:jcr='http://www.jcp.org/jcr/1.0' xmlns:nt='
http://www.jcp.org/jcr/nt/1.0' xmlns:mix='http://www.jcp.org/jcr/mix/1.0'
xmlns:sv='http://www.jcp.org/jcr/sv/1.0' xmlns:wiki='
http://www.jspwiki.org/ns#'
         sv:name='Scharnhorst-test-wiki'>
 <sv:node sv:name='TestPage01'>
  <sv:property sv:name='jcr:primaryType' sv:type='Name'>
    <sv:value>nt:unstructured</sv:value>
  </sv:property>
  <sv:property sv:name='jcr:mixinTypes' sv:type='Name'>
    <sv:value>mix:referenceable</sv:value>
    <sv:value>mix:versionable</sv:value>
    <sv:value>mix:lockable</sv:value>
  </sv:property>
  <sv:property sv:name='wiki:author' sv:type='String'>
    <sv:value>DirtyHarry</sv:value>
  </sv:property>
  <sv:property sv:name='jcr:uuid' sv:type='String'>
    <sv:value>a262c323-fd06-3071-93f0-6a8bab843240</sv:value>
  </sv:property>
  <sv:property sv:name='wiki:lastModified' sv:type='Date'>
    <sv:value>2009-09-26T20:27:30.000Z</sv:value>
  </sv:property>
  <sv:property sv:name='wiki:contentType' sv:type='String'>
    <sv:value>text/x-wiki.jspwiki</sv:value>
  </sv:property>
  <sv:property sv:name='wiki:content' sv:type='String'>
    <sv:value>This is the content of TestPage01
</sv:value>
  </sv:property>
 </sv:node>
 <sv:node sv:name='TestPage02'>
  <sv:property sv:name='jcr:primaryType' sv:type='Name'>
    <sv:value>nt:unstructured</sv:value>
  </sv:property>
  <sv:property sv:name='jcr:mixinTypes' sv:type='Name'>
    <sv:value>mix:referenceable</sv:value>
    <sv:value>mix:versionable</sv:value>
    <sv:value>mix:lockable</sv:value>
  </sv:property>
  <sv:property sv:name='wiki:author' sv:type='String'>
    <sv:value>DirtyHarry</sv:value>
  </sv:property>
  <sv:property sv:name='jcr:uuid' sv:type='String'>
    <sv:value>075fefc1-9d1b-3679-b062-ef54b91f9d0e</sv:value>
  </sv:property>
  <sv:property sv:name='wiki:lastModified' sv:type='Date'>
    <sv:value>2009-09-26T20:27:59.000Z</sv:value>
  </sv:property>
  <sv:property sv:name='wiki:contentType' sv:type='String'>
    <sv:value>text/x-wiki.jspwiki</sv:value>
  </sv:property>
  <sv:property sv:name='wiki:content' sv:type='String'>
    <sv:value>This is the content of TestPage02

It has an attachment.
</sv:value>
  </sv:property>
 <sv:node sv:name='TestPage02/spanishstairs.jpg'>
  <sv:property sv:name='jcr:primaryType' sv:type='Name'>
    <sv:value>nt:unstructured</sv:value>
  </sv:property>
  <sv:property sv:name='jcr:mixinTypes' sv:type='Name'>
    <sv:value>mix:referenceable</sv:value>
    <sv:value>mix:versionable</sv:value>
    <sv:value>mix:lockable</sv:value>
  </sv:property>
  <sv:property sv:name='wiki:author' sv:type='String'>
    <sv:value>DirtyHarry</sv:value>
  </sv:property>
  <sv:property sv:name='jcr:uuid' sv:type='String'>
    <sv:value>bed3d9bd-ced6-3804-b6dd-e33887d7fdac</sv:value>
  </sv:property>
  <sv:property sv:name='wiki:lastModified' sv:type='Date'>
    <sv:value>2009-09-26T20:30:05.000Z</sv:value>
  </sv:property>
  <sv:property sv:name='wiki:contentType' sv:type='String'>
    <sv:value>image/jpeg</sv:value>
  </sv:property>
  <sv:property sv:name='spanishstairs.jpg' sv:type='Binary'>
<sv:value>/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAUDBAQEAwUEBAQF
BQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETF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y7tcRkBsfNhtffE6h5xzzKhswYlcnRYTNtOhWnYdhbrhx1fi
FlCaE68jUpy10ueIZb1XBFymyTt9/TFVAz9l6g1BL9Hyr4JarqUmNUnG2SbHZSLEHDRaOMSZqmxk
kf3Kc8NqW8++YlRnMJaWQEuaHP10jHlP4YtvZwo1MlVjmMzXSFlMXSoJSkqIHmPW1va+MxmPWOQp
xAqUFwDC78VzDdHydSKTDQhuG1JDaEITp8oRsD62x83+OKQocsna31YzGY9pvsjdWfqzo2+HG0nl
gbW64lMFBsCjuO+MxmKDxJhzJ86a4qjeFUAWy8hz3BCT+xxKr8ZprwLjYCeaylRAFgL/AB84zGYm
YepT+ZUozW+fj/YScOUeOjVGAToCUq0q6gHqDb2KfXB1l3hK9VW0SRmFiOVulqwp5PS2/wDdxmMw
osQxxMMPSIRq4GRlBx13M8k6LpIRFSCeh7k41pfBWhS2FPSazVlqBtZJaSOv/ZjMZgwxiiJ//9k=</sv:value>
</sv:property>
 </sv:node>
 </sv:node>
</sv:node> <!-- EOF -->


/Harry





2009/9/24 Janne Jalkanen <Janne.Jalkanen@ecyrd.com>

>
> Looks exotic. Any chance you could try to pare down the XML to something
> testable?
>
> /Janne
>
>
> On Sep 24, 2009, at 22:01 , Harry Metske wrote:
>
>  Hi,
>> I'm trying to import an xml exported JSPWiki repo into a JCR repo.
>> After a few tweaks I am stuck with the following problem, anyone any hints
>> ?
>>
>> java.io.IOException: Improperly padded Base64 input.
>> at org.priha.util.Base64$InputStream.read(Base64.java:1507)
>> at org.priha.util.Base64$InputStream.read(Base64.java:1568)
>> at java.io.FilterInputStream.read(FilterInputStream.java:107)
>> at org.priha.util.FileUtil.copyContents(FileUtil.java:75)
>> at
>>
>> org.priha.core.binary.MemoryBinarySource.<init>(MemoryBinarySource.java:53)
>> at org.priha.core.values.StreamValueImpl.<init>(StreamValueImpl.java:62)
>> at
>>
>> org.priha.core.values.ValueFactoryImpl.createValue(ValueFactoryImpl.java:109)
>> at org.priha.xml.XMLImport.characters(XMLImport.java:493)
>> at
>>
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.characters(AbstractSAXParser.java:541)
>> at
>>
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:439)
>> at
>>
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:810)
>> at
>>
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:740)
>> at
>>
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:110)
>> at
>>
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
>> at
>>
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
>> at javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
>> at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
>> at org.priha.xml.XMLImport.doImport(XMLImport.java:75)
>> at org.priha.core.WorkspaceImpl.importXML(WorkspaceImpl.java:423)
>> at org.apache.wiki.util.JCRImport.main(JCRImport.java:67)
>> javax.jcr.ValueFormatException: Cannot construct a binary source:
>> Improperly
>> padded Base64 input.
>> at org.priha.core.values.StreamValueImpl.<init>(StreamValueImpl.java:67)
>> at
>>
>> org.priha.core.values.ValueFactoryImpl.createValue(ValueFactoryImpl.java:109)
>> at org.priha.xml.XMLImport.characters(XMLImport.java:493)
>> at
>>
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.characters(AbstractSAXParser.java:541)
>> at
>>
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:439)
>> at
>>
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:810)
>> at
>>
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:740)
>> at
>>
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:110)
>> at
>>
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
>> at
>>
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
>> at javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
>> at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
>> at org.priha.xml.XMLImport.doImport(XMLImport.java:75)
>> at org.priha.core.WorkspaceImpl.importXML(WorkspaceImpl.java:423)
>> at org.apache.wiki.util.JCRImport.main(JCRImport.java:67)
>>
>>
>> regards,
>> Harry
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message