The file Example.png could not be found

0
I'm having a weird error, which I can not pinpoint. I'm developing Client Profiles for an app, which includes a Client Object. This Client Object is related to a Logo Object (1-1 Association), which inherits from System.Image. The logo is shown whenever a ClientUser logs into the application. This works perfectly, but after a random period of time (ranging from days to weeks), the ClientUser login fails, due to an error that says the image cannot be found, therefore the page cannot be loaded and keeps 'loading' (Blocking popup).. When looking into the Postgres Database directly, both Objects and the 1-1 Association is present. Did any of you ever encountered something similar? The data is there, when removing the image data directly from the postgres database the error is resolved and the ClientUser can login / upload a new Logo. This however, can't be a solution when this goes to production. The error message stacktrace is as follows: com.mendix.systemwideinterfaces.MendixRuntimeException: FileDatastore: Image does not exist at com.mendix.core.objectmanagement.FileProcessor.getImageFileLength(SourceFile:144) at com.mendix.oV.b(SourceFile:353) at com.mendix.oV.a(SourceFile:237) at com.mendix.oV.b(SourceFile:230) at com.mendix.oV.a(SourceFile:63) at com.mendix.oV.processRequest(SourceFile:54) at com.mendix.externalinterface.connector.MxRuntimeConnector.processRequest(SourceFile:74) at com.mendix.core.impl.MxRuntimeImpl.processRequest(SourceFile:729) at com.mendix.m2ee.appcontainer.server.handler.RuntimeHandler.handle(RuntimeHandler.java:45) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:368) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:744) Thanks in advance for any helping comments!
asked
2 answers
0

The image is actually stored on disk in \deployment\data\files in the related subfolder by identifier of the object, so even if the object is in the database, it could still be missing there. That's also what the exception indicates, that it can't find the actual file on disk that's supposed to be there.

The cause of this eludes me though. Normally when an image object is deleted from the database, the relevant file is also deleted. But because the record seems to be there, I don't know why this would happen. Is there anything you do manually in terms of copying application folders around or something similar? Perhaps even backupping the deployment folder and database individually while running the application?

answered
0

I am bumping this because OP pretty much exactly describes my problem. We had System.Images associated with Users and now we cannot see the images. I get this error:

The file 'b32a6010-884b-4a44-ad97-xxxxxxxxxxx' could not be found.

com.mendix.systemwideinterfaces.MendixRuntimeException: FileDataStore:: File does not exist: 14775
    at com.mendix.storage.localfilesystem.internal.LocalFileSystemStore.com$mendix$storage$localfilesystem

I tried retrieving the file from the specialised System.Image entity by the name 'b32a6010-884b-4a44-ad97-xxxxxxxxxxx' and I can find it and it does have contents. If I search for this file on my system, I also find it in /deployment/data/files

However, in the app itself, the image does not show.

Is a reference to the file broken or something? Any idea on how I can resolve this?

Thank you

answered