Wicket Form ERROR - Unable to write file

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Wicket Form ERROR - Unable to write file

lacribeiro11
This post has NOT been accepted by the mailing list yet.
Dear Nabble-Team,

I am having problems with my file Upload form in wicket. I am not being able of uploading any file into the online server.
This script worked already, but for some time it stopped.
So I search for answers, but I was getting the same error.

My code is equal to: http://www.mkyong.com/wicket/wicket-file-upload-example/ 
The difference is the folder path: String UPLOAD_FOLDER = "https://project11.myserver.com/content/images/";

Could you help with this problem?
Thank you in advance
Luis

P.S.: The explanation is under

Server:
Operating System: Debian GNU/Linux 7 (wheezy)
Tomcat: Tomcat 7
Permissions in folder /content/images/: 777

Local:
Tomcat: Tomcat 7
JDK: 1.7
Wicket: 6

Test
1. Open upload site
2. Select file aa.png(It doesn't exists in the server)
3. Press upload

Result:
28 10 13 18:19:31:630 - ERROR - Unable to write file
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
        at java.io.WinNTFileSystem.createFileExclusively(Native Method)
        at java.io.File.createNewFile(Unknown Source)
        at com.myproject.presentation.utils.examples.UploadPage$FileUploadForm.onSubmit(UploadPage.java:129)
        at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1246)
        at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1240)
        at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:274)
        at org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:245)
        at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1239)
        at org.apache.wicket.markup.html.form.Form.process(Form.java:921)
        at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:767)
        at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:700)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
        at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216)
        at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:240)
        at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226)
        at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840)
        at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
        at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254)
        at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211)
        at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282)
        at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:244)
        at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
        at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:267)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at com.myproject.shared.gui.filters.RedirectFilter.doFilter(RedirectFilter.java:42)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
        at java.io.WinNTFileSystem.createFileExclusively(Native Method)
        at java.io.File.createNewFile(Unknown Source)
        at com.myproject.presentation.utils.examples.FileUploadPage$1.onSubmit(FileUploadPage.java:45)
        at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1246)
        at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1240)
        at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:274)
        at org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:245)
        at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1239)
        at org.apache.wicket.markup.html.form.Form.process(Form.java:921)
        at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:767)
        at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:700)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
        at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216)
        at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:240)
        at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226)
        at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840)
        at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
        at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254)
        at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211)
        at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282)
        at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:244)
        at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
        at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:267)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at com.myproject.shared.gui.filters.RedirectFilter.doFilter(RedirectFilter.java:42)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
28 10 13 18:27:02:370 - ERROR - Unexpected error occurred
org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at [Form [Component id = form]] on component [Form [Component id = form]] threw an exception
        at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:268)
        at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216)
        at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:240)
        at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226)
        at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840)
        at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
        at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254)
        at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211)
        at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282)
        at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:244)
        at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
        at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:267)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at com.myproject.shared.gui.filters.RedirectFilter.doFilter(RedirectFilter.java:42)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
        ... 30 more
Caused by: java.lang.IllegalStateException: Error
        at com.myproject.presentation.utils.examples.FileUploadPage$1.onSubmit(FileUploadPage.java:51)
        at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1246)
        at org.apache.wicket.markup.html.form.Form$9.component(Form.java:1240)
        at org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:274)
        at org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:245)
        at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1239)
        at org.apache.wicket.markup.html.form.Form.process(Form.java:921)
        at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:767)
        at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:700)
        ... 35 more