Nenad Bulatović
Nenad Bulatović

Reputation: 7444

Windows 7 64, Eclipse 64, JDK 64 and specified DSN contains an architecture mismatch

On Windows 7 64 bit machine, with Eclipse Kepler 64 bit, JDK6, I have this error:

SQL Error: java.sql.SQLException: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application 0 IM014

This Q&A unfortunately didn't help me: https://stackoverflow.com/questions/6721702/windows-7-64-bit-odbc-drivers-for-ms-access-missing

"Target" was set to: %windir%\System32\odbcad32.exe and "Start in" was set to: %windir%\System32

so, I changed it to: "Target" to: %windir%\SysWOW64\odbcad32.exe and "Start in" was set %windir%\SysWOW64 and later to %windir%\System32 - didn't work neither way.

I also had a look at this but the answer is not satisfying (installing 32 bit version of Java and STS) 64-bit Java can't access 32-bit MS Access database via ODBC

I tried to put the argument "-D32" in the VM arguments, but didn't help either.

Neither this one: Is there a Windows 7 ODBC driver for Access?

I read this as well: http://msdn.microsoft.com/en-us/library/ms712362(v=vs.85).aspx

and this http://social.msdn.microsoft.com/Forums/vstudio/en-US/097ff93d-20be-41ed-b318-dc51cca0b811/the-specified-dsn-contains-an-architecture-mismatch-between-the-driver-and-application?forum=wcf

but those are instructions for Visual Studio, in Eclipse KEPLER for Java SE, I don't know where to find options they suggest (compiling options x86 vs. x64)

Trying to use this architecture mismatch between the Driver and Application? without success. When I try to install 64 bit drivers it complains that I use 32 bit Office and therefore those drivers can't be installed. I installed 2007 Office System Driver: Data Connectivity Components but I gained nothing that previously weren't on system already http://www.microsoft.com/en-us/download/confirmation.aspx?id=23734

I also read this one: http://social.technet.microsoft.com/Forums/sqlserver/en-US/a4ddb239-64d8-4074-978c-45c30381c107/ssrs-2012-error-im014-microsoftodbc-driver-manager-the-specified-dsn-contains-an-architecture?forum=sqlreportingservices

If I understood it properly, as I am using Windows 7 64 bit, with Eclipse Kepler 64 bit, JDK6, and Office Access 2007, I believe I should be using this:

Quote: To manage a data source that connects to a 32-bit driver under 64-bit platform, we use C:\Windows\SysWOW64\odbcad32.exe

What should I do in order to make it work (besides to install 32 bit Eclipse and 32 bit JVM as OP finally did here (64-bit Java can't access 32-bit MS Access database via ODBC)

Upvotes: 2

Views: 544

Answers (2)

Nenad Bulatović
Nenad Bulatović

Reputation: 7444

This should be the complete "solution" for this problem:

  • Control Panel --> Administrative Tools --> Right Click then Properties then Shortcut tab, set "Target" to %windir%\SysWOW64\odbcad32.exe and set "Start in" to %windir%\System32
  • Download and install 32 bit JDK

Do what Elliot Frisch says:

  • Go to "Window > Preferences > Java > Installed JREs", then click "Add"
  • Then use this new 32-bit JRE a the target runtime for your "Access" project (under "run configuration").

And that's it.

Upvotes: 0

Elliott Frisch
Elliott Frisch

Reputation: 201447

You can use a 32-bit JRE in a 64 bit eclipse,

goto "Window > Preferences > Java > Installed JREs", then click "Add"

Then use this new 32-bit JRE a the target runtime for your "Access" project (under "run configuration").

Upvotes: 1

Related Questions