multipart/form-data and java.lang.NoClassDefFoundE

2019-07-22 12:07发布

I'm having this jsp page.

<form method="post" action="addBook.do?reqCode=submit" enctype="multipart/form-data">
<input type="file" name="myfile" />
</form>

When I submit, I got this error

java.lang.NoClassDefFoundError: java.rmi.server.UID is a restricted class. Please see the Google  App Engine developer's guide for more details.
at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51)
at org.apache.commons.fileupload.disk.DiskFileItem.<clinit>(DiskFileItem.java:103)
at org.apache.commons.fileupload.DefaultFileItemFactory.createItem(DefaultFileItemFactory.java:103)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:358)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:310)
at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:193)

I'm using struts-1.2.9.jar , common-io-1.3.2.jar and common-file-upload-1.2.1.jar

I didn't even write code for the controller. Just with the jsp, I got that error. Any help will be greatly appreciated.

1条回答
登录 后发表回答