cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS and 'Invalid space character'

cdw
Champ in-the-making
Champ in-the-making
Hello all,

we are using Alfresco Community 4.2.e on a Linux machine.

Currently we have two problems which appear to be linked somehow: Not all users receive their notification mails and the CmisSync application does not sync all directories.

On both occasions we see (nearly) the same exception in the catalina.out:

2013-11-14 23:10:40,475  DEBUG [server.shared.Dispatcher] [ajp-bio-8009-exec-10] f4a2475b-d477-45bf-90e8-59fa138ab842 / children, GET -> org.apache.chemistry.opencmis.server.impl.atompub.Na
vigationService$GetChildren
2013-11-14 23:10:40,808  DEBUG [alfresco.opencmis.AlfrescoCmisService] [ajp-bio-8009-exec-10] getChildren: 27 in 332 msecs
2013-11-14 23:10:40,834  ERROR [impl.atompub.CmisAtomPubServlet] [ajp-bio-8009-exec-10] Invalid white space character (0x2) in text to output (in xml 1.1, could output as a character entity
)
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Invalid white space character (0x2) in text to output (in xml 1.1, could output as a character entity)
        at org.apache.chemistry.opencmis.server.shared.Dispatcher.dispatch(Dispatcher.java:92)
        at org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.dispatch(CmisAtomPubServlet.java:225)
        at org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet.service(CmisAtomPubServlet.java:172)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.alfresco.repo.webdav.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:244)
        at sun.reflect.GeneratedMethodAccessor465.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:125)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at com.sun.proxy.$Proxy297.doFilter(Unknown Source)
        at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.alfresco.web.app.servlet.CmisSecurityContextCleanerFilter.doFilter(CmisSecurityContextCleanerFilter.java:49)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:724)
Caused by: com.ctc.wstx.exc.WstxIOException: Invalid white space character (0x2) in text to output (in xml 1.1, could output as a character entity)
        at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:462)
        at org.apache.chemistry.opencmis.commons.impl.XMLConverter.writeExtensionElement(XMLConverter.java:1070)
        at org.apache.chemistry.opencmis.commons.impl.XMLConverter.writeExtensionElement(XMLConverter.java:1074)
        at org.apache.chemistry.opencmis.commons.impl.XMLConverter.writeExtensionElement(XMLConverter.java:1074)
        at org.apache.chemistry.opencmis.commons.impl.XMLConverter.writeExtensionElement(XMLConverter.java:1074)
        at org.apache.chemistry.opencmis.commons.impl.XMLConverter.writeExtensions(XMLConverter.java:1027)
        at org.apache.chemistry.opencmis.commons.impl.XMLConverter.writeObject(XMLConverter.java:698)
        at org.apache.chemistry.opencmis.server.impl.atompub.AtomEntry.writeObject(AtomEntry.java:109)
        at org.apache.chemistry.opencmis.server.impl.atompub.AbstractAtomPubServiceCall.writeObjectEntry(AbstractAtomPubServiceCall.java:175)
        at org.apache.chemistry.opencmis.server.impl.atompub.NavigationService$GetChildren.serve(NavigationService.java:169)
        at org.apache.chemistry.opencmis.server.shared.Dispatcher.dispatch(Dispatcher.java:88)
        … 36 more
Caused by: java.io.IOException: Invalid white space character (0x2) in text to output (in xml 1.1, could output as a character entity)
        at com.ctc.wstx.api.InvalidCharHandler$FailingHandler.convertInvalidChar(InvalidCharHandler.java:55)
        at com.ctc.wstx.sw.XmlWriter.handleInvalidChar(XmlWriter.java:623)
        at com.ctc.wstx.sw.BufferingXmlWriter.writeCharacters(BufferingXmlWriter.java:554)
        at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:460)
        … 46 more


Handling the files with WebDAV isn't a problem.
So, is there a special file name that causes problems? How can we trace that error? And: How can we fix / prevent that problem?

Would appreciate all hints…

Best regards
Daniel W.
2 REPLIES 2

kaynezhang
World-Class Innovator
World-Class Innovator

The problem seems to be caused by some entries in the repository that have invalid characters (0x2), and  com.ctc.wstx.api can't deal with it.
You can try to locate the node and clean the invalid characters

cdw
Champ in-the-making
Champ in-the-making
Hello again,
I tried to find the node, but wasn't successful. Okay, I am also not very familiar with the Alfresco data model.
So, how can I detect those buggy nodes?
And: If the problem came through an upload of a user, how can we prevent users from creating nodes or uploading files with critical characters?