aspose file tools*
The moose likes Object Relational Mapping and the fly likes second request of servlet cause hibernate problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "second request of servlet cause hibernate problem" Watch "second request of servlet cause hibernate problem" New topic
Author

second request of servlet cause hibernate problem

Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

Hi guys,
i wrote a servlet in which i'm calling a DAO class that uses hibernate. i used the simplest hibernate.cfg.xml and annotated classes . to create sessionFactory i use a static method that returns same sessionFactory instance each time and open a session (actually getCurrentSession())
if i enter servlet url in browser it runs fine for first time ,but if i keep tomcat server running then request servlet for second time it throws exception below.

is this problem because i use a static method that returns the same sessionFactory instance? if not can anyone what exception below is about?

Thanks.

Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

i fixed previous db connection problem. but when i use this url =http://harpsoft-register-test.com:8080/harpsoft_register/PayPalIPNListener
in paypal ipn simulator it tells me it couldn't connect to specified url.
what i did is i edited file/etc/hosts and added line:
127.0.0.1 harpsoft-register-test.com
when i browse to http://harpsoft-register-test.com:8080/harpsoft_register/PayPalIPNListener in browser the servlet runs well ,but when i specify url_notification="http://harpsoft-register-test.com:8080/harpsoft_register/PayPalIPNListener " in paypal ipn simulator it said it could'nt connect to this url.
probably my router setttings? or firewall ? i'm using a Linux openSuse box.
hope you can help in figuring out how to test url with 'localhost' inside paypal ipn simulator at https://developer.paypal.com/us/cgi-bin/devscr if you have a developer test account in paypal.

thanks much
 
 
subject: second request of servlet cause hibernate problem