我在检票口中的文件上传表单有问题。我无法将任何文件上传到在线服务器。
这个脚本已经工作了,但有一段时间它停止了。
所以我搜索答案,但我得到了同样的错误。
我的代码等于:http ://www.mkyong.com/wicket/wicket-file-upload-example/ 不同之处在于文件夹路径不像示例中那样是本地的,而是通过 https 指向远程 url .
附加信息:
- 服务器
- 操作系统:Debian GNU/Linux 7 (wheezy)
- 雄猫:雄猫 7
- taget 文件夹中的权限:777
- 当地的:
- 雄猫:雄猫 7
- JDK:1.7
- 检票口:6
测试
- 打开上传站点
- 选择文件aa.png(服务器中不存在)
- 按上传
结果:
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)
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`
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