Servoy JDBC Connection to FileMaker 11?

I am trying to run some tests with FileMaker Advanced 11 as a JDBC Servoy 5.2 data source on MacOSX.
This is of course not intended as a production environment, just testing working with various data fields. There are some important changes with the FM11 ODBC/JDBC drivers regarding the handling of Container fields. So I want to test and see how the JDBC driver handles this situation.

I continually get the error:
Connection factory returned null from createConnection.

My setup steps were:

  1. Copy FileMaker 11 JDBC driver (fmjdbc.jar) into Servoy/application_server/drivers
  2. Enable JDBC/ODBC sharing in FileMaker Pro 11 Advanced. This will be a localhost connection, since it is not using FileMaker Server Advanced.
  3. Create new Servoy Data Server named: fm11_local
  4. Set up JDBC properties:
    User name: Admin
    Password:
    URL: jdbc:filemaker://localhost/Asset_Managemnt8
    Driver: com.filemaker.jdbc.Driver
    Catalog
    Schema

Clicking on the Save button in Servoy Eclipse IDE results in the Connection factory error.

Not sure if FileMaker’s JDBC driver is fully type-4 compliant. Servoy requires some specific things to be implemented in the driver in order to work. If you paste in the error from your servoy_log.txt one of the Servoy Engineers, like Rob :), may be able to help.

Scott,
Thanks for the suggestion. But the servoy_log.txt file didn’t have anything written into the file when this error occurred.

David,

Servoy should work with most jdbc drivers.
We call the driver in a standard way to get a connection and the driver seems to return null without raising an exception (which is strange).

Something with your filemaker setup must be wrong.
Did you follow all steps from their docs?
In http://www.filemaker.com/support/produc … ide_en.pdf I found a little java code example you may try to compile and run.
If that works, I expect Servoy also works.

Rob

try putting the port in the URL, e.g.

jdbc:filemaker://localhost:2399/test

greg

rgansevles:
Something with your filemaker setup must be wrong.
Did you follow all steps from their docs?
In http://www.filemaker.com/support/produc … ide_en.pdf I found a little java code example you may try to compile and run.
If that works, I expect Servoy also works.

Rob

I am also trying to do this. I did exactly the same setup steps as found in the first post obtaining the same error. servoylog doesn’t have anything very useful:

2011-01-30 12:37:18,977 ERROR [main] com.servoy.j2db.server.Zc.Zo - Final get connection failure for server fmp11 in 1 times

I have tested JDBC access to this database via the Java code in the Filemaker ODBC and JDBC manual and via R’s RJDBC package. Both work fine. The java code (which has a couple of fixes compared with the manual) is here:

http://pastie.org/1511462

The RJDBC code is this:

library(RJDBC)
drvfmp11 <- JDBC("com.filemaker.jdbc.Driver", 
	"/Applications/Servoy/application_server/drivers/fmjdbc.jar",identifier.quote="\'")
connfmp11 <- dbConnect(drvfmp11, "jdbc:filemaker://localhost/mydb?user=user&password=pwd")
dbListTables(connfmp11)

In short my Filemaker Pro setup is fine but I JDBC access from Servoy is failing. Any further suggestions much appreciated.

One additional observation that seems quite relevant. When I try to set up a new Database server in Servoy 5.2.4 I have tried two procedures

  1. New Server … Empty
  2. New Server … FileMaker

replacing the user/pwd/jdbc url fields as appropriate and selecting com.filemaker.jdbc.Driver in the Driver field.

In the first case I get:

JDBC driver ‘’ not found in classpath or drivers directory : java.lang.ClassNotFoundException

In the second case I get:
Connection factory returned null from createConnection

Curiously when I uncheck “enabled” so that I can save my settings in spite of the error, close the connection settings window. and then reopen, the Driver field in case 1. is empty and in case 2. has reverted to the old org.hsqldb.jdbcDriver. So it seems to me that the problem is due to the Driver setting not being saved.

As a further test, I tried setting up a connection via New Server … Empty to a mysql db that I am already using without problems. This again failed with the:

JDBC driver ‘’ not found in classpath or drivers directory : java.lang.ClassNotFoundException

error and the Driver setting would not stick. So I think that there is some kind of a Servoy bug in saving the Driver setting.

Best,

Greg.

PS 5.2.4 - build 1006 on MacOS X 10.6.6

Greg,

Try sample jdbc code below, this is the way Servoy connects and is slightly different from your example.

Rob

		Class.forName("com.filemaker.jdbc.Driver");
		String url = "jdbc:filemaker://localhost/<dbname>";
		Driver driver = DriverManager.getDriver(url);
		Properties connectionProperties = new Properties();
		connectionProperties.put("user", "<user>");
		connectionProperties.put("password", "<password>");
		Connection connection = driver.connect(url, connectionProperties);
		System.out.print("Connection = " + connection);
		connection.close();

Hi Rob,

Many thanks for the quick response.

rgansevles:
Try sample jdbc code below, this is the way Servoy connects and is slightly different from your example.

I tried your sample code and was able to make the connection just fine directly from Java. My code is here:

http://pastie.org/1514257

My hunch is that this problem may be related to the Driver selection issue in the Servoy Developer UI that I mentioned above. Notice that I wasn’t able to replicate a mysql connection that has never given me any trouble when I used Database Server … New Server … Empty.

Best wishes,

Greg.

Greg

I can’t reproduce that at all, the driver setting just sticks and the new server is created.
Is anyone else seeing this?

Rob

Hi Rob,

rgansevles:
I can’t reproduce that at all, the driver setting just sticks and the new server is created.
Is anyone else seeing this?

Many thanks for checking.

Since I suspected that there was a Servoy Developer UI problem, I tried quitting and then edited:

/Applications/Servoy/application_server/servoy.properties

directly. I changed the driver specification line for the relevant database server that I had made by doing New Server … Empty from:

server.4.driver=
``` to 

server.4.driver=com.filemaker.jdbc.Driver

restarted Servoy and hey presto connection!

So I am pretty confident that there is a UI problem but I suppose it can't be that common or you would have thought anyone else using a non-standard jdbc driver (ie one dropped in to /Applications/Servoy/application_server/drivers) would have complained by now. I notice that both David Simpson and I are on Mac. I also remember that I did not have this problem with an earlier 5.2 beta that I tested. 

Thoughts? Thanks again,

Greg.

Greg.

I saw the issue demonstrated at ServoyWorld by David Simpson and indeed, the driver class dropdown does not work properly on the mac.

The good news is that this is already fixed in Servoy 6 (we upgraded the eclipse version we base on to Helios (3.6)).

Rob