hop
hop

Reputation: 2558

How to specify URL correctly for connection pool in Weblogic

How would I create a connection pool with the below information. I think I am getting wrong in URL.

(DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = myDB01.com)(PORT = 1821))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = myDB.com)
    )
  )

I tried specifying the below in URL, but, didn't work

jdbc:oracle:thin:@myDB01.com:1821:myDB.com

This is the exception I see in the logs on server start up

oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

Note: I am able to connect to the DB from Oracle client successfully.

Upvotes: 3

Views: 8641

Answers (2)

Claudio Bezerra
Claudio Bezerra

Reputation: 71

Version 10.3 of Oracle weblogic has a bug in its console application. When it generates the URL for your database, it is generated with this format:

jdbc:oracle:thin:@HOST:PORT:SERVICE

But the console SHOULD generate with this format:

jdbc:oracle:thin:@HOST:PORT/SERVICE

Pay attention to the character between PORT and SERVICE.

Upvotes: 1

anazimok
anazimok

Reputation: 1759

You need to use this format:

jdbc:oracle:thin:[USER/PASSWORD]@//[HOST][:PORT]/SERVICE

http://www.orafaq.com/wiki/JDBC

Upvotes: 5

Related Questions