File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Error trying to save some data to a data base, using an spring manager class from a listening class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Error trying to save some data to a data base, using an spring manager class from a listening class" Watch "Error trying to save some data to a data base, using an spring manager class from a listening class" New topic
Author

Error trying to save some data to a data base, using an spring manager class from a listening class

Juan Acv
Greenhorn

Joined: Apr 02, 2010
Posts: 18
Hello everybody.

I'm trying to save some data related to an user in a database when login, using a spring-hibernate manager. I am using a class that implements HttpSessionAttributeListener, to add the data, and to increment a users connected counter:


The method returns an error:



Even the program never reach the method getClientData() in the UserDataManager (it isn't appear in the log)

What i am doing wrong? May be, it's not possible to access to a spring-hibernate manager from a Listener?

thank you.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Moving to Spring, as this has nothing to do with Struts.
Juan Acv
Greenhorn

Joined: Apr 02, 2010
Posts: 18
Thanks

I found an example about what I wanted to do:

http://www.mkyong.com/spring/spring-how-to-do-dependency-injection-in-your-session-listener/

Greetings.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error trying to save some data to a data base, using an spring manager class from a listening class
 
Similar Threads
The method setValue(String, Object) in the type TagSupport is not applicable for the arguments (Obje
Can write data but can't read data from database
The method setValue(String, Object) in the type TagSupport is not applicable for the arguments (Obje
XStream + variable as an attribute to another variable which is tag.
Timestamping in Hibernate