chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Domenico Rotondi <d.roto...@computer.org>
Subject Re: Java OpenCmis problems with special chars in the document filename
Date Fri, 01 Jul 2016 08:10:49 GMT
On 30 Jun 2016 at 21:14, Gavin Cornwell wrote:
Hi Florian and Gavin,
thanks for your kind feedback. 
After a deep debug task, we found the reason behind the issue. 
The "upper score" present in a lot of filenames wasn’t the standard dash present on 
the keyboard, but the "en dash" special char (with U+2013 Unicode). 
It is not possible to insert this char via the Alfresco user interface, but we, 
inadvertitely, were able to use such char because we uploaded some files to Alfresco 
using a WebDav client.
Replacing the "en dash" with the standard dash, all problems are solved.
Best Regards.
    Domenico  

> Hi Domenico,
> 
> Another alternative is to try a newer version of Alfresco, we fixed some issues in this
area a while ago and they won’t be in the version you’re using.
> 
> The latest stable Community release is 5.1.g.
> 
> Regards,
> 
> Gavin
> 
> 
> On 30/06/2016 13:05, "Florian Müller" <fmui@apache.org> wrote:
> 
> >Hi Domenico,
> >
> >Could you please open an issue [1] and attach some client code to 
> >reproduce it?
> >If we can reproduce it with the OpenCMIS InMemory repository, then we 
> >can look into it. If not, we have to forward it to Alfresco.
> >
> >Btw. Use the browser binding. It doesn't solve your problem, but it's 
> >faster. ;-)
> >
> >
> >- Florian
> >
> >[1] https://issues.apache.org/jira/browse/CMIS
> >
> >
> >
> >> Hi All,
> >> I'm trying to retrieve the content of a file present on my Alfresco
> >> system thought the Apache Chemistry OpenCMIS in my Java Web
> >> Application.
> >> 
> >>  But when I invoke the getContentStream() method on the
> >> org.apache.chemistry.opencmis.client.api.Document interface and the
> >> document filename contains the character “-“ (upper score), I
> >> receive the following stack trace:
> >> org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException:
> >> Bad Request
> >> org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:490)
> >> org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.getContentStream(ObjectServiceImpl.java:617)
> >> org.apache.chemistry.opencmis.client.runtime.SessionImpl.getContentStream(SessionImpl.java:1454)
> >> org.apache.chemistry.opencmis.client.runtime.DocumentImpl.getContentStream(DocumentImpl.java:396)
> >> org.apache.chemistry.opencmis.client.runtime.DocumentImpl.getContentStream(DocumentImpl.java:380)
> >> jp.aegif.struts2cmisexplorer.opencmisbinding.OpenCMISRepositoryClientFacade.getDocument(OpenCMISRepositoryClientFacade.java:227)
> >> jp.aegif.struts2cmisexplorer.struts2actions.SendFileAction.execute(SendFileAction.java:55)
> >> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >> java.lang.reflect.Method.invoke(Method.java:498)
> >> 
> >> Debugging the
> >> org.apache.chemistry.opencmis.client.runtime.DocumentImpl class, and
> >> in particular the
> >> org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.getContentStream()
> >> method, in the returned link object, the “-“ char it’s
> >> translated in “%5Cu†(before it’s translated in “\uâ€
and then
> >> the URL Encodig transform it to “%5Cuâ€).
> >> 
> >> If I replace the “%5Cu†with the original “-“ char, all
work 
> >> perfectly.
> >> 
> >> Following the details about my test environment:
> >> org.apache.chemistry.opencmis v 0.14.0
> >> JDK 1.8.0_91 64bit
> >> Tomcat 7.0.69
> >> Alfresco 5.0.d
> >> 
> >> Any idea about this issue?
> >> Any suggestions will be appreciated.
> >> 
> >> Thanks in advance for any hints. Best regards.
> >>     Domenico
> 



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