Connection Refused Description Error 1153
Contents |
New Topic programming forums Java Java JSRs Mobile Certification Databases Caching Books Engineering Languages Frameworks Products This Site Careers Other all forums Forum: JDBC and Relational Databases JDBC - Connection Refused Error. Connecting (trying) to Oracle DB. Rembrandt Reyes
Java Sql Sqlexception Io Exception Connection Refused
Greenhorn Posts: 3 posted 7 years ago warning: greenhorn = me. I am getting the error=(code=305)(emfi=1) following error message in my log file whenever I run my Java app which makes connections to an Oracle DB: SQLException: Io exception:
Oracle Err=1153
Connection refused (DESCRIPTION=(ERR=1153)(VSNNUM=169869568)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4) (ARGS='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.###.###)(PORT=1521))) (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))null))'))(ERROR=(CODE=303)(EMFI=1)))) I am sure the HOST is correct. I have also tried using the server name. Using google fu, I've found references to needing to use a driver called classes12.jar Although I'm not quite connection refused(description=(err=1153)(vsnnum=0)(error_stack=(error=(code=1153)(emfi=4) sure what to do with it (I've place it in different locations of the app directory but it didn't do anything) Let me know what other information I can share to help me solve my problem. Background info, we've recently changed from using a single node to load balancing 2 nodes. That is when the problem started (and when I inherited this application). I should also warn that this is my first programming/DB assignment coming from ora-28040: no matching authentication protocol a hardware backround. I miss the warm comforts of my switches and routers.... Thank you in advance. Remy Paul Campbell Ranch Hand Posts: 338 posted 7 years ago It is your Oracle JDBC driver. in your classpath would be a good spot for it. Rembrandt Reyes Greenhorn Posts: 3 posted 7 years ago - Thanks for the reply Paul. I've made sure the classes12.jar is in the ClassPath and it already was. D:\SystemApps\Oracle\ora92\jdbc\lib\classes12.jar I also added classes12.jar as a jar to my project and then redeployed the app. I'm still getting the same errors. - To make sure I understand this, classes12.jar is an oracle driver or what Java uses to communicate with the oracle database. By placing it in the environment variables, the system knows where to find the said driver (and the file does exist in the location above) - Do I need to do anything else with the file to get it to "be seen"? - More info: I've installed tomcat on my machine and deployed the code there. It works. No errors. I didn't have to change anything locally (server and local machine are both using Tomcat 5.5). I'm not sure how my local copy is able to talk to Oracle without the classes12.jar driver? Balu Sadhasivam Ranch Hand Posts: 874 I like... posted 7 years ago It might b
here for a quick overview of the
Ojdbc14.jar Download
site Help Center Detailed answers to any questions you ora-12505 might have Meta Discuss the workings and policies of this site About Us Learn
Oracle Jdbc Driver Download
more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation https://coderanch.com/t/431821/JDBC/databases/JDBC-Connection-Refused-Error-Connecting Tags Users Badges Ask Question 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 Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=168821248)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)))) error up vote 2 down http://stackoverflow.com/questions/6503144/io-exception-connection-refuseddescription-tmp-vsnnum-168821248err-12505 vote favorite Yesterday i was using oracle 9.1 with ojdbc 14 jdbc driver with following code for adding employee, it was working fine but now i am using oracle 10.1.0.2.0 with ojdbc14 but now it is giving following error Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=168821248)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)))) error Following is code for adding employee public static Connection getConnection() throws Exception { String driver = "oracle.jdbc.driver.OracleDriver"; String url = "jdbc:oracle:thin:@localhost:5500:globldb3"; String username = "scott"; String password = "tiger"; Class.forName(driver); Connection conn = DriverManager.getConnection(url, username, password); return conn; } public String addEmployee(){ Connection conn = null; PreparedStatement pstmt = null; boolean committed = false; try { conn = getConnection(); conn.setAutoCommit(false); String query = "INSERT INTO employee(e_id,e_name,e_f_name,e_desg,e_address,e_phone_no,"+ "e_salary,e_house_rent,e_conv_allow,e_email,d_name,e_hire_month,e_hire_year)"+ "VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)"; pstmt = conn.prepareStatement(query); pstmt = conn.prepareStatement(query); // create a statement pstmt.setInt(1,this.eid); pstmt.setString(2,this.ename); pstmt.setString(3,this.efname); pstmt.setString(4,this.edesg); pstmt.setString(5,this.eaddress); pstmt.setLong(6,this.ephoneno); pstmt.setInt(7,this.esalary); pstmt.setInt(8,this.houserent); pstmt.setInt(9,this.convallow); pstmt.setString(10,this.eemail); pstmt.
from Oracle 9i application https://www.daniweb.com/programming/software-development/threads/198933/oracle-9i-and-jdbc1-4-discrepancy server and am getting Connection refused errors intermittently when using Connection Pooling. If I use only 1 connection in the pool, it works fine, but when I try to pool 2 connection refused or more connections, I successfully get few connections and Connection Refused errors for others. Coincidentally, the successful connections are always to the first node mentioned in the RAC, and the errors are always from the second node.The jdbc jar connection refused description I am using is classes12dms.jar; I tried to update to ojdbc14.jar because the connection is to 10G, but it does not seem to work. (Or maybe the appserver is still picking up the old jar file).Here is the connection string I am using:jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = XYZ1)(PORT = 1522))(ADDRESS = (PROTOCOL = TCP)(HOST = XYZ2)(PORT = 1522))(LOAD_BALANCE = off)(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = XYZ)))Here is the error I am getting:org.springframework.jdbc.support.MetaDataAccessException: Error while extracting DatabaseMetaData; nested exception is java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(ERR=1153)(VSNNUM=169870080)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='(ADDRESS=(PROTOCOL=TCP)(HOST=XYZ2)(PORT=1522))'))(ERROR=(CODE=305)(EMFI=1))))java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(ERR=1153)(VSNNUM=169870080)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='(ADDRESS=(PROTOCOL=TCP)(HOST=XYZ2)(PORT=1522))'))(ERROR=(CODE=305)(EMFI=1)))) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:185) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:227) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:340) at oracle.jdbc.driver.OracleConnection.
and jdbc1.4 discrepancy Donate $1 now to see this question answered quickly Sponsored questions offer a monetary incentive to answerers to produce quality responses. Be intelligently matched with 5 likely answerers who will be alerted to help. 3Contributors 7Replies 9Views 7 YearsDiscussion Span 7 Years Ago Last Post by __avd 0 7 Years Ago Hi all, I have a core java application, I am getting the below exception when ever i run this application. I have a java file named Oracpt.java which takes all variables like username password and url from setttings file which from config file. becoase of this below exception im not able to go further .. Please is it because version problem i checked in google all required jar files are there in oracle98/lib/jdbc folder.. Please kindly advice what might be the problem Its not connecting connection variable is null every time. I am struck wiht error since 3 days please help. Got an exception in Connection Method! Io exception: Connection refused(DESCRIPTION=(ERR=1153)(VSNNUM=169869824)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sticks-vip.mis.cypress.com)(PORT=1523))(CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))null))'))(ERROR=(CODE=303)(EMFI=1)))) java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(ERR=1153)(VSNNUM=169869824)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sticks-vip.mis.cypress.com)(PORT=1523))(CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))null))'))(ERROR=(CODE=303)(EMFI=1)))) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269) at oracle.jdbc.driver.OracleConnection.