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

MCRPath.toPhysicalPath() may throw Exception if not all configured stores have an existing baseDirectory

    Details

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

      Description

      An IFS content store may create the base directory with the first stored file. Therefor an MCRContentStore can exist without and underlaying FileStore. MCRPath.toPhysical() should not throw an IOException if an underlaying store could not be initialized.

      INFO  Base directory for store IFS2 is /mcr/data/content
      INFO  Default slot layout for store IFS2 is 4-2-2
      ERROR Exception caught while calling event handler
      org.mycore.common.MCRException: java.nio.file.NoSuchFileException: /mcr/data/content
              at org.mycore.datamodel.niofs.ifs1.MCRIFSFileSystem$2.getInstance(MCRIFSFileSystem.java:92)
              at org.mycore.datamodel.niofs.ifs1.MCRIFSFileSystem$2.getInstance(MCRIFSFileSystem.java:86)
              at org.mycore.common.MCRDecoratedIterable$1.next(MCRDecoratedIterable.java:74)
              at org.mycore.datamodel.niofs.MCRPath.toPhysicalPath(MCRPath.java:690)
              at org.mycore.datamodel.ifs.MCRVideoFileHandler.handlePathCreated(MCRVideoFileHandler.java:34)
              at org.mycore.common.events.MCREventHandlerBase.doHandleEvent(MCREventHandlerBase.java:119)
              at org.mycore.datamodel.ifs.MCRFileEventHandlerBase.doHandleEvent(MCRFileEventHandlerBase.java:57)
              at org.mycore.common.events.MCREventManager.handleEvent(MCREventManager.java:201)
              at org.mycore.common.events.MCREventManager.handleEvent(MCREventManager.java:234)
              at org.mycore.datamodel.ifs.MCRFile.adjustMetadata(MCRFile.java:460)
              at org.mycore.datamodel.niofs.ifs1.MCRFileChannel.updateMetadata(MCRFileChannel.java:85)
              at org.mycore.datamodel.niofs.ifs1.MCRFileChannel.implCloseChannel(MCRFileChannel.java:62)
              at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:115)
              at java.nio.channels.Channels$1.close(Channels.java:178)
              at java.nio.file.Files.copy(Files.java:2855)
              at java.nio.file.CopyMoveHelper.copyToForeignTarget(CopyMoveHelper.java:126)
              at java.nio.file.Files.copy(Files.java:1230)
              at org.mycore.frontend.fileupload.MCRUploadHandlerIFS.receiveFile(MCRUploadHandlerIFS.java:186)
              at org.mycore.frontend.fileupload.MCRUploadServlet.invokeMethod(MCRUploadServlet.java:341)
              at org.mycore.frontend.fileupload.MCRUploadServlet.doGetPost(MCRUploadServlet.java:228)
              at org.mycore.frontend.servlets.MCRServlet.doPost(MCRServlet.java:187)
              at org.mycore.frontend.servlets.MCRServlet.render(MCRServlet.java:435)
              at org.mycore.frontend.servlets.MCRServlet.processRenderingPhase(MCRServlet.java:401)
              at org.mycore.frontend.servlets.MCRServlet.doGetPost(MCRServlet.java:289)
              at org.mycore.frontend.servlets.MCRServlet.doPost(MCRServlet.java:180)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
              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.doHandle(ServletHandler.java:566)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:596)
              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.Dispatcher.forward(Dispatcher.java:156)
              at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:72)
              at org.mycore.frontend.editor.MCREditorServlet.sendToServlet(MCREditorServlet.java:526)
              at org.mycore.frontend.editor.MCREditorServlet.processTargetSubmission(MCREditorServlet.java:468)
              at org.mycore.frontend.editor.MCREditorServlet.processSubmit(MCREditorServlet.java:329)
              at org.mycore.frontend.editor.MCREditorServlet.doGetPost(MCREditorServlet.java:85)
              at org.mycore.frontend.servlets.MCRServlet.doPost(MCRServlet.java:187)
              at org.mycore.frontend.servlets.MCRServlet.render(MCRServlet.java:435)
              at org.mycore.frontend.servlets.MCRServlet.processRenderingPhase(MCRServlet.java:401)
              at org.mycore.frontend.servlets.MCRServlet.doGetPost(MCRServlet.java:289)
              at org.mycore.frontend.servlets.MCRServlet.doPost(MCRServlet.java:180)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
              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.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: java.nio.file.NoSuchFileException: /mcr/data/content
              at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
              at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
              at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
              at sun.nio.fs.UnixFileStore.devFor(UnixFileStore.java:57)
              at sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:64)
              at sun.nio.fs.LinuxFileStore.<init>(LinuxFileStore.java:44)
              at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:49)
              at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:37)
              at sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:368)
              at java.nio.file.Files.getFileStore(Files.java:1413)
              at org.mycore.datamodel.niofs.ifs1.MCRFileStore.<init>(MCRFileStore.java:46)
              at org.mycore.datamodel.niofs.ifs1.MCRFileStore.<init>(MCRFileStore.java:23)
              at org.mycore.datamodel.niofs.ifs1.MCRFileStore$1.load(MCRFileStore.java:35)
              at org.mycore.datamodel.niofs.ifs1.MCRFileStore$1.load(MCRFileStore.java:30)
              at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
              at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
              at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
              at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
              at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
              at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
              at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
              at org.mycore.datamodel.niofs.ifs1.MCRFileStore.getInstance(MCRFileStore.java:51)
              at org.mycore.datamodel.niofs.ifs1.MCRIFSFileSystem$2.getInstance(MCRIFSFileSystem.java:90)
              ... 72 more
      

        Attachments

          Activity

            People

            • Assignee:
              yagee Thomas Scheffler
              Reporter:
              yagee Thomas Scheffler
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: