请教一下这个空指针是怎么回事?

问题描述

在公司的时候一切正常,由于公司装修,我们都在家用vpn连公司内网,我的项目却在每次添加记录的时候报空指针,所有添加记录的时候都有这个错误了,很郁闷啊!代码如下:(求各位神人帮忙解答)java.lang.NullPointerExceptionatjava.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:157)atjava.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:730)atorg.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1035)atorg.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:110)atcom.ite.oxhide.struts.action.AbstractAction.isTokenValid(AbstractAction.java:477)atcom.ite.oxhide.struts.actionEx.BaseSaveAction.repeatSubmit(BaseSaveAction.java:92)atcom.ite.oxhide.struts.actionEx.BaseSaveAction.add(BaseSaveAction.java:118)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:585)atorg.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)atorg.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)atcom.ite.oxhide.struts.action.AbstractAction.execute(AbstractAction.java:142)atorg.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106)atorg.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)atorg.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)atorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)atorg.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:710)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.ite.jbpmex.fiter.JbpmContextHolder.doFilter(JbpmContextHolder.java:88)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.ite.sso.client.utils.SSOFilter.input(SSOFilter.java:258)atcom.ite.sso.client.utils.SSOFilter.doFilter(SSOFilter.java:210)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.tdeccn.table.filter.TDExportFilter.doFilter(TDExportFilter.java:175)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)atjava.lang.Thread.run(Thread.java:595)[framework]2009-12-0214:18:46,937-cn.com.ite.ghxt.organization.jfman.action.JfmanSaveAction-95781[http-8088-1]INFOcn.com.ite.ghxt.organization.jfman.action.JfmanSaveAction-===============请求结束===============before:java.lang.NullPointerExceptionatjava.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:157)atjava.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:730)atorg.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1035)atorg.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:110)atcom.ite.oxhide.struts.action.AbstractAction.isTokenValid(AbstractAction.java:477)atcom.ite.oxhide.struts.actionEx.BaseSaveAction.repeatSubmit(BaseSaveAction.java:92)atcom.ite.oxhide.struts.actionEx.BaseSaveAction.add(BaseSaveAction.java:118)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:585)atorg.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)atorg.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)atcom.ite.oxhide.struts.action.AbstractAction.execute(AbstractAction.java:142)atorg.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106)atorg.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)atorg.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)atorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)atorg.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:710)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.ite.jbpmex.fiter.JbpmContextHolder.doFilter(JbpmContextHolder.java:88)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.ite.sso.client.utils.SSOFilter.input(SSOFilter.java:258)atcom.ite.sso.client.utils.SSOFilter.doFilter(SSOFilter.java:210)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.tdeccn.table.filter.TDExportFilter.doFilter(TDExportFilter.java:175)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)atjava.lang.Thread.run(Thread.java:595)

解决方案

解决方案二:
程序的问题,和vpdn有啥子关系哟
解决方案三:
空指针,就是用某个东西的时候,这个东西是null。楼主不是做java的吧。
解决方案四:
你得先去程序里找找,看看那个对象为空了。然后,才好解决。
解决方案五:
问题是,我公司的时候是正常的,家里就错误了,怎么回事呢?
解决方案六:
传了一个null的key给ConcurrentHashMap
解决方案七:
楼主,检查下你某个变量是不是为空!
解决方案八:
atcom.ite.oxhide.struts.action.AbstractAction.isTokenValid(AbstractAction.java:477)atcom.ite.oxhide.struts.actionEx.BaseSaveAction.repeatSubmit(BaseSaveAction.java:92)atcom.ite.oxhide.struts.actionEx.BaseSaveAction.add(BaseSaveAction.java:118)lz看看这个BaseSaveAction.add类有没有出错?
解决方案九:
ConcurrentHashMap使用时要加lock,大并发量会出空指针
解决方案十:
应该是程序的问题,debug看一下哪出了问题
解决方案十一:
atcom.ite.oxhide.struts.actionEx.BaseSaveAction.repeatSubmit(BaseSaveAction.java:92)BaseSaveAction.java:92看看是不是这里啊!
解决方案十二:
atcom.ite.oxhide.struts.action.AbstractAction.isTokenValid(AbstractAction.java:477)debugger跑一下
解决方案十三:
com.ite.oxhide.struts.action.AbstractAction.isTokenValid(AbstractAction.java:477)在这里抛出来的,你debug看哪个对象是空的,你操作了null对象,所以抛出了异常!
解决方案十四:
你设置一个断点试试啊,慢慢来,跟那个东西没关系的,估计是程序不够稳健才会造成这种后果

时间: 2024-09-20 15:32:24

请教一下这个空指针是怎么回事?的相关文章

菜鸟请教安装DotNet2.0是怎么回事

问题描述 我下了个进销存管理系统有100多M安装说明写到1.须先安装DotNet2.0:2.再安装瑞智进销存管理系统精简版:初始用户:Admin,密码:1(此程序不含数据库安装包,以供用户快速部署试用,如须数据库请到www.rz2008.cn下载sql2005)3.再安装SQL2005SQL2000服务器请问DotNet2.0多大是什么东东 解决方案 解决方案二:.net的运行库到ms的网站上去下载解决方案三:下载:http://dl.pconline.com.cn/html_2/1/82/id

请教一个VC++函数参数注释的问题

问题描述 请教一个VC++函数参数注释的问题 Void CAboutDlg::OnContextMenu(CWnd* /*pWnd*/, CPoint /*point*/) 比如说这个吧,这是我想添加右键菜单而创建的命令响应的函数,为什么一创建完这个函数,后面的两个参数就是注释着的呢?把注释去掉也能用,好像在低版本的VC++里面没有这样的问题吧,我用的是VC2013请教一下各位这是怎么回事呀? 解决方案 如果你不用参数,可以只定义参数类型,不给参数名,这是C语法允许的.

directx-windows游戏编程大师里的问题

问题描述 windows游戏编程大师里的问题 #define INITGUID #include // include important windows stuff #include #include // include directdraw // DEFINES //////////////////////////////////////////////// // default screen size #define SCREEN_WIDTH 640 // size of screen

用libvlc二次开发时如何知道播放失败了

问题描述 用libvlc二次开发时如何知道播放失败了 我用libvlc做二次开发,播放rtsp流.代码很简单,初始化vlc实例,media变量,player变量.然后调用libvlc_media_player_play函数进行播放.但是我发现,我用libvlc_media_new_location函数创建media变量时,哪怕我传入的是一个错误的rtsp地址,libvlc_media_player_play函数返回的也是0(代表正确)为什么返回的不是-1???请教大神这是怎么回事,或者说,我如何

小女子求教:spring aop读取自定义annotation值问题

问题描述 第一次发帖,不知道位置是否正确,见谅系统架构:struts2+spring+ibatis目标是想记录用户的一些操作信息,所以自定义了一个annotation选择方法需要记录的参数@Target(ElementType.METHOD)@Retention(RetentionPolicy.RUNTIME)@Documentedpublic@interfaceLog{publicStringdescription();publicintparamIndex()default0;//第几个参数

session-spring事务的一个问题

问题描述 spring事务的一个问题 一个类实现了InitializingBean后,在afterPropertiesSet方法里取sessionFactory.getCurrentSession();,但是报异常 No Session found for current thread.说明spring的事务没有开启,但是已经配置了.想请教下各位大大是怎么回事 解决方案 spring 事务问题Spring AOP 事务问题Spring里多线程共享事务的问题--------------------

Erlang中文模式匹配疑问

问题描述 新建一个名为data.txt,格式为utf8无bom的,里面只是飞机二字,然后用以下程序测试抛出异常: -module(demo).-compile(export_all).test_cn() -> {ok, Fp} = file:open("data.txt", [read, {encoding, utf8}]), {ok, Content} = file:read_line(Fp), file:close(Fp), io:format("~w~n"

linux open cat-linux下open不了设备,求教!!!!!

问题描述 linux下open不了设备,求教!!!!! 我有一个USB接口的手柄,插上后在dev文件夹里会显示hidraw1,但我是open不了这个设备,指令是open("/dev/hidraw1",O_RDONLY).而我用cat指令却能在终端看到手柄的输出数据.请教各位能人这是怎么回事,我该如何在程序中打开该设备. 解决方案 open打开的时候返回什么错误信息,是不是没有权限

exception-安卓空指针 异常 请问 怎么回事 小弟刚开始写安卓代码

问题描述 安卓空指针 异常 请问 怎么回事 小弟刚开始写安卓代码 03-30 12:16:38.625: E/AndroidRuntime(19941): FATAL EXCEPTION: main 03-30 12:16:38.625: E/AndroidRuntime(19941): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.voldian/com.voldian.voldian.shangc