The upload tool in a form does not work

Hello,

I have an issue when i try to upload a file (pdf,png,jpg,word…) from the upload tool in a form. The field still empty when i upload a file. Please can you help me to solve this issue.
Regards.

Nobody can’t help me ?

Hi,

I am using 6.2.0 version of flowable-modeler/task and it works! Can you plz elaborate like how are you saying that field is still empty? Can you share something else that can help understand the problem in more detail.

Thank You,
Arpit Agrawal

Hi Arpit,

I’m using 6.2.1 of Flowable-modeler/task. When i creating a form with a upload/import content field, i’m not able to importe a document when i’m testing the application.

Thanks

Hi,

You must be getting some kind of error in the console if there is some error with the API. Can you see if there is any error in the browser console or backend logs? Also can you post the process diagram? Any error or anything which can help?

Thank You,
Arpit

Hi Arpit,

Below the error message and the attached files :

03:05:21,424 [http-nio-8080-exec-1] ERROR org.flowable.rest.exception.BaseExceptionHandlerAdvice - Unhandled exception
org.flowable.content.api.ContentStorageException: Could not write content to /data/uncategorized/9a816087-0a7d-11e8-9e15-00155d014b0a
at org.flowable.content.engine.impl.fs.SimpleFileSystemContentStorage.createContentObject(SimpleFileSystemContentStorage.java:99)
at org.flowable.content.engine.impl.cmd.SaveContentItemCmd.execute(SaveContentItemCmd.java:76)
at org.flowable.content.engine.impl.cmd.SaveContentItemCmd.execute(SaveContentItemCmd.java:34)
at org.flowable.engine.common.impl.interceptor.DefaultCommandInvoker.execute(DefaultCommandInvoker.java:10)
at org.flowable.engine.common.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53)
at org.flowable.engine.common.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:72)
at org.flowable.content.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:49)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at org.flowable.content.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:46)
at org.flowable.engine.common.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
at org.flowable.engine.common.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56)
at org.flowable.engine.common.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51)
at org.flowable.content.engine.impl.ContentServiceImpl.saveContentItem(ContentServiceImpl.java:43)
at org.flowable.app.rest.runtime.AbstractRelatedContentResource.uploadFile(AbstractRelatedContentResource.java:221)
at org.flowable.app.rest.runtime.AbstractRelatedContentResource.createTemporaryRawContentItem(AbstractRelatedContentResource.java:130)
at org.flowable.app.rest.runtime.RelatedContentResource.createTemporaryRawContentItem(RelatedContentResource.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
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.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.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.flowable.app.filter.FlowableCookieFilter.doFilterInternal(FlowableCookieFilter.java:156)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
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:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.FileNotFoundException: data/uncategorized/9a816087-0a7d-11e8-9e15-00155d014b0a (Aucun fichier ou dossier de ce type)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at org.flowable.content.engine.impl.fs.SimpleFileSystemContentStorage.createContentObject(SimpleFileSystemContentStorage.java:95)
… 86 more

flowable%20upload%20file%201flowable%20upload%20file%202

Hi,

Looking at this particular line of the error, it looks like there is some problem either with creating a folder or some directory issue or maybe permission issue(you are using windows so i am not sure but looks like directory path is wrong, it should be something like C:\something\some_other_thing since in codebase, error message used file.getAbsolutePath() in the error message and by the error shown, this path is a unix style path).

What you can try is, inside the flowable-app.properties in the flowable-task app, you can try to set this property “contentstorage.fs.rootFolder” to some path in windows style path and see if it works.

Thanks,
Arpit Agrawal

Hi,

No, I installed on Ubuntu 16.04 LTS with Tomcat 8, Java 8 and Postgresql 9.3 .

Hi,

Then it might be a permissions issue i.e. you do not have permission to write content in that directory. You can google about how to give write permission to a particular directory and see if it works.

Thank You,
Arpit Agrawal

Hi,

I followed your instruction and everything work fine now.
I just change the default "data"path by the full path( /opt/tomcat/bin/data) of the “contentstorage.fs.rootFolder” .

Thank you very much Arpit.

Hi,

Happy to help! :slight_smile:

Thank You,
Arpit Agrawal

1 Like