Wednesday, February 4, 2009

ORA-12516, TNS:listener could not find available handler with matching protocol stackThe Connection descriptor used by the client was:localhost:1521/XE

Caused by: java.sql.SQLException: Listener refused the connection with the following error:

ORA-12516, TNS:listener could not find available handler with matching protocol stack

The Connection descriptor used by the client was:

localhost:1521/XE

 

or

ORA-12516, TNS:listener could not find available handler with matching protocol stack

The Connection descriptor used by the client was:

localhost:1521/XE

 

18:46:48,468 ERROR [STDERR] org.hibernate.exception.GenericJDBCException: Cannot open connection

    at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)

    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)

    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)

    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)

    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)

    at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)

    at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)

    at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)

    at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)

    at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)

    at $Proxy61.beginTransaction(Unknown Source)

    at com.paging.classes.DAO.getTotalData(DAO.java:40)

    at org.apache.jsp.paging_jsp._jspService(paging_jsp.java:85)

    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)

    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)

    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)

    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)

    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)

    at java.lang.Thread.run(Unknown Source)

 

Ans: This exception will be raised by crossing the number of processes or requests to the database. .We have to handle either in application or by increasing no of processes in oracle database file init.ora.

C:\oraclexe\app\oracle\product\10.2.0\server\config\scripts\init.ora

 

##############################################################################

# Copyright (c) 1991, 2005, Oracle. All rights reserved.

##############################################################################

 

###########################################

# Cursors and Library Cache

###########################################

open_cursors=300

 

###########################################

# Database Identification

###########################################

db_name=XE

 

###########################################

# Diagnostics and Statistics

###########################################

background_dump_dest=C:\oraclexe\app\oracle\admin\XE\bdump

core_dump_dest=C:\oraclexe\app\oracle\admin\XE\cdump

user_dump_dest=C:\oraclexe\app\oracle\admin\XE\udump

 

###########################################

# File Configuration

###########################################

control_files=("C:\oraclexe\oradata\XE\control.dbf")

 

###########################################

# Job Queues

###########################################

job_queue_processes=10

 

###########################################

# Miscellaneous

###########################################

compatible=10.2.0.1.0

 

###########################################

# Processes and Sessions

###########################################

sessions=20

 

###########################################

# SGA Memory

###########################################

sga_target=570M

 

###########################################

# Security and Auditing

###########################################

audit_file_dest=C:\oraclexe\app\oracle\admin\XE\adump

remote_login_passwordfile=EXCLUSIVE

 

###########################################

# Shared Server

###########################################

dispatchers="(PROTOCOL=TCP) (SERVICE=XEXDB)"

shared_servers=4

 

###########################################

# Sort, Hash Joins, Bitmap Indexes

###########################################

pga_aggregate_target=190M

 

###########################################

# System Managed Undo and Rollback Segments

###########################################

undo_management=AUTO

undo_tablespace=UNDO

 

###########################################

# Backup and Recovery

###########################################

DB_RECOVERY_FILE_DEST_SIZE = 10G

DB_RECOVERY_FILE_DEST = C:\oraclexe\app\oracle\flash_recovery_area

 

os_authent_prefix=""

 

by increasing job queues we can overcome this exception. Default value for instance server is 4.

Here I have increased this value to 10.

We can change other properties if your application needs additional .

9 comments:

  1. wow.. gotta really like this, gorgeous +

    My page ... order arrow sheds

    ReplyDelete
  2. I think you ought to stage out that a whole lot of steroids are taken to perform this.
    I teach in a bb health club, the blokes there do not even try and hide it.


    Here is my site: sample muscle building diet for men

    ReplyDelete
  3. Gary Null says coconut oil is excellent to prevent cavities .
    .. Add to toothpaste!

    Here is my website :: zoom teeth whitening reviews 2011

    ReplyDelete
  4. ..than females are of publishing photographs of them selves inside the "Women seeking Men" discussion board?


    My weblog ... how to attract beautiful women

    ReplyDelete
  5. Wonderful stuff as usual...

    Also visit my website: six pack shortcuts members login page

    ReplyDelete
  6. Genuinely good publish. I`ve attempted some facebook campaigns
    but unsuccessful. Additional keyword targeting can be a excellent
    notion. But how you can uncover pictures that operate?


    Feel free to visit my webpage: online dating websites history

    ReplyDelete
  7. How about world war hulk vs. superman prime

    Visit my website: premature ejaculation treatment for men

    ReplyDelete
  8. i just emailed this article to my close friends! many thanks!



    Feel free to visit my web-site - 2 girls teach sex tori black

    ReplyDelete
  9. "While humans generally compensate to get a rapidly by eating twice as a lot the next day, mice and rats normally don't. They are doing consume far more, although not twice as a lot - which implies they may be calorie limited."

    my site - how to eat healthy while traveling

    ReplyDelete