1
votes

I'm researching how to set up a Coldfusion 8 (CF) data source that uses Oracle TNS under CentOS. I checked out this Stackoverflow article. But, I'm still having some difficulty. I got a copy of our tnsnames.ora file and put it on the server at /coldfusion/install/folder/TNSNamesFolder/TNSNames.ora. I downloaded the latest Oracle JDBC drivers for 11g, put them in a folder in the class path and restarted CF. I verified that the new JAR files were picked up by viewing the settings summary. The JDBC URL I'm using is:

jdbc:oracle:thin:TNSNamesFile=/coldfusion/install/folder/TNSNamesFolder/TNSNames.ora/TNSNames.ora; TNSServerName=%TNSEntry%

But, I'm getting the following error: The Network Adapter could not establish the connection. Another issue that occurred to me is that if there's another JDBC driver for Oracle in the class path, how do I know what JAR it's in? How do I make sure that these new JDBC drivers are the only ones in use for Oracle?

1
Is that path to the TNSNames file correct? /coldfusion/install/folder/TNSNamesFolder/TNSNames.ora/TNSNames.orabarnyr
also, I think the TNSNamesFile syntax may be unique to the macromedia JDBC drivers. Take a look at the accepted answer here for how to do the same thing with the Oracle drivers: stackoverflow.com/questions/14194750/…barnyr
Oh, the path to my tnsnames.ora file was a typo in my post. Just to be sure though, I created an environment variable TNS_ADMIN that contains the path to the TNS file. For good measure I renamed it to tnsnames.ora instead of TNSNames.ora.HugeBob
The JDBC URL is now: jdbc:oracle:thin:@MyTNSEntry Still no connectionHugeBob
I think I'm getting a little closer. I altered the Coldfusion Java JVM settings and included the following under JVM arguments: -Doracle.net.tns_admin=%TNS_ADMIN%. It's now saying it can't resolve the TNS name I supplied in the JDBC URL.HugeBob

1 Answers

0
votes

JDBC URL : jdbc:macromedia:oracle:TNSNamesFile=C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\tnsnames.ora;TNSServerName=db9d1.db

Driver Class : oracle.jdbc.OracleDriver