ssh整合报错,出现了空指针

问题描述

ssh整合报错,出现了空指针

18-Feb-2016 23:52:29.943 INFO [RMI TCP Connection(3)-127.0.0.1] org.apache.struts2.config.AbstractBeanSelectionProvider.info Choosing bean (struts) for (org.apache.struts2.dispatcher.DispatcherErrorHandler)
18-Feb-2016 23:52:43.055 SEVERE [http-apr-8080-exec-2] org.apache.struts2.dispatcher.DefaultDispatcherErrorHandler.error Exception occurred during processing request: null
java.lang.NullPointerException
at cn.itcast.action.EmployeeAction.execute(EmployeeAction.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

报错的位置

            <!-- action实例交给spring容器创建 -->
            <action name="show" class="cn.itcast.action.EmployeeAction" method="execute">
                    <result name="SUCCESS">/index.jsp</result>
            </action>

    </package>

解决方案

cn.itcast.action.EmployeeAction的show方法的参数怎么写的,或者获取getParameter等参数没有获取到,调试下。

解决方案二:

at cn.itcast.action.EmployeeAction.execute(EmployeeAction.java:24)
24行是什么,,

解决方案三:

你把EmployeeAction 这个类贴出来看下,这个类的24行报错

解决方案四:

检查下EmployeeAction.java:24这个地方,有没有使用什么对象,调试下这些对象为什么为空?
空指针问题其实是很好定位和排查的,祝好!

时间: 2024-12-10 02:46:58

ssh整合报错,出现了空指针的相关文章

ssh整合报错404

问题描述 struts-config.xml<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEstruts-configPUBLIC"-//ApacheSoftwareFoundation//DTDStrutsConfiguration1.2//EN""http://struts.apache.org/dtds/struts-config_1_2.dtd"><

急死人了,SSH整合报错,高手进来帮忙解决啊,org.springframework.beans.factory.BeanCreationException

问题描述 2010-11-13 12:37:39 org.apache.catalina.core.AprLifecycleListener init信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:InstalledMyEclipsebin;D:In

SSH整合报错,求大神指导!!

问题描述 2014-10-1114:51:21org.apache.catalina.startup.HostConfigdeployDirectory信息:DeployingwebapplicationdirectoryROOT2014-10-1114:51:21org.apache.catalina.startup.HostConfigdeployDirectory信息:DeployingwebapplicationdirectorySSHTest12014-10-1114:51:22,42

SSH整合报错

问题描述 Invalid bean definition with name 'dataSource' defined in class path resource [applicationContext.xml]: Could not resolve placeholder 'jdbc.driverClassName' 找不到错误原因,希望得到大家的帮助,谢谢 解决方案 他的问题是 编译器没编译最新的到 classpath解决方案二:jdbc.driverClassName检查你的配置文件,是

maven 整合springmvc spring myatis整合报错

问题描述 maven 整合springmvc spring myatis整合报错 java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]] at java.util.concurrent.FutureTask.

spring mvc与struts 整合报错

问题描述 spring mvc与struts 整合报错 报错如下求帮忙,谢谢严重: Exception starting filter struts2Unable to load configuration. - action - file:/E:/java/eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/bishe/WEB-INF/classes/struts.xml:11:74 at org.apa

hibernate与oracle数据库整合报错

问题描述 hibernate与oracle数据库整合报错 Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException: 数据库版本与驱动版本一致,请教哪位高手指点一下.

myeclipsespringmvc mybatis 整合报错

问题描述 myeclipsespringmvc mybatis 整合报错 Error while adding the mapper 'interface com.bdqn.mapper.HouseMapper' to configuration. org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumbe

SpringMVC + hiberante 整合报错,跪求神人指导。。。

问题描述 问题找了一天了,还望神人多多指点启动就报错,先贴上配置信息Pom.xml<projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/maven-v