Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Connecting With Datasource on Mac

  1. #1
    Forum VIP
    Join Date
    Jul 2010
    Thanked 329 Times in 305 Posts

    Default 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?

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  2. #2
    Join Date
    Feb 2014
    Thanked 48 Times in 45 Posts

    Default 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:// Do also confirm that is the right IP address to use; you can try replacing it with localhost or (assuming your Java application is running locally). Btw, it seems that 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.

Similar Threads

  1. Connection pool and Datasource Implementation Is Not Functioning
    By akash_ju in forum What's Wrong With My Code?
    Replies: 3
    Last Post: September 25th, 2013, 03:04 PM
  2. Datasource Creation Issue
    By Deepak1986 in forum Web Frameworks
    Replies: 0
    Last Post: January 17th, 2013, 05:24 AM
  3. DataSource null pointer exception from object
    By jyounger in forum JDBC & Databases
    Replies: 0
    Last Post: February 20th, 2012, 05:44 AM
  4. Connection pool and Datasource Implementation Is Not Functioning
    By mychickbad in forum What's Wrong With My Code?
    Replies: 0
    Last Post: July 14th, 2011, 06:15 PM
  5. Testing the DataSource with MySQL
    By srinivasan_253642 in forum JDBC & Databases
    Replies: 0
    Last Post: January 9th, 2010, 02:23 AM