Uploading image error

6
Hi, When i add an image in my application (client), the following error is printed in my log: cannot create output stream Anyone an idea how to solve this? regards Floor
asked
4 answers
3

Hi Floor,

are you working on your local machine or with a deployed application? In the latter case it might have to do something with the permissions under which the application is running. Furthermore, there should be enough free disk space. How to check these items depends on your environment, e.g. windows or linux.

answered
3

Hi Michel,

The users have suffcient rights (Full control)to the folder WEB-INF. The thumb files are created but are 0 KB..... There is enough diskspace (24 GB) The XAS runs in a 64 BIt environment. Still the error cannot create output stream appears...

Any idea?

Thanks!

answered
1

Stacktrace for error cannot create output stream:

2009-12-20 16:46:47.406 INFO - EXTERNALINTERFACE: New login request from [0:0:0:0:0:0:0:1], User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729) 2009-12-20 16:46:47.409 INFO - CORE: Login OK: user theo 2009-12-20 16:46:47.411 INFO - CORE: Killing old session for user theo because new session is created. 2009-12-20 16:46:47.415 INFO - CORE: Logout: Theo 2009-12-20 16:46:47.424 INFO - CORE: New session for user 'theo' is created 2009-12-20 16:47:01.962 ERROR EXTERNALINTERFACE: com.mendix.connectionbus.ConnectionBusException: FileDatastore::writeThumbnail Error writing Image Thumbnail: 4031638.jpg: Can't create output stream! com.mendix.connectionbus.D.A(ConnectionBus.java:349) com.mendix.core.Core.storeImageDocumentContent(Core.java:1588) com.mendix.externalinterface.servlet.FileServlet.A(FileServlet.java:99) com.mendix.externalinterface.servlet.MxServlet.B(MxServlet.java:71) com.mendix.externalinterface.servlet.MxServlet.doPost(MxServlet.java:54) javax.servlet.http.HttpServlet.service(HttpServlet.java:727) javax.servlet.http.HttpServlet.service(HttpServlet.java:820) org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389) org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417) org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49) org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) org.mortbay.jetty.Server.handle(Server.java:326) org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879) org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)

Caused by: FileDatastore::writeThumbnail Error writing Image Thumbnail: 4031638.jpg: Can't create output stream! com.mendix.connectionbus.connections.A.A.A(FileDataStore.java:215)

answered
1

i cannot really find a reason why java cannot create the output stream. Did you try different images? Make sure it are JPG images.

Furthermore make sure that the UploadedFilesPath setting in application.conf is set (and not to /dev/null) (although in my experience a wrong upload path results in another exception first)

answered