1
$\begingroup$

I am testing JDBC connection of OrientDB v2.0.13 from Wolfram Language.

Needs["JLink`"]

AddToClassPath["C:\\OrientDB2013\\jdbc\\orientdb-jdbc-2.0.13-all.jar"];

Needs["DatabaseLink`"]

conn = OpenSQLConnection[
   JDBC[
        "com.orientechnologies.orient.jdbc.OrientJdbcDriver",
        "jdbc:orient:remote:localhost/OpenBeer"]]

This is successfull SQLConnection has been created with Open Status on OrientDB database OpenBeer. For example, I can view the tables with

 SQLTableInformation[conn, "ShowColumnHeadings"->True][[All, 3;;4]] //Sort //TableForm

(* 
   Beer     TABLE
   Brewery  TABLE
   Category TABLE
   etc...
*)

But when I try

SQLExecute[conn,"SELECT * FROM Beer"]
$Failed

And the Messages window displays the error:

Java::excptn: "A Java exception occurred: "java.sql.SQLFeatureNotSupportedException"

at com.orientechnologies.orient.jdbc.OrientJdbcConnection.prepareStatement(OrientJdbcConnection.java:238)

at com.wolfram.databaselink.SQLStatementProcessor.processSQLStatement(SQLStatementProcessor.java:50).

Any ideas on how to fix that ?

$\endgroup$
2
$\begingroup$

It seems Mathematica is trying to execute a PreparedStatement on OrientDB JDBC connection. OrientDB JDBC does not support prepared statements at this stage, this is the reason why you are having this exception.

The solution is to let Mathematica use Connection.createStatement() instead of Connection.prepareStatement(), but I cannot help you further because I don't know Mathematica.

Let me know if you need further help on OrientDB side.

$\endgroup$
  • $\begingroup$ Thank you for your answer Luigi. Let me know when you are going to include Connection.prepareStatement() in your JDBC driver. In the mean time if anyone else knows how to connect and use Mathematica SQL commands with OrientDB please post a solution. $\endgroup$ – Athanassios Sep 24 '15 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.