Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate connection problem with struts2

 
Sweta Chauhan
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

ORA-12519, TNS:no appropriate service handler found

Does the service name you are specifying exist? Can it accept connections?
 
Sweta Chauhan
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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/
 
Sweta Chauhan
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The last paragraph of that link explains the steps.
 
Sweta Chauhan
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Sturrock wrote:The last paragraph of that link explains the steps.


Means I will have to restart my application?
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic