Uploaded image for project: 'MyCoRe'
  1. MCR-869

Space characters in directory names are not supported by MCRFileNodeServlet

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2015.02
    • Fix Version/s: 2015.02
    • Component/s: mycore-base
    • Labels:
      None

      Description

      If I upload a directory via file-upload-applet and its name contains a space character, I cannot display the content of that directory due to this error:

      java.lang.RuntimeException: java.nio.file.NoSuchFileException: Group1Document_derivate_00000001:/ -> Group1Document_derivate_00000001:/New%20Folder
      	at org.mycore.common.content.transformer.MCRXSLTransformer$MCRTransformedContent.getBaseContent(MCRXSLTransformer.java:413)
      	at org.mycore.common.content.MCRWrappedContent.length(MCRWrappedContent.java:151)
      	at org.mycore.common.content.util.MCRServletContentHelper.parseRange(MCRServletContentHelper.java:691)
      	at org.mycore.common.content.util.MCRServletContentHelper.serveContent(MCRServletContentHelper.java:195)
      	at org.mycore.frontend.servlets.MCRContentServlet.render(MCRContentServlet.java:86)
      	at org.mycore.frontend.servlets.MCRServlet.processRenderingPhase(MCRServlet.java:405)
      	at org.mycore.frontend.servlets.MCRServlet.doGetPost(MCRServlet.java:309)
      	at org.mycore.frontend.servlets.MCRServlet.doGet(MCRServlet.java:166)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:751)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1666)
      	at org.mycore.frontend.filter.MCRUserAgentFilter.doFilter(MCRUserAgentFilter.java:69)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1653)
      	at org.mycore.common.xml.MCRURIResolverFilter.doFilter(MCRURIResolverFilter.java:83)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1653)
      	at org.mycore.frontend.filter.MCRWebAppBaseFilter.doFilter(MCRWebAppBaseFilter.java:46)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1645)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:564)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:554)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:498)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:98)
      	at org.eclipse.jetty.server.Server.handle(Server.java:461)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:284)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: javax.xml.transform.TransformerException: java.nio.file.NoSuchFileException: Group1Document_derivate_00000001:/ -> Group1Document_derivate_00000001:/New%20Folder
      	at org.mycore.common.xml.MCRURIResolver$MCRIFSResolver.resolve(MCRURIResolver.java:780)
      	at org.mycore.common.xml.MCRURIResolver.resolve(MCRURIResolver.java:285)
      	at org.apache.xpath.SourceTreeManager.resolveURI(SourceTreeManager.java:127)
      	at org.apache.xalan.templates.FuncDocument.getDoc(FuncDocument.java:237)
      	at org.apache.xalan.templates.FuncDocument.execute(FuncDocument.java:194)
      	at org.apache.xpath.XPath.execute(XPath.java:337)
      	at org.apache.xalan.templates.ElemVariable.getValue(ElemVariable.java:280)
      	at org.apache.xalan.templates.ElemVariable.execute(ElemVariable.java:248)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:162)
      	at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
      	at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
      	at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
      	at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394)
      	at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394)
      	at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394)
      	at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394)
      	at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248)
      	at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402)
      	at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272)
      	at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358)
      	at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3449)
      	at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:408)
      	at org.apache.xerces.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.java:734)
      	at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(XMLDocumentScannerImpl.java:525)
      	at org.apache.xerces.impl.XMLEntityManager.endEntity(XMLEntityManager.java:1938)
      	at org.apache.xerces.impl.XMLEntityScanner.load(XMLEntityScanner.java:1773)
      	at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(XMLEntityScanner.java:1304)
      	at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(XMLDocumentScannerImpl.java:1239)
      	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
      	at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:875)
      	at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:798)
      	at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
      	at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1198)
      	at org.mycore.common.content.transformer.MCRXSLTransformer.getTransformedContent(MCRXSLTransformer.java:248)
      	at org.mycore.common.content.transformer.MCRXSLTransformer$MCRTransformedContent.getBaseContent(MCRXSLTransformer.java:402)
      	... 36 more
      Caused by: java.nio.file.NoSuchFileException: Group1Document_derivate_00000001:/ -> Group1Document_derivate_00000001:/New%20Folder
      	at org.mycore.datamodel.niofs.ifs1.MCRFileSystemProvider.resolvePath(MCRFileSystemProvider.java:603)
      	at org.mycore.datamodel.niofs.ifs1.MCRFileSystemProvider.readAttributes(MCRFileSystemProvider.java:523)
      	at org.mycore.datamodel.niofs.MCRPathXML.getDirectoryXML(MCRPathXML.java:65)
      	at org.mycore.common.xml.MCRURIResolver$MCRIFSResolver.resolve(MCRURIResolver.java:778)
      	... 103 more
      

        Attachments

          Activity

            People

            • Assignee:
              yagee Thomas Scheffler
              Reporter:
              mcrsroeh Sebastian Röher
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: