Setting MCR.NIO.DefaultScheme=ifs2 leads to java.lang.ClassCastException when invoking MCRFilenodeServlet

Description

Setting MCR.NIO.DefaultScheme=ifs2 leads to java.lang.ClassCastException when invoking MCRFilenodeServlet.

java.lang.ClassCastException: class sun.nio.fs.UnixFileAttributes$UnixAsBasicFileAttributes cannot be cast to class org.mycore.datamodel.niofs.MCRFileAttributes (sun.nio.fs.UnixFileAttributes$UnixAsBasicFileAttributes is in module java.base of loader 'bootstrap'; org.mycore.datamodel.niofs.MCRFileAttributes is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @1c71d881)
at org.mycore.datamodel.niofs.MCRPathXML.lambda$getDirectoryXML$3(MCRPathXML.java:111)
at org.mycore.datamodel.niofs.MCRPathXML.getDirectoryXML(MCRPathXML.java:121)
at org.mycore.datamodel.niofs.MCRPathXML.getDirectoryXML(MCRPathXML.java:64)
at org.mycore.datamodel.ifs.MCRFileNodeServlet.sendDirectory(MCRFileNodeServlet.java:171)
at org.mycore.datamodel.ifs.MCRFileNodeServlet.getContent(MCRFileNodeServlet.java:102)
at org.mycore.frontend.servlets.MCRContentServlet.render(MCRContentServlet.java:83)
at org.mycore.frontend.servlets.MCRServlet.processRenderingPhase(MCRServlet.java:527)
at org.mycore.frontend.servlets.MCRServlet.doGetPost(MCRServlet.java:378)
at org.mycore.frontend.servlets.MCRServlet.doGet(MCRServlet.java:172)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.mycore.frontend.filter.MCRSecureTokenV2Filter.doFilter(MCRSecureTokenV2Filter.java:92)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.mycore.frontend.filter.MCRUserAgentFilter.doFilter(MCRUserAgentFilter.java:67)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.mycore.common.xml.MCRURIResolverFilter.doFilter(MCRURIResolverFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.mycore.frontend.filter.MCRWebAppBaseFilter.doFilter(MCRWebAppBaseFilter.java:41)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.mycore.frontend.filter.MCRRequestAuthenticationFilter.doFilter(MCRRequestAuthenticationFilter.java:57)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.mycore.frontend.filter.MCRRequestDebugFilter.doFilter(MCRRequestDebugFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:121)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:479)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:800)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1471)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)

Environment

None

Assignee

Thomas Scheffler

Reporter

Silvio Hermann

Labels

None

URL

None

External issue ID

None

Components

Fix versions

Affects versions

Priority

Medium
Configure