Solved

Why won't my java program run on this new machine???

Posted on 2014-03-05
8
435 Views
Last Modified: 2014-03-10
Hi -

I have an application written java which connects to an access database and runs perfectly well on at least 2 other machines.

However, I have a new machine, and the software doesn't work - giving the following error msg:

Exception in thread "main" java.lang.RuntimeException: Couldn't establish connection with "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=c:\users\dave\documents\modellingprojects\distributedtraining\livedataset.accdb;READONLY=false" for login "null"

This new machine has pretty much the same configuration, although it it did come pre-installed with Windows 7 home which I haven't changed.

Everything (as far as I can tell) is 64 bit.

Any ideas on what is going wrong? I not really a programmer / IT expert so am at a complete loss!! Your help will be greatly appreciated!!
0
Comment
Question by:INeedTechnicalSupport
  • 4
  • 3
8 Comments
 
LVL 36

Expert Comment

by:PatHartman
ID: 39906883
Does the new PC have Access installed?  If it doesn't, you will need to install the ODBC driver separately.

Technically you are not using MS Access at all so you don't actually need Access installed.  You are using Jet which is a separate product.  It used to be installed with Windows but may not be any longer.

Also, I can't tell what version of Access was used to create the .mdb.  MS has dropped support for databases in the A97 format as of Access 2013 so that is a potential issue.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39906913
Do yourself a favour: use a portable and open Java db, such as Derby or HSQL db.
0
 

Author Comment

by:INeedTechnicalSupport
ID: 39906949
Thanks Pat - Its a database originally created in access 2010  - and yes I do have access installed on this machine, although its the 2013.

However, I have a similar configuration on another machines and it works fine on that one - although maybe that had a previous version of access 2010 before it was upgraded (i can't remember). Could that be an issue? How would I install the ODBC driver separately? I'm wondering if its a 32bit Vs 64bit issue.

And CEHJ - I'm constrained by a client so, unfortunately, it has to be ms access :-(
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 36

Expert Comment

by:PatHartman
ID: 39907172
Why is it an .mdb if you created it with A2010?

The 64-bit version of Office is not compatible with the 32-bit version.  Since the database is data only, it shouldn't be a problem but you may have a conflict with Java and 64-bit drivers.  You should probably be posting in a Java forum.  As I mentioned earlier, this is not an "Access" problem.  You are not using Access at all.  You are using Jet (.mdb) or ACE (.accdb).
0
 

Author Comment

by:INeedTechnicalSupport
ID: 39907499
I thought i was posting in a java forum!
It certainly one of the topics I selected...first time using experts exchange - so forgive my mistakes...
0
 
LVL 36

Expert Comment

by:PatHartman
ID: 39907565
Sorry, you are correct.  I got to it from an Access forum and didn't check the topic so it is my mistake not yours.  I don't know anything about Java except that I like drinking it:)
0
 

Accepted Solution

by:
INeedTechnicalSupport earned 0 total points
ID: 39908776
okay - I am a numpty and have now found my problem!!
I'd accidentally installed a 32 bit version of the development tool (AnyLogic) I was using - which is clearly not going to like 64bit ODBC!!

Sorry and thanks for the help!!
0
 

Author Closing Comment

by:INeedTechnicalSupport
ID: 39917028
I was being a numpty!!
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question