struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anoop <>
Subject Stuts-hibernate integration.
Date Mon, 13 Oct 2008 05:47:28 GMT

I am working on a project of developing a web application and we have
decided to use struts and hibernate together. The problem is in their
integration and getting them to work together. I used the
struts-hibernate plugin code given at the hibernate site I also made the neccessary
modifications to the struts-config.xml file as instructed. However, I
get a null pointer exception when i try to open a session in the
struts action. Please help on how to integrate the two.

here are the relevant bits of code
in struts-config
				value="/hibernate.cfg.xml" />
				value="true" />

in struts action
SessionFactory _factory = (SessionFactory)
			Session ses = _factory.openSession(); <---this line throws exception..

Anoop Dhanvijay

"Most of man's failures were when they didn't realize how close they
were to success, when they finally gave up!"

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message