Hey all,
I'm writing a hospital automation app in
Struts 1.3.8 for a software development class and I'm having trouble writing out to a MySQL database. Specifically, the classes I'm having a problem with are for handling the situation where a patient is already logged into their account and are trying to check-in to the hospital. So they fill out a form and hit submit and then my
java is supposed to take the userID from the session attributes and use that as a key for changing a status variable in the database.
I think I have it ready to go, but I keep getting a 500 error:
root cause
java.lang.NullPointerException
database.generalDAO.checkinPatient(Unknown Source)
patient.CheckInAction.execute(Unknown Source)
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Here's my classes:
CheckInAction.java
CheckInForm.java
and our DAO
Any suggestions? This problem has been haunting me for hours and I can't find anything that points toward a solution. Sorry about dropping that much code in my first post.
Thanks,
Kyle
[ November 08, 2008: Message edited by: Kyle Oliveira ]