Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JDBC connection problem

Status
Not open for further replies.

kanghao

IS-IT--Management
Jul 4, 2004
68
KR
What's the difference the value of "rm.oracle.db.url" case A, and case B
why the url A is not working?

Thanks in advance.

========= Java source =======

Class.forName(conf.get("rm.oracle.db.driver"));
con = DriverManager.getConnection(conf.get("rm.oracle.db.url"),
conf.get("rm.oracle.db.user"),
conf.get("rm.oracle.db.password"));


====== configuration file =====

rm.oracle.db.user=APUSER
rm.oracle.db.password=APUSER

A(not working)
rm.oracle.db.url=jdbc:eek:racle:thin:mad:(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=11.111.111.122)(PORT=1522))(ADDRESS=(PROTOCOL=TCP)(HOST=11.111.111.132)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ORAKIPO1))))
B(working)
rm.oracle.db.url=jdbc:eek:racle:thin:mad:11.111.111.122:1522:ORAKIPO1
 
Your first URL looks like a mangled TNSNAMES.ORA entry - not sure if thats valid.
I'd just use the second URL ...

--------------------------------------------------
Free Database Connection Pooling Software
 
My opinion for what its worth is that the first looks awfully complicated and there is probably a typo in there, or parameters not required. Where as the second is pretty self explanatory. ie address port server.

[blue] Oh you know, just doing what I do.[/blue]

Cheers
Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top