Connecting With Datasource on Mac
So I've been working on a basic little database interaction tool with my aunt. She has a Mac (arg) and she has her database in a program called: FileMaker Pro. After arguing with her computer for a couple hours, I managed to get the ODBC and JDBC drivers installed and configured, and I managed to set up her FileMaker Pro database as an ODBC source. Using the ODBC Administrator, I managed to successfully test the connection (so all should be well).
Then, I managed to throw together some basic java code to connect to the database. This is where I ran into a problem.
I used the documentation provided by FileMaker as a template for setting up the connection to the database (followed mostly the same way, but a bit differently). That documentation can be found on Page 31 of this PDF: http://www.filemaker.com/support/pro...c_guide_en.pdf
As you can see, we are using the DriverManager class to get the connection. When we attempt to get the connection, it seems to just wait forever. The program does not terminate and no exceptions are thrown, it just hangs there...
Any thoughts on this? The DriverManage API (DriverManager (Java Platform SE 7 )) suggests using a DataSource object instead. Would that provide any benefit for our hanging issue?
Re: Connecting With Datasource on Mac
She has a Mac (arg)
I don't think it'll make a difference using a DataSource object.
Page 28 states that it uses port 2399. So, try checking that this port is available for use, FileMaker is listening on this port, and this port is accessible (e.g., not blocked by a firewall.) Also, try changing the JDBC URL to jdbc:filemaker://192.168.1.1:2399/mydatabase. Do also confirm that 192.168.1.1 is the right IP address to use; you can try replacing it with localhost or 127.0.0.1 (assuming your Java application is running locally). Btw, it seems that 192.168.1.1 is commonly used by routers...
If the problem persists, add System.out.println()s to see where it stops, or better yet, attach a debugger and step through your code.