Forum LAMS for Tech-Heads - General Forum: Problems retrieving information


 
You may request notification for Problems retrieving information.
Search: 

1: Problems retrieving information
04/29/10 09:49 AM
[ Reply | Forward ]
Hi everyone

While developing my LAMS tool, I had to create an abstract DAO object for the purpose of access and modify DB data. I have implement it as well.

My problem is that I also had to add an instance of this DAO I created to the service class layer (mine is called socialToolForLAMSUserTweetDAO) and give it a null value, just like the other ones.

But, when I try to access the information using the DAO methods, the console gives me an error message telling me that the object is null.

In the starter learner action, the service instance is created with the SocialToolForLAMSServiceProxy.getSocialToolForLAMSService(getServlet().getServletContext()); instruction.

What I am supposed to do?

Thanks in advance!

Posted by Felipe Peña

2: Re: Problems retrieving information
In response to 1 05/02/10 06:19 PM
[ Reply | Forward ]
Hi Felipe,

You need to also make sure the spring bean is being created. that is what you are fetching when you call that method.

You will need to look at the applicationContext.xml file to check if the bean is being initiated properly.

If you have not used spring before, you should look at a couple of tutorials, like the one below.

http://tinyurl.com/nurye8

hope this helps.

Luke

Posted by Luke Foxton

3: Re: Re: Problems retrieving information
In response to 2 05/02/10 09:35 PM
[ Reply | Forward ]
Hi Luke

I have actually resolved this problem a few days ago. I hadn't run the generate-hbm-files action with Ant. That was why my new DAO object was null and also because my object class wasn't declared on a hibernate file.

Anyway, I appreciate your help!

Posted by Felipe Peña

Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum