当前位置: 技术问答>java相关
不明白的错误!!!
来源: 互联网 发布时间:2015-06-21
本文导语: java.lang.NullPointerException at com.caucho.vfs.ReadStream.setEncoding(ReadStream.java:400) at com.caucho.server.http.Request.setCharacterEncoding(Request.java:966) at com.caucho.server.http.RequestAdapter.setCharacterEncoding(RequestAdapter.java:270) at _jsp._service._profil...
java.lang.NullPointerException
at com.caucho.vfs.ReadStream.setEncoding(ReadStream.java:400)
at com.caucho.server.http.Request.setCharacterEncoding(Request.java:966)
at com.caucho.server.http.RequestAdapter.setCharacterEncoding(RequestAdapter.java:270)
at _jsp._service._profileadd__jsp._jspService(_profileadd__jsp.java:26)
at com.caucho.jsp.JavaPage.service(JavaPage.java:74)
at com.caucho.jsp.Page.subservice(Page.java:485)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:181)
at com.caucho.server.http.Invocation.service(Invocation.java:291)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:132)
at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:212)
at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:99)
at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:76)
at com.caucho.jsp.QPageContext.forward(QPageContext.java:520)
at _jsp._service._profileaddret__jsp._jspService(/jsp/service/profileaddret.jsp:56)
at com.caucho.jsp.JavaPage.service(JavaPage.java:74)
at com.caucho.jsp.Page.subservice(Page.java:485)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:181)
at com.caucho.server.http.Invocation.service(Invocation.java:291)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:132)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:217)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:159)
at com.caucho.server.TcpConnection.run(TcpConnection.java:136)
at java.lang.Thread.run(Thread.java:484)
这是什么错误?
at com.caucho.vfs.ReadStream.setEncoding(ReadStream.java:400)
at com.caucho.server.http.Request.setCharacterEncoding(Request.java:966)
at com.caucho.server.http.RequestAdapter.setCharacterEncoding(RequestAdapter.java:270)
at _jsp._service._profileadd__jsp._jspService(_profileadd__jsp.java:26)
at com.caucho.jsp.JavaPage.service(JavaPage.java:74)
at com.caucho.jsp.Page.subservice(Page.java:485)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:181)
at com.caucho.server.http.Invocation.service(Invocation.java:291)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:132)
at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:212)
at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:99)
at com.caucho.server.http.QRequestDispatcher.forward(QRequestDispatcher.java:76)
at com.caucho.jsp.QPageContext.forward(QPageContext.java:520)
at _jsp._service._profileaddret__jsp._jspService(/jsp/service/profileaddret.jsp:56)
at com.caucho.jsp.JavaPage.service(JavaPage.java:74)
at com.caucho.jsp.Page.subservice(Page.java:485)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:181)
at com.caucho.server.http.Invocation.service(Invocation.java:291)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:132)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:217)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:159)
at com.caucho.server.TcpConnection.run(TcpConnection.java:136)
at java.lang.Thread.run(Thread.java:484)
这是什么错误?
|
空指针错误
一般是你未初始化一个对象所造成的
比如:Hashtable h;
h.put(new Integer(3));
再使用h之前一定要先h = new Hashtable();
要不然就会产生这样的错误。
一般是你未初始化一个对象所造成的
比如:Hashtable h;
h.put(new Integer(3));
再使用h之前一定要先h = new Hashtable();
要不然就会产生这样的错误。
|
某个变量值为null了,而你对它进行了某种非法操作。
比如
String str = null;
int i = str.length();
System.out.println(i);
便会报这种错误。
比如
String str = null;
int i = str.length();
System.out.println(i);
便会报这种错误。