HTTP Status 500 - java.lang.objectNullPointerException

HTTP Status 请教什么原因?500 - Reque nested exception is java.lang.NullPointerException
type Exception report
message Reque nested exception is java.lang.NullPointerException
description The server encountered an internal error that prevented it from fulfilling this request.
org.springframework.web.util.NestedServletException: Reque nested exception is java.lang.NullPointerException
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:948)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
root cause
java.lang.NullPointerException
com.neu.action.FurnitureAction.getAllFurnitureList(FurnitureAction.java:35)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:497)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:440)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:428)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.30 logs.
com.neu.action.FurnitureAction.getAllFurnitureList(FurnitureAction.java:35)
--- 共有 1 条评论 ---
解决了,sql语句写的时候多了一个空格导致这个错误,其实代码没什么毛病& 相关文章 &
HTTP Status 500 - Request processing failed; nested exception is java.lang.NullPointerException
HTTP Status 500 - Request processing failed; nested exception is java.lang.NullPointerException type Exception report message Request processing failed; nested exception is java.lang.NullPointerException description The server encountered
HTTP Status 500 - Request processing failed; nested exception is java.lang.NullPointerException
HTTP Status 500 - Request processing failed; nested exception is java.lang.NullPointerException type Exception report message Request processing failed; nested exception is java.lang.NullPointerException description The server encountered
HTTP Status 500 - Unable to instantiate Action, sfbpbzbAction, defined for 'getAllSfbpbzb' in namespace '/'Error creating bean with name 'sfbpbzbAction' defined in file [E:\java\apache-tomcat-7.0.42\webapps\railsp\WEB-INF\classes\spring
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException Table 'xinghe.base_class' doesn't exist HTTP Status 500 - Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: type Exception report message Request
报错:HTTP Status 500 -
最不友好的 界面报错: HTTP Status 500 -
type Exception report
description The server encountered an internal error () that prevented it from fulfilling this request.
org.apache.jasper.JasperException: java.lang.NullPointerException
严重: Servlet.service() for servlet [centralServlet] in context with path [/UserTest] threw exception [Request processing failed; nested exception is net.sf.json.JSONException: java.lang.reflect.InvocationTargetException] with root cause
HTTP Status 500 - Request processing failed; nested exception is org.springframework.jdbc.BadSqlGram
HTTP Status 500 - Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: type Exception report message Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException
使用hibernate遇到一些问题,罗列出来作为札记备忘。 1.遇到了如下的错误信息:[ERROR,Dispatcher] Exception occurred during processing request: Could not commit H nested exception is org.hibernate.TransactionException: Transaction not successfully started
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception i
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileOutputStream 如题,遇到了这个问题。只要加上commons-io-1.3.1,问题解决.
注意提示信息:Mapped Statements collection does not contain value for Addressbook.pageSelect 此问题的原因是Dao层使用的命名空间与Mapper文件中使用的不一致; HTTP Status 500 - Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception
问题1: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.ClassCastException: org.apache.catalina.connector.RequestFacade
程序刚一运行访问就抛出了上面的类型转换异常信息,根据提示信息,找到了导致该异常的代码行
is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.spring.action.UserAction]: Constructor threw exception; nested exception is java.lang.NullPointerException applicationContext.xml文件 action文件 测试文件 运行的时候总是提示userAction无法实例化,后来把HttpServletRequest request=ServletActionContext.getRequest();这句话去掉就搞定了。 下面的是猜测,获取上下文的request对象是针对http请求来说的,对于网页请求,这句话不会错,但是这里是直接在main()函数里面运行,根本没有这个东西存在,所以报错。
[applicationContext-monitor-checkaccount-transfer.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException Caused by: java.lang.NullPointerException
at org.quartz.impl.StdSchedulerFactory.initialize(StdSchedulerFactory.java:329
IE页面中提示 : HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception java.lang.NullPointerException
huc.blog.op.UserOp.checkExist(UserOp.java:67
关于HTTP Status大家可以参考百度百科:HTTP状态码 下面是代码: package com.homeland.myapp.
public enum HttpStatus {
CONTINUE(100, "CONTINUE", "Continue"),
SWITCHING_PROTOCOLS(101, "SWITCHING_PROTOCOLS", "Switching Protocols"),
PROCESSING(102
问题: 今天用 Tomcat5.5.12 ,发现原来很好用的系统不能用了,反复测试发现页面中不能包含 taglib ,否则会出现以下提示: HTTP Status 500 -type Exception report Message
description The server encountered an internal error () that prevented it from fulfilling this request. exception
taglib,否则会出现以下提示: HTTP Status 500 -type Exception report Message descrīption The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: /index.jsp(1,1) Unable to read TLD
asp.net ajax Sys.WebForms.PageRequestManagerServerErrorException 500 解决方法
在用asp.net ajax出现如下错误时: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. the status code returned from the server was:500
解决方法,在.aspx文件中加上 ValidateRequest="false"
quartz 集群出现问题([DefaultQuartzScheduler_Worker-1] but has failed to stop it.)
严重: An error occured while scanning for the next trigger to fire. org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource.DefaultQuartzScheduler': java.lang.NullPointerException [See nested exception
failed; nested exception is org.apache.ibatis.binding.BindingException: Mapper method 'com.bill.springMybatis.dao.UserDao.getUserIdByName attempted to return null from a method with a primitive return type (int
& 2012 - 2016 & aiuxian.com &All Rights Reserved. &
/*爱悠闲图+*/
var cpro_id = "u1888441";HTTP Status 500 -java.lang.NullPointerException_百度知道
HTTP Status 500 -java.lang.NullPointerException
type Exception report
description The server encountered an internal error () that prevented it from fulfilling this request.
java.lang.NullPointerException
com.wy.tool.JDBConnection.executeQuery(JDBConnect...
使用Tomcat 6.0+JSP 做的一个网站,昨天都可以登陆,但是现在出现了这样的问题?如果能解决这问题,我会追加分的。谢谢!
我有更好的答案
你这个是数据库连接出现问题了,你仔细检查一下,你的数据库是否打开,数据库密码是否更改,最好试下用数据库工具登录一下试试
采纳率:50%
空指针,看信息是JDBC有问题吧你检查下connection,preparedStatement这些是不是为null
数据库应该是打开了.如果没打开,报错应该不是报java.lang.NullPointerException你可以按提示com.wy.tool.JDBConnection.executeQuery(JDBConnection.java:52) com.wy.dao.ConsumerDao.getConsumerForm(ConsumerDao.java:100) com.wy.webiter.ConsumerServlet.checkConsumer(ConsumerServlet.java:187) com.wy.webiter.ConsumerServlet.doGet(ConsumerServlet.java:32) com.wy.webiter.ConsumerServlet.doPost(ConsumerServlet.java:204)查你的代码,从连接开始向外查
空值异常 也就是说在JDBConnection.java类的第52行,使用的某个对象为空从你的类名和函数名来判断很可能是数据库连接问题
可以肯定是数据库连接的问题连接数据库的connection为空请仔细和连接数据库有关的代码
其他2条回答
为您推荐:
其他类似问题
nullpointerexception的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。HTTP Status 500 - java.lang.NullPointerException,求高手指导_java吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:709,185贴子:
HTTP Status 500 - java.lang.NullPointerException,求高手指导收藏
600位java名师组成的强大教学阵容,java全程项目驱动教学,学习即积累工作经验.做被企业疯抢的Java开发人才,来黑马java,一站搞定
学是学的快,可惜没有一点处理问题的能力,为了功能而学
加扣远程帮你看看
空指针异常,应该是你执行查询的时候返回结果为空,你debug一步一步调就知道问题出哪了
你前端的表单对应的action找不到或无法执行
登录百度帐号15:27 提问
执行页面出现
HTTP Status 500
description The server encountered an internal error that prevented it from fulfilling this request.
java.lang.NullPointerException
com.dao.BooksDao.selBookByPage(BooksDao.java:30)
com.servlet.IndexServlet.doPost(IndexServlet.java:70)
com.servlet.IndexServlet.doGet(IndexServlet.java:25)
javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
com.filter.EncodeFilter.doFilter(EncodeFilter.java:24)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.57 logs.
错误页面出现这个情况,怎么解决呢
求大神们帮助
按赞数排序
报500是说服务器出了问题,从你的报错信息来看是产生了空指针异常,也就是一个对象还没有实例化就使用报错信息中给出了两个个文件:BooksDao.java、IndexServlet.java按照给出的代码行数去看是哪个对象没有实例化,把它实例化就好了
java.lang.NullPointerException
com.dao.BooksDao.selBookByPage(BooksDao.java:30)
com.servlet.IndexServlet.doPost(IndexServlet.java:70)
com.servlet.IndexServlet.doGet(IndexServlet.java:25)
500表示服务器运行异常
这几行分别表示 空指针异常,booksdao.java第30行出错向上抛出异常,indexservlet.java第70行抛异常,IndexServlet.java:25第25行抛异常。
后两个是因为dao运行时有了异常抛出来的不用管,就看booksdao30行什么变量空了,你没贴具体代码所以不知道到底什么情况
500服务器报错,com.dao.BooksDao.selBookByPage(BooksDao.java:30)这个类的30行报了空指针错误,你可以在获取数据那里做个判断
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐

我要回帖

更多关于 java.lang.exception 的文章

 

随机推荐