Java Error 12505
Contents |
here for a quick overview of the site Help Center Detailed ora 12505 error in sql developer answers to any questions you might have Meta Discuss the ora 12505 solution workings and policies of this site About Us Learn more about Stack Overflow the company ora-12505 tns listener does not currently know of sid Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join ora-12505 oracle 11g 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 Java Oracle localhost connection error (ORA-12505) up vote 3 down vote favorite I am trying to currently connect to a database
Listener Refused The Connection With The Following Error Ora-12505 In Oracle Sql Developer
on my current computer. import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class Main { public static void main(String[] argv) throws Exception { Connection connection = null; try { // Load the JDBC driver String driverName = "oracle.jdbc.driver.OracleDriver"; Class.forName(driverName); // Create a connection to the database String serverName = "localhost"; String portNumber = "1521"; String sid = "xe"; String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid; String username = "scott"; String password = "tiger"; connection = DriverManager.getConnection(url, username, password); System.out.println("Success"); } catch (ClassNotFoundException e) { System.out.println("Class Not Found Error"); } } } I keep getting this error and I do not know why... Exception in thread "main" java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: localhost:1521:xe at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70) at oracle.jdbc.driver.DatabaseError.n
here for a quick overview of the site Help Center Detailed answers to any questions you might have
Listener Refused The Connection With The Following Error Ora-12514
Meta Discuss the workings and policies of this site About Us java.sql.sqlexception: listener refused the connection with the following error: Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads ora-12505 jdbc thin client with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, http://stackoverflow.com/questions/6805705/java-oracle-localhost-connection-error-ora-12505 just like you, helping each other. Join them; it only takes a minute: Sign up JDBC: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor up vote 1 down vote favorite I am using Oracle 12C as my database. I've written a small JDBC connection program in Java but I am facing an http://stackoverflow.com/questions/30861061/jdbc-ora-12505-tnslistener-does-not-currently-know-of-sid-given-in-connect-de issue with the listener. import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; public class JdbcConnection { public static void main(String[] args) throws SQLException,ClassNotFoundException { String url = "jdbc:oracle:thin:@localhost:1521:orcl"; String user = "system"; String password = "password"; Connection connection = null; Class.forName("oracle.jdbc.driver.OracleDriver"); connection = DriverManager.getConnection(url, user, password); if(connection!=null){ System.out.println("Success in connnection"); } else { System.out.println("failure in connection "); } } } I am getting the following exception: C:\Users\Administrator\Desktop>java JdbcConnection Exception in thread "main" java.sql.SQLException: Listener refused the connectio n with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: localhost:1521:orcl at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java :112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java :261) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387) at oracle.jdbc.driver.PhysicalConnection.
CommunityOracle User Group CommunityTopliners CommunityOTN Speaker BureauJava CommunityError: You don't have JavaScript enabled. This tool uses https://community.oracle.com/thread/3527046 JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and listener refused try again. More discussions in General Database Discussions All PlacesDatabaseGeneral Database Discussions This discussion is archived 1 2 Previous Next 15 Replies Latest reply on Mar 11, 2014 12:00 PM by EdStevens ORA-12505, TNS:listener does not currently know listener refused the of SID given in connect descriptor 1012869 Mar 6, 2014 1:11 PM HI,Currently iam facing this issue on my local (weblogic) server. Am not able to run any application due to this. Its says ce has property needsSeparateUserInfo set true, and property database set non-null. The value for property database will not be passed to DriverManager.getConnection unless it is explicitly encoded as part of --- CONTAINER:atg.repository.RepositoryException; SOURCE:java.sql.SQLException: atg.service.resourcepool.ResourcePoolException: java.sql.SQLException: Listener refused the connection with the following erro ORA-12505, TNS:listener does not currently know of SID given in connect descriptor at atg.adapter.gsa.GSAItemDescriptor.executeQuery(GSAItemDescriptor.java:8347) at atg.adapter.gsa.GSAView.executeUncachedQuery(GSAView.java:362) at atg.repository.query.QueryCache.executeUncachedQuery(QueryCache.java:719) at atg.repository.query.QueryCache.populateEntry(QueryCache.java:1011) at atg.repository.query.QueryCache.executeCachedCountQuery(QueryCache.java:547) at atg.adapter.gsa.GSAView.executeCachedCountQuery(GSAView.java:800) at atg.adapter.gsa.GSAView.executeCountQuery(GSAView.java:688) at atg.adapter.gsa.GSAView.executeCountQuery(GSAView.java:666) at atg.multisite.SiteManager.getSiteCount(SiteManager.java:1049) at atg.multisite.session.MultisiteComponentSessionManager.hasSites(MultisiteComponentSessionManager.java:352) at atg.multisite.session.Mul