开发者

Coldfusion 9.0.1 Standard 64bit and Oracle 11g 64bit ODBC connection results in "architecture mismatch"

开发者 https://www.devze.com 2023-03-27 08:15 出处:网络
I have a freshly built 64-bit Windows Server 2008 R2 box that I have installed 64-bit Coldfusion 9 Standard on. I\'ve upgraded and hotfixed it up to the most current version of CF. I also had 64-bit O

I have a freshly built 64-bit Windows Server 2008 R2 box that I have installed 64-bit Coldfusion 9 Standard on. I've upgraded and hotfixed it up to the most current version of CF. I also had 64-bit Oracle 11g (11.1.0.7.0) Client installed on the box. I've created a System DSN using the 64-bit ODBC Data Source Administrator in Windows and can successfully test the connection of the data source.

All of these installations went smoothly, however, when I went to add a datasource in the Coldfusion Administrator I receive the error:

Connection verification failed for data source: myDatabaseName

java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket]internal error: The specified DSN contains an architecture mismatch between the Driver and Application The root cause was that: java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket]internal error: The specified DSN contains an architecture mismatch between the Driver and Application

I am having a hard time understanding exactly where this architecture mismatch is coming from since the box is entirely 64-bit. I see while looking at all the processes that are running, some related CF processes are running in 32-bit (Ve开发者_如何学编程rity related processes, SOLR and CFDotNetSVC). I am not sure if those could cause this issue but I am at a loss to explain were this mismatch would come from otherwise.

Anyone have any ideas?


Using Dan's advice I grabbed a JDBC Driver from Oracle here:

http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-111060-084321.html

I then moved the JAR (ojdbc6.jar in my case) and added it to my Coldfusion Class Path.

Determining the correct settings for using the datasource to Coldfusion was slightly harder but here are the settings I ended up going with:

JDBC URL: jdbc:oracle:thin:@//dbsrv.mydomain.com:1521/myDB.world
Driver Class: oracle.jdbc.driver.OracleDriver
Driver Name: Oracle Thin Driver

Then the username and password for the DB.

Sure enough it worked like a charm.

Dan, I want to give you a check mark because you definitely put me in the right direction, but I can only mark one correct.


I believe you need to either step down to the 32-bit drivers, or use native JDBC drivers to connect to Oracle successfully. My suggestion would be to go the JDBC route, and connect directly through a native Oracle JDBC driver by using the "other" selection on the Datasource screen. You'll get better performance that way, and have more control over your connection via ColdFusion.

Connecting to Oracle information in ColdFusion Livedocs.


i found an alternate way to do this

install the ODBC drivers for 64bit and 32bit (in that order) on your win2008 64bit OS

thereafter create the DSNs on both the System32 folder and SysWow64 folder by running the odbc32ad32.exe

ensure your tnsnames are setup fine in the respective network/admin folder (if you use tnsnames to maintain your sids)

now on the CF admin you creaet a new ODBC source with aODBC Socket and name. the next page should show you a drop down of all DSNs that exists in the 64bit DSN setup. When you go and test it in CF, it will strangely use the config of the 32bit DSN setup for validationb

voila....your connections should work. No worries of those architectural failures etc


We needed to setup 64 bit ODBC connections for a ColdFusion 11 server to query against 2012 SQL Server instance on Windows 2008 R2 Server. The ODBC connections would show up but would never work. We received so many various messages when verifying such as "needing SSL connections to work" and also timeout messages as it was having problems logging into SQL Server.

I stumbled across this post and we decided to follow setting up 64bit ODBC connections and then effectively overwriting them--preserving the name using the 32bit ODBC. Thank you again fellow developers, especially Souzam! My instructions are below:


For Windows 2008R2 Server you must disguise 64bit ODBC socket configurations for 32 bit in order for them to appear in CF Admin as datasources (obvious bug in CF 11):

  1. Creating 64bit ODBC connections via 2008 R2 ODBC application, follow a naming convention that will allow you to recall in 32 bit configuration.
  2. Configure ODBC 32bit connection in SYSWOW64 (C:\Windows\SysWOW64) using the odbcad32.exe using the previous 64bit names in Step #1.
  3. Create data sources in CF Admin as these should appear in a dropdown when creating ODBC Socket Type connections.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号