Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filesystem with action=write and createFolder=true does not create folder #6747

Closed
Laurens-makel opened this issue May 1, 2024 · 6 comments · Fixed by #6792 or #6831
Closed

Filesystem with action=write and createFolder=true does not create folder #6747

Laurens-makel opened this issue May 1, 2024 · 6 comments · Fixed by #6792 or #6831
Assignees
Labels
Milestone

Comments

@Laurens-makel
Copy link
Contributor

❗ please do not add sensitive information in issues, you can provide extra information via email using issue number as reference ❗

Describe the issue
We have a LocalFileSystemPipe with action write and createFolder set to true. The folder tempFiles does not exist yet and I expect that the pipe will create the folder, however this does not happen, the pipe gives the following exception:

image

Configuration

<pipe action="write" className="nl.nn.adapterframework.pipes.LocalFileSystemPipe" createFolder="true" name="WriteFileToFS" root="/usr/local/tomcat/logs/ibis4input-deployment-0/tempFiles">
	<param name="filename" sessionKey="GUID"/>
	<forward name="success" path="ReadFileFromFS"/>
</pipe>

Environment

FF! 7.9.2: X
Running on x-deployment-0 using Apache Tomcat/9.0.86
Java Version: OpenJDK Runtime Environment (11.0.22+7)
Heap size: 200M, total JVM memory: 400M
Free disk space: 38GB, total disk space: 49GB
Up since: 2024-05-01 14:51:58 (22m)
nl.nn.adapterframework.core.PipeRunException: Pipe [WriteFileToFS] cannot perform action: unable to process [WRITE] action for File [b52cc8d5-ee39-4a8f-84b8-f91b72b1c8b7]: (NoSuchFileException) /usr/local/tomcat/logs/ibis4input-deployment-0/tempFiles/b52cc8d5-ee39-4a8f-84b8-f91b72b1c8b7
	at nl.nn.adapterframework.filesystem.FileSystemPipe.doPipe(FileSystemPipe.java:133)
	at nl.nn.adapterframework.filesystem.FileSystemPipe$$FastClassBySpringCGLIB$$7e3163fb.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:792)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:707)
	at nl.nn.adapterframework.pipes.LocalFileSystemPipe$$EnhancerBySpringCGLIB$$8fca3078.doPipe(<generated>)
	at nl.nn.adapterframework.processors.CorePipeProcessor.processPipe(CorePipeProcessor.java:33)
	at nl.nn.adapterframework.processors.PipeProcessorBase.lambda$processPipe$0(PipeProcessorBase.java:49)
	at nl.nn.adapterframework.processors.CheckMessageSizePipeProcessor.processPipe(CheckMessageSizePipeProcessor.java:38)
	at nl.nn.adapterframework.processors.PipeProcessorBase.processPipe(PipeProcessorBase.java:49)
	at nl.nn.adapterframework.processors.PipeProcessorBase.lambda$processPipe$0(PipeProcessorBase.java:49)
	at nl.nn.adapterframework.processors.LockerPipeProcessor.processPipe(LockerPipeProcessor.java:62)
	at nl.nn.adapterframework.processors.PipeProcessorBase.processPipe(PipeProcessorBase.java:49)
	at nl.nn.adapterframework.processors.PipeProcessorBase.lambda$processPipe$0(PipeProcessorBase.java:49)
	at nl.nn.adapterframework.processors.TransactionAttributePipeProcessor.execute(TransactionAttributePipeProcessor.java:99)
	at nl.nn.adapterframework.processors.TransactionAttributePipeProcessor.processPipe(TransactionAttributePipeProcessor.java:66)
	at nl.nn.adapterframework.processors.PipeProcessorBase.processPipe(PipeProcessorBase.java:49)
	at nl.nn.adapterframework.processors.PipeProcessorBase.lambda$processPipe$0(PipeProcessorBase.java:49)
	at nl.nn.adapterframework.processors.CheckSemaphorePipeProcessor.processPipe(CheckSemaphorePipeProcessor.java:59)
	at nl.nn.adapterframework.processors.PipeProcessorBase.processPipe(PipeProcessorBase.java:49)
	at nl.nn.adapterframework.processors.CheckSemaphorePipeProcessor.processPipe(CheckSemaphorePipeProcessor.java:67)
	at nl.nn.adapterframework.processors.CheckSemaphorePipeProcessor$$FastClassBySpringCGLIB$$3159a29c.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:792)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:102)
	at nl.nn.ibistesttool.IbisDebuggerAdvice.debugPipeGetInputFrom(IbisDebuggerAdvice.java:187)
	at jdk.internal.reflect.GeneratedMethodAccessor203.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:707)
	at nl.nn.adapterframework.processors.CheckSemaphorePipeProcessor$$EnhancerBySpringCGLIB$$7f5b471e.processPipe(<generated>)
	at nl.nn.adapterframework.processors.PipeProcessorBase.lambda$processPipe$0(PipeProcessorBase.java:49)
	at nl.nn.adapterframework.processors.ExceptionHandlingPipeProcessor.processPipe(ExceptionHandlingPipeProcessor.java:38)
	at nl.nn.adapterframework.processors.PipeProcessorBase.processPipe(PipeProcessorBase.java:49)
	at nl.nn.adapterframework.processors.PipeProcessorBase.lambda$processPipe$0(PipeProcessorBase.java:49)
	at nl.nn.adapterframework.processors.InputOutputPipeProcessor.processPipe(InputOutputPipeProcessor.java:112)
	at nl.nn.adapterframework.processors.PipeProcessorBase.processPipe(PipeProcessorBase.java:49)
	at nl.nn.adapterframework.processors.InputOutputPipeProcessor.processPipe(InputOutputPipeProcessor.java:199)
	at nl.nn.adapterframework.processors.InputOutputPipeProcessor$$FastClassBySpringCGLIB$$feb9be85.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:792)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:102)
	at nl.nn.ibistesttool.IbisDebuggerAdvice.debugPipeInputOutputAbort(IbisDebuggerAdvice.java:157)
	at jdk.internal.reflect.GeneratedMethodAccessor202.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:707)
	at nl.nn.adapterframework.processors.InputOutputPipeProcessor$$EnhancerBySpringCGLIB$$45c616a.processPipe(<generated>)
	at nl.nn.adapterframework.processors.PipeProcessorBase.lambda$processPipe$0(PipeProcessorBase.java:49)
	at nl.nn.adapterframework.processors.MonitoringPipeProcessor.processPipe(MonitoringPipeProcessor.java:77)
	at nl.nn.adapterframework.processors.PipeProcessorBase.processPipe(PipeProcessorBase.java:49)
	at nl.nn.adapterframework.processors.CorePipeLineProcessor.processPipeLine(CorePipeLineProcessor.java:236)
	at nl.nn.adapterframework.processors.CorePipeLineProcessor$$FastClassBySpringCGLIB$$cf1091e5.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:792)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:102)
	at nl.nn.ibistesttool.IbisDebuggerAdvice.debugPipeLineInputOutputAbort(IbisDebuggerAdvice.java:123)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:707)
	at nl.nn.adapterframework.processors.CorePipeLineProcessor$$EnhancerBySpringCGLIB$$e70ff78a.processPipeLine(<generated>)
	at nl.nn.adapterframework.processors.LockerPipeLineProcessor.processPipeLine(LockerPipeLineProcessor.java:60)
	at nl.nn.adapterframework.processors.TransactionAttributePipeLineProcessor.processPipeLine(TransactionAttributePipeLineProcessor.java:49)
	at nl.nn.adapterframework.processors.CheckSemaphorePipeLineProcessor.processPipeLine(CheckSemaphorePipeLineProcessor.java:58)
	at nl.nn.adapterframework.processors.CachePipeLineProcessor.processPipeLine(CachePipeLineProcessor.java:41)
	at nl.nn.adapterframework.processors.InputOutputPipeLineProcessor.processPipeLine(InputOutputPipeLineProcessor.java:44)
	at nl.nn.adapterframework.core.PipeLine.process(PipeLine.java:501)
	at nl.nn.adapterframework.core.Adapter.processMessageWithExceptions(Adapter.java:662)
	at nl.nn.adapterframework.receivers.Receiver.processMessageInAdapter(Receiver.java:1232)
	at nl.nn.adapterframework.receivers.Receiver.processRawMessage(Receiver.java:1110)
	at nl.nn.adapterframework.receivers.Receiver.retryMessage(Receiver.java:1142)
	at nl.nn.adapterframework.management.bus.endpoints.BrowseMessageBrowsers.resend(BrowseMessageBrowsers.java:204)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:169)
	at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:119)
	at org.springframework.integration.handler.support.MessagingMethodInvokerHelper$HandlerMethod.invoke(MessagingMethodInvokerHelper.java:1103)
	at org.springframework.integration.handler.support.MessagingMethodInvokerHelper.invokeHandlerMethod(MessagingMethodInvokerHelper.java:585)
	at org.springframework.integration.handler.support.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:480)
	at org.springframework.integration.handler.support.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:358)
	at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:110)
	at org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:105)
	at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:136)
	at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:55)
	at org.springframework.integration.handler.MessageHandlerChain.lambda$configureChain$0(MessageHandlerChain.java:126)
	at org.springframework.messaging.MessageChannel.send(MessageChannel.java:45)
	at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:187)
	at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:166)
	at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:47)
	at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:109)
	at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutput(AbstractMessageProducingHandler.java:456)
	at org.springframework.integration.handler.AbstractMessageProducingHandler.doProduceOutput(AbstractMessageProducingHandler.java:324)
	at org.springframework.integration.handler.AbstractMessageProducingHandler.produceOutput(AbstractMessageProducingHandler.java:267)
	at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutputs(AbstractMessageProducingHandler.java:231)
	at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:142)
	at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:55)
	at org.springframework.integration.handler.MessageHandlerChain.handleMessageInternal(MessageHandlerChain.java:156)
	at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:55)
	at org.springframework.integration.dispatcher.BroadcastingDispatcher.invokeHandler(BroadcastingDispatcher.java:222)
	at org.springframework.integration.dispatcher.BroadcastingDispatcher.dispatch(BroadcastingDispatcher.java:178)
	at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:72)
	at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:317)
	at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:187)
	at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:166)
	at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:47)
	at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:109)
	at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:151)
	at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:143)
	at org.springframework.integration.gateway.MessagingGatewaySupport.send(MessagingGatewaySupport.java:428)
	at nl.nn.adapterframework.management.bus.LocalGateway.sendAsyncMessage(LocalGateway.java:46)
	at nl.nn.adapterframework.management.web.FrankApiBase.callAsyncGateway(FrankApiBase.java:108)
	at nl.nn.adapterframework.management.web.TransactionalStorage.resendReceiverMessage(TransactionalStorage.java:266)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201)
	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265)
	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:225)
	at nl.nn.adapterframework.management.web.ServletDispatcher.invoke(ServletDispatcher.java:91)
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:304)
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPut(AbstractHTTPServlet.java:234)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:558)
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:279)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
	at nl.nn.adapterframework.web.filters.CorsFilter.doFilter(CorsFilter.java:111)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:352)
	at org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:100)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:131)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:85)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:164)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:117)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
	at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:361)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:225)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:190)
	at org.springframework.security.web.debug.DebugFilter.invokeWithWrappedRequest(DebugFilter.java:90)
	at org.springframework.security.web.debug.DebugFilter.doFilter(DebugFilter.java:78)
	at org.springframework.security.web.debug.DebugFilter.doFilter(DebugFilter.java:67)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
	at nl.nn.adapterframework.http.CacheControlFilter.doFilter(CacheControlFilter.java:55)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
	at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:70)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:596)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:670)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:346)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1794)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: nl.nn.adapterframework.filesystem.FileSystemException: unable to process [WRITE] action for File [b52cc8d5-ee39-4a8f-84b8-f91b72b1c8b7]: (NoSuchFileException) /usr/local/tomcat/logs/ibis4input-deployment-0/tempFiles/b52cc8d5-ee39-4a8f-84b8-f91b72b1c8b7
	at nl.nn.adapterframework.filesystem.FileSystemActor.doAction(FileSystemActor.java:504)
	at nl.nn.adapterframework.filesystem.FileSystemPipe.doPipe(FileSystemPipe.java:127)
	... 240 more
Caused by: java.nio.file.NoSuchFileException: /usr/local/tomcat/logs/ibis4input-deployment-0/tempFiles/b52cc8d5-ee39-4a8f-84b8-f91b72b1c8b7
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
	at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
	at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:478)
	at java.base/java.nio.file.Files.newOutputStream(Files.java:220)
	at nl.nn.adapterframework.filesystem.LocalFileSystem.createFile(LocalFileSystem.java:102)
	at nl.nn.adapterframework.filesystem.LocalFileSystem.createFile(LocalFileSystem.java:45)
	at nl.nn.adapterframework.filesystem.FileSystemActor.doAction(FileSystemActor.java:442)
	... 241 more
@nielsm5
Copy link
Sponsor Member

nielsm5 commented May 6, 2024

Hmm strange reminds me of #5220

@tnleeuw
Copy link
Contributor

tnleeuw commented May 6, 2024

After some investigation I uncovered that the createFolder option doesn't actually create the folder when the input filename does not contain a folder-name, as is the case here.
The root is set instead, but the filesystem does not create that root folder on startup.

@Laurens-makel
Copy link
Contributor Author

After some investigation I uncovered that the createFolder option doesn't actually create the folder when the input filename does not contain a folder-name, as is the case here. The root is set instead, but the filesystem does not create that root folder on startup.

Thanks for the investigation, I've over-looked this..

Is this behaviour desired? Since it could create awkward situations where the given configuration seems correct but it's actually incorrect.

Two ideas:

  • Introduce createRootFolder attribute
  • ConfigurationException when root does not exists

@nielsm5 nielsm5 assigned evandongen and unassigned tnleeuw May 7, 2024
@nielsm5 nielsm5 added this to the 8.2 milestone May 7, 2024
@tnleeuw
Copy link
Contributor

tnleeuw commented May 7, 2024

I don't think that the current behaviour is correct. I think it should be corrected, without adding extra configuration options, in a way that it will work for all filesystems.

The ConfigurationException on startup when createFolder is also present does not make sense to me, I would rather see that behaviour is consistent with how inputFolder is treated on startup (ie, create it when the createFolder attribute is present and otherwise throw an exception).

@evandongen evandongen linked a pull request May 8, 2024 that will close this issue
@evandongen
Copy link
Contributor

Ready for review. See #6792 - I added Niels, Tim and Jacobjob as reviewers

@nielsm5 nielsm5 reopened this May 13, 2024
@evandongen evandongen modified the milestones: 8.2, 8.1 May 14, 2024
@evandongen
Copy link
Contributor

After some discussion we came to the conclusion this (using createFolder to determine whether the filesystem root needs to be created) is not the solution we need. We don't want to create a root folder automatically, since this might introduce unwanted creation of directories.

For now in version 7.9.x, we recommend the following. In this case, the 'root' folder needs to exist on the file system. You can use a path in the <param name='path/filename' sessionKey="GUID" /> for instance. Another option can be <param name="filename" sessionKey="GUID" pattern="tempfiles/{GUID}" />

<pipe action="write" className="nl.nn.adapterframework.pipes.LocalFileSystemPipe" name="WriteFileToFS" root="/usr/local/tomcat/logs/ibis4input-deployment-0/tempFiles">
	<param name="filename" sessionKey="GUID"/>
	<forward name="success" path="ReadFileFromFS"/>
</pipe>

To achieve what you describe in this ticket, to make sure a folder is created, we propose to introduce a new attribute for the LocalFileSystemPipe called 'createRootFolder', assuming the Frank instance has the correct access rights to do this. This way, this can't be an accidental side effect but makes it a conscious choice by the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment