Java.sql.sqlexception Listener Refused The Connection With The Following Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About listener refused the connection with the following error ora-12514 Us Learn more about Stack Overflow the company Business Learn more about hiring listener refused the connection with the following error ora-12519 developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the listener refused the connection with the following error ora-12505 Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up java.sql.SQLException: Listener refused the connection listener refused the connection with the following error ora-12505 in oracle sql developer with the following error: ORA-12519, TNS:no appropriate service handler found up vote 0 down vote favorite 2 I am passing Resultset object to each thread. Each thread is connecting to the database and inserting data. Untill thread 110 it is working fine. After it crosses 111 thread it throws the above exception. I am using oracle 11g. My sample Thread code is: class MyThreadClass implements Runnable
Ora 12505 Error In Sql Developer
{ public Connection connection; public Statement statement2; public ResultSet rs2; public String cookie; public MyThreadClass(ResultSet rs1) { rs2=rs1; } public void run() { try { cookie=rs2.getString("COOKIE"); driver = "oracle.jdbc.driver.OracleDriver"; url = "jdbc:oracle:thin:@127.0.0.1:1521:xx"; /* connection statement2.executeUpdate("INSERT INTO visit_header VALUES ('"+cookie+"')"); } I am not getting how to handle this exception. java oracle jdbc share|improve this question edited Apr 26 '13 at 7:00 Rahul Bobhate 2,72311232 asked Apr 26 '13 at 6:56 user2314206 13125 add a comment| 3 Answers 3 active oldest votes up vote 11 down vote Your multi-threaded application is opening too many Connections/Sessions. Hence, the listener is dropping and blocking new connections for a while. Check your DB resource usage first: SELECT * FROM v$resource_limit WHERE resource_name IN ('processes','sessions'); Check to see if your MAX_UTILIZATION for either your Processes or Sessions is getting too close to the LIMIT_VALUE. If yes, you should either: Use DB Connection pooling to share Connection objects between threads. Or, Increase the number of processes/sessions that Oracle can service simultaneously. Actually, Connection Pooling (#1) should always be done. An application cannot scale up otherwise. Check Apache Commons DBCP for details. For #2, open a new SQL*Plus session as SYSTEM and run
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of
Ora 12505 Error In Oracle 11g
this site About Us Learn more about Stack Overflow the company Business Learn listener refused the connection with the following error ora-12516 more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question listener refused the connection with the following error ora-12528 x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up http://stackoverflow.com/questions/16230446/java-sql-sqlexception-listener-refused-the-connection-with-the-following-error Error connecting to Oracle DB from Java up vote 5 down vote favorite 2 Could someone please help me on why I received the following error while trying to connect to Oracle db from java.... The connection call is: Connection con = DriverManager.getConnection( "jdbc:oracle:thin:@winson.net:1522/hcrod", "manager", "passing"); I receive the following error: java.sql.SQLException: Listener refused the connection with the following error: ORA-12514, TNS:listener does not currently http://stackoverflow.com/questions/8104133/error-connecting-to-oracle-db-from-java know of service requested in connect descriptor at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:113) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:389) at oracle.jdbc.driver.PhysicalConnection.
Certification Databases Caching Books Engineering Languages Frameworks Products This Site Careers Other all forums Forum: JDBC and Relational https://coderanch.com/t/464640/JDBC/databases/error-Listener-refused-connection-error Databases Getting error like " Listener refused the connection with the following error: ORA-12514, ..." Rupa Katkar Ranch Hand Posts: 35 posted 7 years ago Hi, I am using oracle 10 g, When i am executing the Login.jsp page, it is giving me error like this...... error while connecting to Oraclejava.sql.SQLException: Listener refused listener refused the connection with the following error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor The Connection descriptor used by the client was: //localhost:1521/Scott My tnsnames.ora file contains.. Scott = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.112.4.99)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = test) ) ) this listener refused the entry. And my connection snippet is like this public class ORConnection { public static OracleDataSource ods; // set the datasource public static void setORDataSource() throws SQLException { ods = new OracleDataSource(); ods.setUser("scott"); ods.setPassword("tiger"); ods.setURL("jdbc:oracle:thin:@//localhost:1521/Scott"); } // get the connection public static Connection getORConnection() throws SQLException { if (ods == null) { setORDataSource(); } return ods.getConnection(); } } Please solve my problem Regards, Rupa. ujjwal soni Ranch Hand Posts: 403 posted 7 years ago Hi Rupa, I think this hyperlink will be quite useful to you in resolving this error. http://www.dbmotive.com/oracle_error_codes.php?errcode=12514 Cheers!!! Ujjwal B Soni