Error while saving uploaded file in mendix 10.6

0
Hello Everyone,   I created a new project in mendix 10.6 and  uploading a file and saving it but getting some error as file size and name is also not reflecting on the page after browsing the file.  I tried by deleting the project and created new project again but still the same error.   If anyone has any idea. Please let me know. Error-  Uploading file failed: Setting value of FileStoreMendixBinaryImpl outside of a transaction, may cause a stale file in file storage if not committed.   Message and stacktrace-   Uploading file failed: Setting value of FileStoreMendixBinaryImpl outside of a transaction, may cause a stale file in file storage if not committed. [User 'demo_administrator' with session id 'da0287a5-XXXX-XXXX-XXXX-XXXXXXXXe28f' and roles 'Administrator'] -------- com.mendix.core.CoreRuntimeException: Setting value of FileStoreMendixBinaryImpl outside of a transaction, may cause a stale file in file storage if not committed.    at com.mendix.basis.objectmanagement.member.MendixBinaryFileStoreImpl.inContext(MendixBinaryFileStoreImpl.scala:97)    at com.mendix.basis.objectmanagement.member.MendixBinaryFileStoreImpl.setValue(MendixBinaryFileStoreImpl.scala:64)    at com.mendix.basis.objectmanagement.member.MendixBinaryFileStoreImpl.setValue(MendixBinaryFileStoreImpl.scala:26)    at com.mendix.basis.objectmanagement.MendixObjectMember.setValue(MendixObjectMember.java:31)    at com.mendix.basis.objectmanagement.MendixObjectMemberImpl.setValue(MendixObjectMemberImpl.java:244)    at com.mendix.filedocumentprocessor.internal.FileDocumentProcessorImpl.writeContent(FileDocumentProcessorImpl.scala:204)    at com.mendix.filedocumentprocessor.internal.FileDocumentProcessorImpl.storeFileDocument(FileDocumentProcessorImpl.scala:70)    at com.mendix.basis.component.FileDocumentCore.storeFileDocumentContent(FileDocumentCore.scala:32)    at com.mendix.basis.component.FileDocumentCore.storeFileDocumentContent$(FileDocumentCore.scala:27)    at com.mendix.basis.component.InternalCore.storeFileDocumentContent(InternalCore.scala:24)    at com.mendix.webui.requesthandling.FileUploadHelper.$anonfun$doUpload$2(FileUploadHelper.scala:149)    at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)    at com.mendix.webui.requesthandling.helpers.StateHandling.withState(StateHandling.scala:46)    at com.mendix.webui.requesthandling.helpers.StateHandling.withState$(StateHandling.scala:43)    at com.mendix.webui.requesthandling.FileUploadHelper.withState(FileUploadHelper.scala:30)    at com.mendix.webui.requesthandling.helpers.StateHandling.withState(StateHandling.scala:40)    at com.mendix.webui.requesthandling.helpers.StateHandling.withState$(StateHandling.scala:33)    at com.mendix.webui.requesthandling.FileUploadHelper.withState(FileUploadHelper.scala:30)    at com.mendix.webui.requesthandling.FileUploadHelper.doUpload(FileUploadHelper.scala:126)    at com.mendix.webui.requesthandling.FileUploadHelper.handleUpload(FileUploadHelper.scala:44)    at com.mendix.webui.requesthandling.FileRequestHandler.handleRequest(FileRequestHandler.scala:39)    at com.mendix.webui.requesthandling.FileRequestHandler.processRequest(FileRequestHandler.scala:31)    at com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:37)    at com.mendix.external.connector.MxRuntimeConnector.$anonfun$processRequest$1(MxRuntimeConnector.scala:54)    at com.mendix.external.connector.MxRuntimeConnector.$anonfun$processRequest$1$adapted(MxRuntimeConnector.scala:54)    at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:20)    at com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.scala:54)    at com.mendix.basis.impl.MxRuntimeImpl.processRequest(MxRuntimeImpl.scala:222)    at com.mendix.m2ee.appcontainer.server.handler.RuntimeServlet.service(RuntimeServlet.scala:40)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)    at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1665)    at org.eclipse.jetty.websocket.servlet.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:170)    at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)    at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527)    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1570)    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1384)    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484)    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1543)    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1306)    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)    at org.eclipse.jetty.server.Server.handle(Server.java:563)    at org.eclipse.jetty.server.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1598)    at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:753)    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:501)    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:287)    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)    at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421)    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390)    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277)    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:199)    at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411)    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969)    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194)    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149)    at java.base/java.lang.Thread.run(Thread.java:829)
asked
2 answers
1

This is a known issue of 10.6.0 and it will be fixed in 10.6.1. 

Executing the following SQL or performing equivalent before EACH restart to set the value false

 can be a workaround. 

UPDATE "mendixsystem$properties" SET "value" = false WHERE "key" = 'oldFileMigrationCompleted'

Or you can reach out to Mendix Support ask for the official workaround. 

Please see: 

https://docs.mendix.com/releasenotes/studio-pro/10.6/#known-issues

Uploading and creating new FileDocuments results in the “Setting value of FileStoreMendixBinaryImpl outside of a transaction, may cause a stale file in file storage if not committed” error. We are investigating the root cause of this issue.

answered
0

It's a Mendix 10.6 issue 

I have the same problem https://forum.mendix.com/link/space/studio-pro/questions/130625 

answered