Scripts and Java and MS Access

Hi,

I have an overnight script that imports data from an MS Access query into a list, this worked fine with the old certs and the 1-3-3-3 environment. Now I have had to update my scripts and use 1.4.2 and there seems to be a problem with the url.

 

Old script

-jdbcurl "jdbc:odbc:EPOS" -jdbcquery "SELECT * FROM qry_EPOSLive" 

 

-jdbcurl has been dropped as a valid option in a script, and therefore I have to create a properties file, which I have done.

 

Properties file top line now reads

jdbc.connect.url = jdbc:odbc:EPOS

 

However, when I run the script I am getting the following error

Anaplan API: Could not connect to database! (SQL: No suitable driver found for jdbc:odbc:EPOS)

 

What do I need to do to correct this, as we run this script every night and it is vital to our data set.

 

thanks

 

 

Answers

  • It looks like you're making use of the JDBC-ODBC bridge driver which was discontinued by Oracle from Java 8 onwards. There exists at least one commercial drop-in replacement, you may be able to rip the existing one out of Java 7 (very fiddly and not at all recommended), or you can use a direct JDBC driver (such as UCanAccess)  that avoids ODBC and opens the Access database directly - in which case the JDBC URL will be different.

  • Thanks, we went to Java 8 a long time ago, and scripts have been running just fine with the bridge.

    It's only since moving to Anapaln 1.4.2 scripts (yesterday) that has caused problems

    I have removed the Access requirement now, and created csv files from access separately using Scheduler, then importing using a script, seemed like a sensible move.

     

    thanks for response