I installed Oracle XE in my PC and tried to connect to Oracle using JDBC.
I am getting error:"listener does not currently know of service requested in connect descriptor", while trying to connect to Oracle XE using JDBC.
Please help.
Please find below code snippet, and TNSNAMES.ORA for the database
error:
INFO: Jk running ID=0 time=0/64 config=null
29 Apr, 2012 1:00:23 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 8264 ms
java.sql.SQLException: 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:
Rudre-PC:1521
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:111)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:260)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:386)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:
413)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
n.java:34)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
Oracle XE only gives you one database, and its name is "XE".
I think your connection string should look like this:
If you are working on a local machine, you could also try changing the machine name in your JDBC string and your TNSNAMES to be "localhost" (or the default TCP loopback address 127.0.0.1).
ex-Oracle bloke
Rudra Nath
Greenhorn
Joined: May 12, 2012
Posts: 9
posted
0
Many Thanks Chris.
Your solution helped me!!!
Thanks again!!!
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Error facing while trying to connect Oracle XE