java.lang.NullPointerException: No FileItemFactory has been set.

1、错误描述

java.lang.NullPointerException: No FileItemFactory has been set.
	at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:354)
	at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
	at com.romeo.backbone.servlet.UploadServlet.doPost(UploadServlet.java:86)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	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:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)

	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:662)

2、错误原因

3、解决办法

时间: 2024-10-10 21:39:45

java.lang.NullPointerException: No FileItemFactory has been set.的相关文章

在Servlet使用getServletContext()获取ServletContext对象出现java.lang.NullPointerException(空指针)异常的解决办法

今天遇到了一个在servlet的service方法中获取ServletContext对象出现java.lang.NullPointerException(空指针)异常,代码如下: 1 //获取ServletContext对象 2 ServletContext servletContext = this.getServletContext(); 这个问题很奇怪,也是第一次遇到,因为以前在servlet的doGet/doPost方法中要获取ServletContext对象时都是这样写的,也没有出现过

解决kylin build cube第一步报错:java.lang.NullPointerException

报错栈: 2017-06-19 10:27:35,757 ERROR [pool-9-thread-4] threadpool.DefaultScheduler:140 : ExecuteException job:933bc47a-302c-48fa-8ec9-ae8730057175 org.apache.kylin.job.exception.ExecuteException: org.apache.kylin.job.exception.ExecuteException: java.la

?--Porg.springframework.beans.MethodInvocationException: Property 'username' threw exception; nested exception is java.lang.NullPointerException

使用BoneCP作为连接池,在启动Tomcat报出以下异常: 一月 02, 2016 2:12:17 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:mynewdpi' did not find a

百度地图定位 java.lang.NullPointerException

整了四五天显示的地图终于不是北京了,心酸泪一把T~T. java.lang.NullPointerException 是空指针异常,问候了度娘,又看了几遍自己的代码都没觉得有异常, 突发奇想的改了改代码竟然成了..... (下面是改完后的代码) 1 public class Local_MainActivity extends Activity { 2 private MapView mapView; 3 private BaiduMap baiduMap; 4 private Location

一般报java.lang.NullPointerException的原因有以下几种

一般报java.lang.NullPointerException的原因有以下几种: ·字符串变量未初始化: ·接口类型的对象没有用具体的类初始化,比如: List lt; 会报错 List lt = new ArrayList(); 则不会报错了 ·当一个对象的值为空时,你没有判断为空的情况. 你可以试着把下面的代码前加一行代码: if(rb!=null); ................... String类型的对象可以做如下判断 if(rb!==null&&!""

java.lang.NullPointerException at com.pp.controller.PPUserController.updateDetail(PPUserController.java:34)

问题原因:忘记写@Resource: 由此而知:可能是service没有引进去. 全部错误代码: 22:33:17,883 DEBUG SessionImpl:243 - Opened session at timestamp: 14308363978 22:34:11,470 ERROR AdminController:39 - 用户User [id=11, name=caowenyan, pwd=null, mail=null, photo=null, createdate=null, lo

解决Context.getExternalFilesDir(null)返回null造成java.lang.NullPointerException的问题

问题产生: 今天在写一个日志工具类的时候,想把日志文件放在外存储设备的应用专用文件夹里,即,如:/mnt/sdcard/myPackageName /Android/data/files下.很自然的用起来Context.getExternalFilesDir(null)方法,但是在写好工具 类,测试时报java.lang.NullPointerException,懵了! 找了好久的解决方法: 有说是因为   权限问题,把< uses-permission android:name ="an

android启动时报错Unable to instantiate application xxxx:java.lang.NullPointerException

如果程序已经运行,再安装到手机的时候总是报以下错误.而且是在打开特定的Activity的情况下才会报错. 06-26 09:45:16.971: E/AndroidRuntime(29733): java.lang.RuntimeException: Unable to instantiate application com.css.promotiontool.ui.CSSAppliction: java.lang.NullPointerException06-26 09:45:16.971:

Eclipse无法启动报An internal error occurred during: &quot;reload maven project&quot;. java.lang.NullPointerException

由于没有正常关机导致eclipse无法将数据正常写入配置文件导致无法启动.报这样一个异常 An internal error occurred during: "reload maven project". java.lang.NullPointerException 查看workspace/.metadata/.log发现如下异常: !ENTRY org.eclipse.core.resources 2 10035 2015-12-15 09:31:13.488 !MESSAGE T