jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-369) IllegalNameException when importing document view with two mixins
Date Thu, 23 Mar 2006 00:11:05 GMT
IllegalNameException when importing document view with two mixins
-----------------------------------------------------------------

         Key: JCR-369
         URL: http://issues.apache.org/jira/browse/JCR-369
     Project: Jackrabbit
        Type: Bug
  Components: xml  
    Versions: 0.9    
    Reporter: Jukka Zitting
 Assigned to: Jukka Zitting 
    Priority: Minor


As reported by Manuel Simoni on the dev mailing list:

----

I have nodes with two mixin types, s1NT:comment and s1NT:authored.

I am exporting the document view:

session.exportDocumentView(session.getRootNode().getPath(),
outputStream, false, false);

When I try to import the document again:

session.getWorkspace().importXML(session.getRootNode().getPath(),
inputStream, ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW);

...I get this exception:

java.lang.Exception: javax.jcr.InvalidSerializedDataException: failed to
parse XML stream: illegal jcr:mixinTypes value: s1NT:comment
s1NT:authored: illegal jcr:mixinTypes value: s1NT:comment s1NT:authored
       at
at.systemone.wiki.webservice.ImportControllerImpl.importDocumentView(ImportControllerImpl.java:30)
       at
at.systemone.wiki.webservice.ImportControllerTest.testImport(ImportControllerTest.java:12)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at junit.framework.TestCase.runTest(TestCase.java:154)
       at junit.framework.TestCase.runBare(TestCase.java:127)
       at junit.framework.TestResult$1.protect(TestResult.java:106)
       at junit.framework.TestResult.runProtected(TestResult.java:124)
       at junit.framework.TestResult.run(TestResult.java:109)
       at junit.framework.TestCase.run(TestCase.java:118)
       at junit.framework.TestSuite.runTest(TestSuite.java:208)
       at junit.framework.TestSuite.run(TestSuite.java:203)
       at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
       at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
       at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: javax.jcr.InvalidSerializedDataException: failed to parse XML
stream: illegal jcr:mixinTypes value: s1NT:comment s1NT:authored:
illegal jcr:mixinTypes value: s1NT:comment s1NT:authored
       at
org.apache.jackrabbit.core.WorkspaceImpl.importXML(WorkspaceImpl.java:718)
       at
at.systemone.wiki.webservice.ImportControllerImpl.importDocumentView(ImportControllerImpl.java:27)
       ... 16 more
Caused by: org.apache.jackrabbit.name.IllegalNameException:
's1NT:comment s1NT:authored' is not a valid name
       at
org.apache.jackrabbit.core.xml.DocViewImportHandler.startElement(DocViewImportHandler.java:217)
       at
org.apache.jackrabbit.core.xml.ImportHandler.startElement(ImportHandler.java:234)
       at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
       at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
       at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
       at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
       at
org.apache.jackrabbit.core.WorkspaceImpl.importXML(WorkspaceImpl.java:709)
       ... 17 more

I think the importer chokes on this node (it is the first node with
these two mixin types in the XML file):

<s1:comment jcr:primaryType="s1NT:page" jcr:mixinTypes="s1NT:comment
s1NT:authored" jcr:uuid="3ff1022b-3e21-4e44-9a2e-ae3b67e833e5"
jcr:isCheckedOut="true"
jcr:versionHistory="17186f20-dab2-42d8-8f66-0895472debea"
jcr:frozenMixinTypes="s1NT:comment s1NT:authored"
jcr:frozenUuid="3ff1022b-3e21-4e44-9a2e-ae3b67e833e5"
s1:author="8db75ec7-eee8-44d8-aeb2-fbd116ea7e01" s1:title=""
jcr:predecessors="fb9eefb2-e2f8-414c-be94-185111a89be9"
s1:creationDate="2005-09-07T17:59:12.589Z"
s1:editor="7b778c51-d8d8-474b-a621-f5759fc24cd0" s1:orphanedPage="false"
s1:modificationDate="2006-03-18T17:55:49.838Z" s1:lowercaseTitle=""
jcr:baseVersion="fb9eefb2-e2f8-414c-be94-185111a89be9"
s1:currentEditor="8db75ec7-eee8-44d8-aeb2-fbd116ea7e01"
jcr:frozenPrimaryType="s1NT:page">

----

This issue is related to JCR-325, but there should be a lot easier fix for this special case.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message