2017-04-05 2 views
0

Ich entwickle eine Google-App in Java, aber ich bekomme diesen Fehler: java.io.FileOutputStream is a restricted class nur , wenn ich versuche, eine CSV-Datei größer als andere zu laden. Alles funktioniert gut, wenn ich Datei 5-6kb hochlade, erhalte ich Fehler mit 30kb Datei. Ich importierte natürlich alle Bibliotheken und lese einige Tutorial/Fragen, aber ich weiß nicht, um dieses Problem zu lösen.NoClassDefFoundError: java.io.FileOutputStream ist eine eingeschränkte Klasse

Code auf Servlet:

FileItemFactory factory = new DiskFileItemFactory(); 
     ServletFileUpload upload = new ServletFileUpload(factory); 
     upload.setFileSizeMax(50000); 
     upload.setSizeMax(50000); 
     List<FileItem> items = upload.parseRequest(req); // <-- error line (48) 

java.lang.NoClassDefFoundError: java.io.FileOutputStream 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:50) 
at org.apache.commons.io.output.DeferredFileOutputStream.thresholdReached(DeferredFileOutputStream.java:178) 
at org.apache.commons.io.output.ThresholdingOutputStream.checkThreshold(ThresholdingOutputStream.java:224) 
at org.apache.commons.io.output.ThresholdingOutputStream.write(ThresholdingOutputStream.java:128) 
at org.apache.commons.fileupload.util.Streams.copy(Streams.java:108) 
at org.apache.commons.fileupload.util.Streams.copy(Streams.java:70) 
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:347) 
at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:115) 
at it.injenia.gestionefirme.servlet.uploadkind.UploadKind.doPost(UploadKind.java:48) 

Antwort

Verwandte Themen