The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
"OrientDB error occurred during the retrieval of the double value at column 'age'"
I tried using RapidMiner with OrientDB like in http://www.kwoxer.de/2014/11/05/rapidminer-mit-orientdb-jdbc-verbinden-tutorial/ (German)
So I have a Class Person with some entrys in there.
Now I SELECT the name of the Persons. That works great (http://i.imgur.com/IKztCFj.png).
But somehow if I want to select anything else than a String value. I always get this error message.
As an example the Person Class hat the property age, which is an integer: http://i.imgur.com/GH5EwwH.png
Is there anything I can do about this. Why does it work for Strings but not for the other datatypes? Mabye using another Operator or casting the values before?
So I have a Class Person with some entrys in there.
Now I SELECT the name of the Persons. That works great (http://i.imgur.com/IKztCFj.png).
But somehow if I want to select anything else than a String value. I always get this error message.
As an example the Person Class hat the property age, which is an integer: http://i.imgur.com/GH5EwwH.png
Is there anything I can do about this. Why does it work for Strings but not for the other datatypes? Mabye using another Operator or casting the values before?
Tagged:
0
Answers
can you post the exception which occurs in the rapidminer.log file found in the .RapidMiner5 directory? I just googled the error and it is hardcoded in the JDBC driver here: https://github.com/robfrank/orientdb-jdbc/blob/master/src/main/java/com/orientechnologies/orient/jdbc/OrientJdbcResultSet.java
My first guess would be that the driver says the column "age" is of type A while in reality it is of type B. But that's only a guess without seeing the full error.
Regards,
Marco
FINE: Initialising process setup.
Nov 07, 2014 8:55:33 AM com.rapidminer.tools.WrapperLoggingHandler log
INFO: No filename given for result file, using stdout for logging results!
Nov 07, 2014 8:55:33 AM com.rapidminer.Process prepareRun
FINE: Process initialised.
Nov 07, 2014 8:55:33 AM com.rapidminer.Process run
INFO: Process //Local Repository/orientdbtest starts
Nov 07, 2014 8:55:33 AM com.rapidminer.Process run
FINE: Process:
Process[1] (Process)
subprocess 'Main Process'
+- Read Database[1] (Read Database)
Nov 07, 2014 8:55:33 AM com.rapidminer.Process loadInitialData
INFO: Loading initial data.
Nov 07, 2014 8:55:33 AM com.rapidminer.Process loadInitialData
FINE: Input #1 not specified.
Nov 07, 2014 8:55:33 AM com.rapidminer.operator.Operator execute
FINE: Starting application 1 of operator Process
Nov 07, 2014 8:55:33 AM com.rapidminer.operator.Operator execute
FINER: Process called 1st time with input:
Nov 07, 2014 8:55:33 AM com.rapidminer.operator.execution.SimpleUnitExecutor execute
FINE: Executing subprocess Process.Main Process. Execution order is: [Read Database (Read Database)]
Nov 07, 2014 8:55:33 AM com.rapidminer.operator.Operator execute
FINE: Starting application 1 of operator Read Database
Nov 07, 2014 8:55:33 AM com.rapidminer.operator.Operator execute
FINER: Read Database called 1st time with input:
Nov 07, 2014 8:55:33 AM com.rapidminer.tools.jdbc.DatabaseHandler executeStatement
INFO: Executing query: 'SELECT age FROM Person '
Nov 07, 2014 8:55:33 AM com.rapidminer.tools.jdbc.DatabaseHandler executeStatement
FINE: Query executed.
I'm not able to find more messages somehow. How do I get the whole stack trace? Thanks.
where is that log taken from? It it's taken from inside RapidMiner Studio, it will hide the stacktrace. You have to navigate to your USER_HOME/.RapidMiner5 folder and take the rapidminer.log from there. It might be best to first delete it, then start RapidMiner Studio again, execute the process in which the problem occurs and then paste the contents of the file here.
Regards,
Marco
when the column is a numeric column, we call resultSet.getDouble(columnIndex) for it. This works fine for every relational DB I ever came across, however OrientDB throws an exception because it is unhappy that the actual type is integer and it fails to produce a double from an integer.
Another bug in the JDBC driver I'm afraid.
Regards,
Marco
So what would you say I could do, which specific part of the JDBC driver has issues?
either convert your column(s) to Double or get them to fix this bug in their JDBC implementation.
For reference, the JDBC specification here on page 199 Appendix B lists a table that depicts what ResultSet getter methods are valid for which data types. The "getDouble()" getter should be valid for tinyint, smallint, integer, bigint, real, float, double, decimal, numeric, bit, boolean, char and even varchar and longvarchar, however I'm not sure how the last 2 are supposed to work. All numeric values however should definitely be obtainable via "ResultSet#getDouble()" to not violate JDBC specifications.
Regards,
Marco