Connecting to FileMaker

Asked by firefoxtester

Hi I'm trying to use your JayDeBeApi to connect to FileMaker.

My connection string looks like this:

jdbc:sequelink://10.88.31.75:2399;serverDataSource=TrainingJobManager

And the driver is just a single jar file: sljc.jar that I put in
/opt/drivers.

Any thoughts on how I would set that up?

So far I tried this, but it says "class sljc not found".

<code>

import jaydebeapi
import jpype
jar = r'/opt/drivers/sljc.jar'
args='-Djava.class.path=%s' % jar
jvm_path = jpype.getDefaultJVMPath()
jpype.startJVM(jvm_path, args)

conn = jaydebeapi.connect('sljc',

'jdbc:sequelink://10.88.31.75:2399;serverDataSource=TrainingJobManager'
                           , 'admin', 'pw')
curs = conn.cursor()

</code>

Thanks,

Greg

Question information

Language:
English Edit question
Status:
Solved
For:
JayDeBeApi Edit question
Assignee:
No assignee Edit question
Solved by:
firefoxtester
Solved:
Last query:
Last reply:
Revision history for this message
Bastian (baztian) said :
#1

Hi Greg,

I don't know filemaker. But the first parameter to connect() is the name of the jdbc driver class. "sljc" does not seem to be the dirver class name. I've gooled for http://www.google.com/search?q=filemaker+jdbc+driver+class and found http://forums.filemaker.com/posts/c76c1f7691 Please try one of those driver class names mentioned there.

Regards

Bastian

Revision history for this message
firefoxtester (gregpinero) said :
#2

Thanks. Am I using it correctly otherwise?

Do I call the jpype stuff first just like that?

Is the full URL the second argument to connect?

Revision history for this message
Bastian (baztian) said :
#3

I can't tell if you are calling it correctly to make jaydebapi connect to your filemaker db as I neither know filemaker nor your setup. Anyway. Your code seems to be ok. JayDeBe's connect method is quiet generic. The way you call it would result in letting "sljc" register as a driver class (which probably seems to fail) and on succes in a call to http://download.oracle.com/javase/1.4.2/docs/api/java/sql/DriverManager.html#getConnection%28java.lang.String,%20java.lang.String,%20java.lang.String%29 with the rest of the arguments. So url would be 'jdbc:sequelink://10.88.31.75:2399;serverDataSource=TrainingJobManager', user would be 'admin' and password 'pw'.

Maybe I have to improve the documentation of connect()...

Revision history for this message
Bastian (baztian) said :
#4

Oh, and please let me know if you've had success in connecting to filemaker or need more help.

Revision history for this message
firefoxtester (gregpinero) said :
#5

Ok, I made some progress:

I changed connect to:

<code>
conn = jaydebeapi.connect('com.ddtek.jdbc.sequelink.SequeLinkDriver',
                            'jdbc:sequelink://10.88.31.75:2399;serverDataSource=TrainingJobManager'
                           , 'admin', 'pw')
</code>

Now it dies on that that line with:

<code>
Traceback (most recent call last):
  File "test_jdbc.py", line 12, in <module>
    , 'admin', 'pw')
  File "/usr/lib/python2.7/site-packages/JayDeBeApi-0.1.3-py2.7.egg/jaydebeapi/dbapi2.py", line 180, in connect
    jconn = _jdbc_connect(jclassname, *args)
  File "/usr/lib/python2.7/site-packages/JayDeBeApi-0.1.3-py2.7.egg/jaydebeapi/dbapi2.py", line 72, in _jdbc_connect_jpype
    return jpype.java.sql.DriverManager.getConnection(*args)
jpype._jexception.ExceptionPyRaisable: java.sql.SQLException: [DataDirect][SequeLink JDBC Driver][ODBC Socket][DataDirect][ODBC FileMaker driver][FileMaker]Access denied (9)
</code>

The good news is it's trying to connect, and it's finding the class. The bad news is it should be connecting, the same login information works on another app.

Thanks,

Greg

Revision history for this message
Bastian (baztian) said :
#6

Please double check your your url, user and password. The "Access denied" message comes from your jdbc driver and not from JayDeBeApi. Does your other app use the same sljc.jar file and same driver class name?

Revision history for this message
firefoxtester (gregpinero) said :
#7

Actually the other app is getting access denied too. Maybe something changed in FileMaker. I'll keep you updated.

Revision history for this message
firefoxtester (gregpinero) said :
#8

Ok, everything is working now. Somehow the JDBC permissions had gotten turned off in FileMaker. All working now. Thanks again for the help and the great library!