You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2010/03/10 11:35:27 UTC

[jira] Commented: (CMIS-151) WstxParsingException when getting default repository

    [ https://issues.apache.org/jira/browse/CMIS-151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843513#action_12843513 ] 

Michael Dürig commented on CMIS-151:
------------------------------------

Here is a tentative patch which just ignores the offending element 

Index: src/main/java/org/apache/chemistry/atompub/client/stax/ServiceDocumentReader.java
===================================================================
--- src/main/java/org/apache/chemistry/atompub/client/stax/ServiceDocumentReader.java	(revision 921282)
+++ src/main/java/org/apache/chemistry/atompub/client/stax/ServiceDocumentReader.java	(working copy)
@@ -155,7 +155,10 @@
                 readRepositorySpecificInformation(ctx, reader);
             } else if (CMIS.CHANGES_ON_TYPE.equals(name)) {
                 changeLogBaseTypes.add(BaseType.get(reader.getElementText()));
-            } else {
+            } else if (CMIS.ACL_CAPABILITY.equals(name)) {
+                // TODO implement ACL capabilities
+            }
+            else {
                 map.put(name.getLocalPart(), reader.getElementText());
             }
         }


> WstxParsingException when getting default repository
> ----------------------------------------------------
>
>                 Key: CMIS-151
>                 URL: https://issues.apache.org/jira/browse/CMIS-151
>             Project: Chemistry
>          Issue Type: Bug
>          Components: chemistry-atompub
>            Reporter: Michael Dürig
>
> The ServiceDocumentReader should handle the cmis:aclCapability element. Currently an WstxParsingException is thrown when such an element is present. 
> This was observed when connecting to Alfresco's demo repository at http://cmis.alfresco.com/service/cmis
> org.apache.chemistry.CMISRuntimeException: java.io.IOException
> 	at org.apache.chemistry.atompub.client.Connector.getServiceDocument(Connector.java:87)
> 	at org.apache.chemistry.atompub.client.APPRepositoryService.loadRepositories(APPRepositoryService.java:82)
> 	at org.apache.chemistry.atompub.client.APPRepositoryService.getDefaultRepository(APPRepositoryService.java:86)
> 	...
> Caused by: java.io.IOException
> 	at org.apache.chemistry.atompub.client.stax.ServiceDocumentReader.read(ServiceDocumentReader.java:99)
> 	at org.apache.chemistry.atompub.client.Connector.getServiceDocument(Connector.java:84)
>        ...
> Caused by: com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.
>  at [row,col {unknown-source}]: [61,35]
> 	at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:605)
> 	at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461)
> 	at com.ctc.wstx.sr.BasicStreamReader.getElementText(BasicStreamReader.java:677)
> 	at javax.xml.stream.util.StreamReaderDelegate.getElementText(StreamReaderDelegate.java:71)
> 	at org.apache.chemistry.xml.stax.StaxReader.getElementText(StaxReader.java:96)
> 	at org.apache.chemistry.atompub.client.stax.ServiceDocumentReader.readRepositoryInfo(ServiceDocumentReader.java:162)
> 	at org.apache.chemistry.atompub.client.stax.ServiceDocumentReader.read(ServiceDocumentReader.java:88)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.