-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Please Help
PostPosted: Tue Nov 06, 2007 4:16 am 
Newbie

Joined: Tue Nov 06, 2007 4:12 am
Posts: 17
I have a simple DAO that has this function.
public List findAll() {
log.debug("finding all PokerSites instances");
try {
String queryString = "from PokerSites";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();

} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}


In my struts ActionClass I have this simple line
PokerSitesDAO test = new PokerSitesDAO();
List services = test.findAll();

I get this error

java.lang.NullPointerException
com.gerberdata.poker.PokerSitesDAO.findAll(PokerSitesDAO.java:99)
com.gerberdata.poker.ShowSitesAction.execute(ShowSitesAction.java:35)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

Any Idea Why this is happening. This works fine if I don't use the web and just run a java class as an application with the same function call. I would appreciate anyones input.
Dave


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.