got5/tapestry5-jquery — Issue #136: multi upload does not (always) work
Author: sommeralex
Created: 2012-02-12 21:11:25+00:00
State: open

If am uploading the same files several times, uploading sometimes succeeds, but sometimes not.

[ERROR] ioc.Registry Unable to write uploaded file content to src/main/webapp/layout/images/sommeralex/linda2.JPG
[ERROR] ioc.Registry Operations trace:
[ERROR] ioc.Registry [ 1] Triggering event 'upload' on Gallery:uploadimage
[ERROR] ioc.Registry [ 2] Triggering event 'ajaxFileUpload' on Gallery:uploadimage
[ERROR] ioc.Registry Unable to write uploaded file content to src/main/webapp/layout/images/sommeralex/linda2.JPG
[ERROR] ioc.Registry Operations trace:
[ERROR] ioc.Registry [ 1] Triggering event 'upload' on Gallery:uploadimage
[ERROR] ioc.Registry [ 2] Triggering event 'ajaxFileUpload' on Gallery:uploadimage
[INFO] AppModule.TimingFilter Request time: 871 ms
[INFO] AppModule.TimingFilter Request time: 873 ms
[ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Unable to write uploaded file content to src/main/webapp/layout/images/sommeralex/linda2.JPG
org.apache.tapestry5.runtime.ComponentEventException: Unable to write uploaded file content to src/main/webapp/layout/images/sommeralex/linda2.JPG [at classpath:com/scrollstory/pages/Gallery.tml, line 31]
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1130)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3200(ComponentPageElementImpl.java:61)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1051)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1048)
at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1121)
at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1047)
at org.apache.tapestry5.internal.services.AjaxComponentEventRequestHandler.handle(AjaxComponentEventRequestHandler.java:110)
at org.apache.tapestry5.internal.services.ajax.AjaxFormUpdateFilter.handle(AjaxFormUpdateFilter.java:56)
at $ComponentEventRequestHandler_1271d81499d18b8e.handle(Unknown Source)
at $ComponentEventRequestHandler_1271d81499d18b87.handle(Unknown Source)
at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
at $ComponentEventRequestHandler_1271d81499d18b89.handle(Unknown Source)
at org.apache.tapestry5.upload.internal.services.UploadExceptionFilter.handle(UploadExceptionFilter.java:75)
at $ComponentEventRequestHandler_1271d81499d18b89.handle(Unknown Source)
at org.apache.tapestry5.services.TapestryModule$40.handle(TapestryModule.java:2456)
at $ComponentEventRequestHandler_1271d81499d18b89.handle(Unknown Source)
at $ComponentEventRequestHandler_1271d81499d18acc.handle(Unknown Source)
at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
at org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39)
at $ComponentRequestHandler_1271d81499d18acd.handleComponentEvent(Unknown Source)
at $ComponentRequestHandler_1271d81499d18a93.handleComponentEvent(Unknown Source)
at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46)
at $Dispatcher_1271d81499d18a98.dispatch(Unknown Source)
at $Dispatcher_1271d81499d18a8f.dispatch(Unknown Source)
at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302)
at com.scrollstory.services.AppModule$1.service(AppModule.java:99)
at $RequestFilter_1271d81499d18a8e.service(Unknown Source)
at $RequestHandler_1271d81499d18a90.service(Unknown Source)
at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
at $RequestHandler_1271d81499d18a90.service(Unknown Source)
at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902)
at $RequestHandler_1271d81499d18a90.service(Unknown Source)
at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892)
at $RequestHandler_1271d81499d18a90.service(Unknown Source)
at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
at $RequestHandler_1271d81499d18a90.service(Unknown Source)
at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:105)
at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:95)
at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:119)
at $RequestHandler_1271d81499d18a90.service(Unknown Source)
at $RequestHandler_1271d81499d18a82.service(Unknown Source)
at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253)
at org.got5.tapestry5.jquery.services.AjaxUploadServletRequestFilter.service(AjaxUploadServletRequestFilter.java:26)
at $HttpServletRequestHandler_1271d81499d18a84.service(Unknown Source)
at org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
at $HttpServletRequestHandler_1271d81499d18a84.service(Unknown Source)
at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
at $HttpServletRequestHandler_1271d81499d18a84.service(Unknown Source)
at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
at $HttpServletRequestFilter_1271d81499d18a7e.service(Unknown Source)
at $HttpServletRequestHandler_1271d81499d18a84.service(Unknown Source)
at org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852)
at $HttpServletRequestHandler_1271d81499d18a84.service(Unknown Source)
at $HttpServletRequestHandler_1271d81499d18a7d.service(Unknown Source)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.apache.tapestry5.ioc.internal.OperationException: Unable to write uploaded file content to src/main/webapp/layout/images/sommeralex/linda2.JPG [at classpath:com/scrollstory/pages/Gallery.tml, line 31]
at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121)
at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88)
at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1121)
at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1047)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerEvent(ComponentPageElementImpl.java:1020)
at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.triggerEvent(InternalComponentResourcesImpl.java:292)
at org.got5.tapestry5.jquery.components.AjaxUpload.onUpload(AjaxUpload.java:229)
at org.got5.tapestry5.jquery.components.AjaxUpload.dispatchComponentEvent(AjaxUpload.java)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:931)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1106)
... 73 more
Caused by: org.apache.tapestry5.runtime.ComponentEventException: Unable to write uploaded file content to src/main/webapp/layout/images/sommeralex/linda2.JPG [at classpath:com/scrollstory/pages/Gallery.tml, line 31]
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1130)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3200(ComponentPageElementImpl.java:61)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1051)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1048)
at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
... 83 more
Caused by: java.lang.RuntimeException: Unable to write uploaded file content to src/main/webapp/layout/images/sommeralex/linda2.JPG
at org.apache.tapestry5.upload.internal.services.UploadedFileItem.write(UploadedFileItem.java:82)
at com.scrollstory.pages.Gallery.onImageUpload(Gallery.java:57)
at com.scrollstory.pages.Gallery.dispatchComponentEvent(Gallery.java)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:923)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1106)
... 87 more
Caused by: java.io.FileNotFoundException: /var/folders/w0/qxbnxjxd7970dmp0vm59znwm0000gn/T/upload__69b60e17_13573631d30__7fff_00000000.tmp (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:120)
at org.apache.commons.fileupload.disk.DiskFileItem.write(DiskFileItem.java:447)
at org.apache.tapestry5.upload.internal.services.UploadedFileItem.write(UploadedFileItem.java:78)
... 91 more
[ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Unable to write uploaded file content to src/main/webapp/layout/images/sommeralex/linda2.JPG
org.apache.tapestry5.runtime.ComponentEventException: Unable to write uploaded file content to src/main/webapp/layout/images/sommeralex/linda2.JPG [at classpath:com/scrollstory/pages/Gallery.tml, line 31]
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1130)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3200(ComponentPageElementImpl.java:61)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1051)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1048)
at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1121)
at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1047)
at org.apache.tapestry5.internal.services.AjaxComponentEventRequestHandler.handle(AjaxComponentEventRequestHandler.java:110)
at org.apache.tapestry5.internal.services.ajax.AjaxFormUpdateFilter.handle(AjaxFormUpdateFilter.java:56)
at $ComponentEventRequestHandler_1271d81499d18b8e.handle(Unknown Source)
at $ComponentEventRequestHandler_1271d81499d18b87.handle(Unknown Source)
at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
at $ComponentEventRequestHandler_1271d81499d18b89.handle(Unknown Source)
at org.apache.tapestry5.upload.internal.services.UploadExceptionFilter.handle(UploadExceptionFilter.java:75)
at $ComponentEventRequestHandler_1271d81499d18b89.handle(Unknown Source)
at org.apache.tapestry5.services.TapestryModule$40.handle(TapestryModule.java:2456)
at $ComponentEventRequestHandler_1271d81499d18b89.handle(Unknown Source)
at $ComponentEventRequestHandler_1271d81499d18acc.handle(Unknown Source)
at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
at org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39)
at $ComponentRequestHandler_1271d81499d18acd.handleComponentEvent(Unknown Source)
at $ComponentRequestHandler_1271d81499d18a93.handleComponentEvent(Unknown Source)
at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46)
at $Dispatcher_1271d81499d18a98.dispatch(Unknown Source)
at $Dispatcher_1271d81499d18a8f.dispatch(Unknown Source)
at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302)
at com.scrollstory.services.AppModule$1.service(AppModule.java:99)
at $RequestFilter_1271d81499d18a8e.service(Unknown Source)
at $RequestHandler_1271d81499d18a90.service(Unknown Source)
at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
at $RequestHandler_1271d81499d18a90.service(Unknown Source)
at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902)
at $RequestHandler_1271d81499d18a90.service(Unknown Source)
at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892)
at $RequestHandler_1271d81499d18a90.service(Unknown Source)
at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
at $RequestHandler_1271d81499d18a90.service(Unknown Source)
at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:105)
at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:95)
at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:119)
at $RequestHandler_1271d81499d18a90.service(Unknown Source)
at $RequestHandler_1271d81499d18a82.service(Unknown Source)
at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253)
at org.got5.tapestry5.jquery.services.AjaxUploadServletRequestFilter.service(AjaxUploadServletRequestFilter.java:26)
at $HttpServletRequestHandler_1271d81499d18a84.service(Unknown Source)
at org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
at $HttpServletRequestHandler_1271d81499d18a84.service(Unknown Source)
at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
at $HttpServletRequestHandler_1271d81499d18a84.service(Unknown Source)
at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
at $HttpServletRequestFilter_1271d81499d18a7e.service(Unknown Source)
at $HttpServletRequestHandler_1271d81499d18a84.service(Unknown Source)
at org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852)
at $HttpServletRequestHandler_1271d81499d18a84.service(Unknown Source)
at $HttpServletRequestHandler_1271d81499d18a7d.service(Unknown Source)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.apache.tapestry5.ioc.internal.OperationException: Unable to write uploaded file content to src/main/webapp/layout/images/sommeralex/linda2.JPG [at classpath:com/scrollstory/pages/Gallery.tml, line 31]
at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121)
at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88)
at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1121)
at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1047)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerEvent(ComponentPageElementImpl.java:1020)
at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.triggerEvent(InternalComponentResourcesImpl.java:292)
at org.got5.tapestry5.jquery.components.AjaxUpload.onUpload(AjaxUpload.java:229)
at org.got5.tapestry5.jquery.components.AjaxUpload.dispatchComponentEvent(AjaxUpload.java)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:931)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1106)
... 73 more
Caused by: org.apache.tapestry5.runtime.ComponentEventException: Unable to write uploaded file content to src/main/webapp/layout/images/sommeralex/linda2.JPG [at classpath:com/scrollstory/pages/Gallery.tml, line 31]
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1130)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3200(ComponentPageElementImpl.java:61)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1051)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1048)
at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
... 83 more
Caused by: java.lang.RuntimeException: Unable to write uploaded file content to src/main/webapp/layout/images/sommeralex/linda2.JPG
at org.apache.tapestry5.upload.internal.services.UploadedFileItem.write(UploadedFileItem.java:82)
at com.scrollstory.pages.Gallery.onImageUpload(Gallery.java:57)
at com.scrollstory.pages.Gallery.dispatchComponentEvent(Gallery.java)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:923)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1106)
... 87 more
Caused by: java.io.FileNotFoundException: /var/folders/w0/qxbnxjxd7970dmp0vm59znwm0000gn/T/upload__69b60e17_13573631d30__7fff_00000000.tmp (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:120)
at org.apache.commons.fileupload.disk.DiskFileItem.write(DiskFileItem.java:447)
at org.apache.tapestry5.upload.internal.services.UploadedFileItem.write(UploadedFileItem.java:78)
... 91 more
[INFO] AppModule.TimingFilter Request time: 1082 ms
page attached
[INFO] AppModule.TimingFilter Request time: 23 ms