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

Hibernate connection problem with struts2

Sweta Chauhan
Ranch Hand

Joined: Jul 09, 2010
Posts: 53
My CRUD application in struts2 with Hibernate3 is working fine, but when I tried to update, delete or view option with very little interval in that case I got following error and Hibernate could not establish connection with database.


Please give me some guide how to get rid off this error.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


ORA-12519, TNS:no appropriate service handler found

Does the service name you are specifying exist? Can it accept connections?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Sweta Chauhan
Ranch Hand

Joined: Jul 09, 2010
Posts: 53
Paul Sturrock wrote:

ORA-12519, TNS:no appropriate service handler found

Does the service name you are specifying exist? Can it accept connections?


Yes it accepts the connection, I am able to update, add and even delete the records from table.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2510
    
  10

From the connection string in the error, it seems that you are using Oracle Express.

There is a known workaround for this problem:
http://en.newinstance.it/2007/06/01/ora-12519-tnsno-appropriate-service-handler-found/


OCUP UML fundamental and ITIL foundation
youtube channel
Sweta Chauhan
Ranch Hand

Joined: Jul 09, 2010
Posts: 53
Jan Cumps wrote:From the connection string in the error, it seems that you are using Oracle Express.

There is a known workaround for this problem:
http://en.newinstance.it/2007/06/01/ora-12519-tnsno-appropriate-service-handler-found/


Yes you are right I am using Oracle Express. I didn't got the idea of how to trouble shoot the problem could you give me some idea.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

The last paragraph of that link explains the steps.
Sweta Chauhan
Ranch Hand

Joined: Jul 09, 2010
Posts: 53
Paul Sturrock wrote:The last paragraph of that link explains the steps.


Means I will have to restart my application?
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2510
    
  10

No. It says: execute an sql command, and restart the [tns] listener. The listener is part of Oracle's software.

Instructions for restarting the listener:
http://download.oracle.com/docs/cd/B25329_01/doc/admin.102/b25107/network.htm#CIHHJEDF
Sweta Chauhan
Ranch Hand

Joined: Jul 09, 2010
Posts: 53
Jan Cumps wrote:No. It says: execute an sql command, and restart the [tns] listener. The listener is part of Oracle's software.

Instructions for restarting the listener:
http://download.oracle.com/docs/cd/B25329_01/doc/admin.102/b25107/network.htm#CIHHJEDF


Thanks, but if I optimize my coding for database connection then I don't need to restart the listener. As it is mentioned in the url which you have suggested that it is because of
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2510
    
  10

You don't need to restart the listener after each sql.

You have to execute the sql statement “ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;” once.
Then restart the listener once

Fixed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate connection problem with struts2