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'"

kwoxerkwoxer Member Posts: 9 Contributor II
edited June 2019 in Help
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?
Tagged:

Answers

  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    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
  • kwoxerkwoxer Member Posts: 9 Contributor II
    Nov 07, 2014 8:55:33 AM com.rapidminer.Process prepareRun
    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.
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    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
  • kwoxerkwoxer Member Posts: 9 Contributor II
    Ohh good to know. Here it is:
    Nov 07, 2014 11:56:27 AM com.rapidminer.tools.I18N <clinit>
    INFO: Set locale to en.
    Nov 07, 2014 11:56:28 AM com.rapidminer.tools.expression.parser.ExpressionParserFactory <clinit>
    INFO: Default version of expression parser registered successfully
    Nov 07, 2014 11:56:30 AM com.rapidminer.parameter.ParameterTypePassword decryptPassword
    WARNING: Password in XML file looks like unencrypted plain text.
    Nov 07, 2014 11:56:31 AM com.rapidminer.tools.OperatorService init
    INFO: Loading additional operators specified by rapidminer.operators.additional (${RAPIDMINER_OPERATORS_ADDITIONAL})
    Nov 07, 2014 11:56:31 AM com.rapidminer.tools.OperatorService init
    SEVERE: Cannot find operator description file ${RAPIDMINER_OPERATORS_ADDITIONAL}.
    Nov 07, 2014 11:56:31 AM com.rapidminer.tools.OperatorService init
    INFO: Number of registered operator classes: 443; number of registered operator descriptions: 444; number of replacements: 403
    Nov 07, 2014 11:56:31 AM com.rapidminer.tools.jdbc.JDBCProperties <init>
    WARNING: Missing database driver class name for ODBC Bridge (e.g. Access)
    Nov 07, 2014 11:56:31 AM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
    INFO: JDBC driver ca.ingres.jdbc.IngresDriver not found. Probably the driver is not installed.
    Nov 07, 2014 11:56:36 AM com.rapidminer.gui.ApplicationPerspectives loadAll
    CONFIG: Loading perspectives.
    Nov 07, 2014 11:56:36 AM com.rapid_i.deployment.update.client.UpdateManager checkForUpdates
    CONFIG: Ignoring update check. Last update check was on 11/5/14 7:36 PM.
    Nov 07, 2014 11:56:39 AM com.rapidminer.tools.jdbc.DatabaseHandler connect
    CONFIG: Connecting to jdbc:orient:remote:localhost:2424/test as root.
    Nov 07, 2014 11:56:42 AM com.rapidminer.tools.jdbc.StatementCreator registerSyntaxInfo
    WARNING: No SQL value type found for date_time
    Nov 07, 2014 11:56:42 AM com.rapidminer.tools.jdbc.StatementCreator registerSyntaxInfo
    WARNING: No SQL value type found for time
    Nov 07, 2014 11:56:42 AM com.rapidminer.operator.ports.metadata.MDTransformer transformMetaData
    WARNING: Error during meta data transformation: java.lang.UnsupportedOperationException
    java.lang.UnsupportedOperationException
    at com.orientechnologies.orient.jdbc.OrientJdbcPreparedStatement.getMetaData(OrientJdbcPreparedStatement.java:206)
    at com.rapidminer.operator.io.DatabaseDataReader.getGeneratedMetaData(DatabaseDataReader.java:162)
    at com.rapidminer.operator.io.AbstractReader$1.transformMD(AbstractReader.java:77)
    at com.rapidminer.operator.ports.metadata.MDTransformer.transformMetaData(MDTransformer.java:58)
    at com.rapidminer.operator.Operator.transformMetaData(Operator.java:2161)
    at com.rapidminer.operator.ExecutionUnit.transformMetaData(ExecutionUnit.java:322)
    at com.rapidminer.operator.ports.metadata.SubprocessTransformRule.transformMD(SubprocessTransformRule.java:50)
    at com.rapidminer.operator.ports.metadata.MDTransformer.transformMetaData(MDTransformer.java:58)
    at com.rapidminer.operator.Operator.transformMetaData(Operator.java:2161)
    at com.rapidminer.operator.Operator.checkAll(Operator.java:1811)
    at com.rapidminer.gui.MetaDataUpdateQueue$1$1.run(MetaDataUpdateQueue.java:62)
    at com.rapidminer.gui.tools.ProgressThread$2.run(ProgressThread.java:200)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    Nov 07, 2014 11:56:48 AM com.rapidminer.tools.jdbc.DatabaseHandler connect
    CONFIG: Connecting to jdbc:orient:remote:localhost:2424/test as root.
    Nov 07, 2014 11:56:48 AM com.rapidminer.tools.jdbc.StatementCreator registerSyntaxInfo
    WARNING: No SQL value type found for date_time
    Nov 07, 2014 11:56:48 AM com.rapidminer.tools.jdbc.StatementCreator registerSyntaxInfo
    WARNING: No SQL value type found for time
    Nov 07, 2014 11:56:48 AM com.rapidminer.operator.ports.metadata.MDTransformer transformMetaData
    WARNING: Error during meta data transformation: java.lang.UnsupportedOperationException
    java.lang.UnsupportedOperationException
    at com.orientechnologies.orient.jdbc.OrientJdbcPreparedStatement.getMetaData(OrientJdbcPreparedStatement.java:206)
    at com.rapidminer.operator.io.DatabaseDataReader.getGeneratedMetaData(DatabaseDataReader.java:162)
    at com.rapidminer.operator.io.AbstractReader$1.transformMD(AbstractReader.java:77)
    at com.rapidminer.operator.ports.metadata.MDTransformer.transformMetaData(MDTransformer.java:58)
    at com.rapidminer.operator.Operator.transformMetaData(Operator.java:2161)
    at com.rapidminer.operator.ExecutionUnit.transformMetaData(ExecutionUnit.java:322)
    at com.rapidminer.operator.ports.metadata.SubprocessTransformRule.transformMD(SubprocessTransformRule.java:50)
    at com.rapidminer.operator.ports.metadata.MDTransformer.transformMetaData(MDTransformer.java:58)
    at com.rapidminer.operator.Operator.transformMetaData(Operator.java:2161)
    at com.rapidminer.operator.Operator.checkAll(Operator.java:1811)
    at com.rapidminer.gui.MetaDataUpdateQueue$1$1.run(MetaDataUpdateQueue.java:62)
    at com.rapidminer.gui.tools.ProgressThread$2.run(ProgressThread.java:200)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    Nov 07, 2014 11:56:51 AM com.rapidminer.tools.jdbc.DatabaseHandler connect
    CONFIG: Connecting to jdbc:orient:remote:localhost:2424/test as root.
    Nov 07, 2014 11:56:51 AM com.rapidminer.tools.jdbc.StatementCreator registerSyntaxInfo
    WARNING: No SQL value type found for date_time
    Nov 07, 2014 11:56:51 AM com.rapidminer.tools.jdbc.StatementCreator registerSyntaxInfo
    WARNING: No SQL value type found for time
    Nov 07, 2014 11:56:51 AM com.rapidminer.gui.tools.ProgressThread$2 run
    WARNING: Error executing background job Fetching Database Tables: com.orientechnologies.orient.core.exception.ODatabaseException: Database instance is not set in current thread. Assure to set it with: ODatabaseRecordThreadLocal.INSTANCE.set(db);
    com.orientechnologies.orient.core.exception.ODatabaseException: Database instance is not set in current thread. Assure to set it with: ODatabaseRecordThreadLocal.INSTANCE.set(db);
    at com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal.get(ODatabaseRecordThreadLocal.java:35)
    at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.getDatabase(OSchemaShared.java:1141)
    at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.getClasses(OSchemaShared.java:707)
    at com.orientechnologies.orient.core.metadata.schema.OSchemaProxy.getClasses(OSchemaProxy.java:160)
    at com.orientechnologies.orient.jdbc.OrientJdbcDatabaseMetaData.getTables(OrientJdbcDatabaseMetaData.java:612)
    at com.rapidminer.tools.jdbc.DatabaseHandler.getAllTableMetaData(DatabaseHandler.java:918)
    at com.rapidminer.tools.jdbc.TableMetaDataCache.updateCache(TableMetaDataCache.java:185)
    at com.rapidminer.tools.jdbc.TableMetaDataCache.getAllTableMetaData(TableMetaDataCache.java:114)
    at com.rapidminer.gui.tools.dialogs.SQLQueryBuilder$5.run(SQLQueryBuilder.java:328)
    at com.rapidminer.gui.tools.ProgressThread$2.run(ProgressThread.java:200)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    Nov 07, 2014 11:57:09 AM com.rapidminer.Process run
    CONFIG: Logging process to file C:\Users\Mr. Kwox\Desktop\ewwe.txt
    Nov 07, 2014 11:57:09 AM com.rapidminer.Process prepareRun
    FINE: Initialising process setup.
    Nov 07, 2014 11:57:09 AM com.rapidminer.tools.WrapperLoggingHandler log
    INFO: No filename given for result file, using stdout for logging results!
    Nov 07, 2014 11:57:09 AM com.rapidminer.Process prepareRun
    FINE: Process initialised.
    Nov 07, 2014 11:57:09 AM com.rapidminer.Process run
    INFO: Process //Local Repository/orientdbtest starts
    Nov 07, 2014 11:57:09 AM com.rapidminer.Process run
    FINE: Process:
      Process[0] (Process)
        subprocess 'Main Process'
          +- Read Database[0] (Read Database)
    Nov 07, 2014 11:57:09 AM com.rapidminer.Process loadInitialData
    INFO: Loading initial data.
    Nov 07, 2014 11:57:09 AM com.rapidminer.Process loadInitialData
    FINE: Input #1 not specified.
    Nov 07, 2014 11:57:09 AM com.rapidminer.operator.Operator execute
    FINE: Starting application 1 of operator Process
    Nov 07, 2014 11:57:09 AM com.rapidminer.operator.Operator execute
    FINER: Process called 1st time with input:
    Nov 07, 2014 11:57:09 AM com.rapidminer.operator.execution.SimpleUnitExecutor execute
    FINE: Executing subprocess Process.Main Process. Execution order is: [Read Database (Read Database)]
    Nov 07, 2014 11:57:09 AM com.rapidminer.operator.Operator execute
    FINE: Starting application 1 of operator Read Database
    Nov 07, 2014 11:57:09 AM com.rapidminer.operator.Operator execute
    FINER: Read Database called 1st time with input:
    Nov 07, 2014 11:57:09 AM com.rapidminer.tools.jdbc.DatabaseHandler connect
    CONFIG: Connecting to jdbc:orient:remote:localhost:2424/test as root.
    Nov 07, 2014 11:57:09 AM com.rapidminer.tools.jdbc.StatementCreator registerSyntaxInfo
    WARNING: No SQL value type found for date_time
    Nov 07, 2014 11:57:09 AM com.rapidminer.tools.jdbc.StatementCreator registerSyntaxInfo
    WARNING: No SQL value type found for time
    Nov 07, 2014 11:57:09 AM com.rapidminer.tools.jdbc.DatabaseHandler executeStatement
    INFO: Executing query: 'SELECT age FROM Person'
    Nov 07, 2014 11:57:09 AM com.rapidminer.tools.jdbc.DatabaseHandler executeStatement
    FINE: Query executed.
    Nov 07, 2014 11:57:09 AM com.rapidminer.gui.ProcessThread run
    SEVERE: Process failed: Database error occurred: An error occured during the retrieval of the double value at column 'age'
    com.rapidminer.operator.UserError: Database error occurred: An error occured during the retrieval of the double value at column 'age'
    at com.rapidminer.operator.io.DatabaseDataReader.createExampleSet(DatabaseDataReader.java:130)
    at com.rapidminer.operator.io.AbstractExampleSource.read(AbstractExampleSource.java:52)
    at com.rapidminer.operator.io.DatabaseDataReader.read(DatabaseDataReader.java:96)
    at com.rapidminer.operator.io.DatabaseDataReader.read(DatabaseDataReader.java:82)
    at com.rapidminer.operator.io.AbstractReader.doWork(AbstractReader.java:126)
    at com.rapidminer.operator.Operator.execute(Operator.java:866)
    at com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:51)
    at com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:711)
    at com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:375)
    at com.rapidminer.operator.Operator.execute(Operator.java:866)
    at com.rapidminer.Process.run(Process.java:949)
    at com.rapidminer.Process.run(Process.java:873)
    at com.rapidminer.Process.run(Process.java:832)
    at com.rapidminer.Process.run(Process.java:827)
    at com.rapidminer.Process.run(Process.java:817)
    at com.rapidminer.gui.ProcessThread.run(ProcessThread.java:63)
    Caused by: java.sql.SQLException: An error occured during the retrieval of the double value at column 'age'
    at com.orientechnologies.orient.jdbc.OrientJdbcResultSet.getDouble(OrientJdbcResultSet.java:408)
    at com.orientechnologies.orient.jdbc.OrientJdbcResultSet.getDouble(OrientJdbcResultSet.java:400)
    at com.rapidminer.operator.io.DatabaseDataReader.createExampleTable(DatabaseDataReader.java:210)
    at com.rapidminer.operator.io.DatabaseDataReader.createExampleSet(DatabaseDataReader.java:128)
    ... 15 more
    Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
    at com.orientechnologies.orient.jdbc.OrientJdbcResultSet.getDouble(OrientJdbcResultSet.java:405)
    ... 18 more

    Nov 07, 2014 11:57:09 AM com.rapidminer.gui.ProcessThread run
    SEVERE: Here:          Process[1] (Process)
              subprocess 'Main Process'
          ==>  +- Read Database[1] (Read Database)
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    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
  • kwoxerkwoxer Member Posts: 9 Contributor II
    Jap I created a Property with Type Double. And there it worked with RapidMiner. So actually String and Double are working. But nothing else.

    So what would you say I could do, which specific part of the JDBC driver has issues?
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    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
  • kwoxerkwoxer Member Posts: 9 Contributor II
    Alright thank you. I will see what I can do about that.  :)
Sign In or Register to comment.