The file Example.png could not be found

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( at org.eclipse.jetty.server.handler.HandlerList.handle( at org.eclipse.jetty.server.handler.HandlerWrapper.handle( at org.eclipse.jetty.server.Server.handle( at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest( at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete( at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete( at org.eclipse.jetty.http.HttpParser.parseNext( at org.eclipse.jetty.http.HttpParser.parseAvailable( at org.eclipse.jetty.server.AsyncHttpConnection.handle( at at$ at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob( at org.eclipse.jetty.util.thread.QueuedThreadPool$ at Thanks in advance for any helping comments!
2 answers

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?


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

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