Error while executing operator "Read Database" with the name "Read total instances" in Java
Hello,
I am new to rapidminer and I am trying to get an old program running. It is an Java project using the rapidminer command line mode.
Since it is an older project it was developed with a rapidminer version 5.x. I tried to run it with several newer versions, which are available with maven.
While running the program throws following error:
com.rapidminer.operator.UserError: The dummy operator Read total instances (replacing null) cannot be executed.
The process it self is runnable inside rapidminer studio.
I also tried playing aroung with the versioning in rapidminer studio, but with no success.
You can find the process attached.
I don't know what my mistake could be. Hopefully you have an idea.
Thanks
Answers
hello @akochsic - so dummy operators are created usually when you are using an operator in your process that RapidMiner does not recognize. I've not heard of "Read Total Instances" before...
Scott
Hello @sgenzer,
thanks for your quick reply.
Sorry for the misunderstanding. "Read total instances" is the name of the operator "Read Database".
The operator is configured as follows:
<operator activated="true" class="jdbc_connectors:read_database" compatibility="8.0.001" expanded="true" height="68" name="Read total instances" width="90" x="179" y="210">
<parameter key="define_connection" value="predefined"/>
<parameter key="connection" value="local (master)"/>
<parameter key="database_system" value="MySQL"/>
<parameter key="define_query" value="query"/>
<parameter key="query" value="(SELECT `size` FROM `category_sizes` WHERE category=? LIMIT 1) UNION (SELECT 0); -- default value in case category is not in table."/>
<parameter key="use_default_schema" value="true"/>
<parameter key="prepare_statement" value="true"/>
<enumeration key="parameters">
<parameter key="parameter" value="VARCHAR.%{category}"/>
</enumeration>
<parameter key="datamanagement" value="double_array"/>
<parameter key="data_management" value="auto"/>
</operator>
Thanks
yes those look like parameters from an old Read Database operator. I'd look at the XML created from a new Read Database operator and xfer your settings & query. For example:
Note you need to set up a database connection first in order to make this work.
Scott
I tried creating a new repository with a new process and a new "Read database" operator, but I am still facing the same error. I can't really see any difference in the operator I am using and the example code you posted, since also both have the compatibility set to version 8.0.001.
The process is still running perfectly in Rapidminer Studio. I am only facing the issue using Java with the Command Line Execution mode.
This is the new example process I tried now:
hmm sorry - don't know what to tell you. Just curious - why are you insisting on using the command line execution rather than setting up a RM Server?
Scott
Since it's an rather old project, I tried setting it up without the need changing it too much. Maybe it would be a good idea to try working with an RM Server. Thanks for your help.
I now found a way to get the old project running: I built the rapidminer.jar from the rapidminer5 repository and added it as an external jar to the project. This is obviously not a perfect solution, but a workaround. With the old rapidminer version I don't get any error messages.