[SOLVED] Cannot retreive stored Weka model: java.io.InvalidClassException
al
New Altair Community Member
Hi all,
probably after java update 17 December, Retrieving Stored Weka model (Random Forest) crashes with error:
SEVERE: Process failed: Cannot retrieve repository data from entry '...'. Reason: Cannot load data from 'C:\...': java.io.InvalidClassException: weka.classifiers.trees.RandomForest; local class incompatible: stream classdesc serialVersionUID = -226....., local class serialVersionUID = 421......
Store and Retrieve is done on the same machine. It started to crash recently, I suppose it could be due to java version update released in December (windows 7 machine). But I have no clue how to fix this.
Or this could be connected with RM update to 6.2, I didn't try Storing/Retrieving with 6.2 before.
Anybody has an idea how to fix this?
Thanks,
Alex.
probably after java update 17 December, Retrieving Stored Weka model (Random Forest) crashes with error:
SEVERE: Process failed: Cannot retrieve repository data from entry '...'. Reason: Cannot load data from 'C:\...': java.io.InvalidClassException: weka.classifiers.trees.RandomForest; local class incompatible: stream classdesc serialVersionUID = -226....., local class serialVersionUID = 421......
Store and Retrieve is done on the same machine. It started to crash recently, I suppose it could be due to java version update released in December (windows 7 machine). But I have no clue how to fix this.
Or this could be connected with RM update to 6.2, I didn't try Storing/Retrieving with 6.2 before.
Anybody has an idea how to fix this?
Thanks,
Alex.
0
Answers
-
Also,
reading Weka model from file using "Read Model" operator now also crashes:
Process failed: Could not read file 'C:\....mod': java.io.IOException: Cannot read from XML stream, wrong format: No such field weka.classifiers.trees.RandomTree.m_Tree
Previously it worked fine. Seems there is major problems with Weka models after RM/java updates.0 -
Could you provide an example process? Then i would try it with my RM0
-
mschmitz,
Here is simple process:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="6.2.000">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="6.2.000" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="generate_data" compatibility="6.2.000" expanded="true" height="60" name="Generate Data" width="90" x="45" y="120">
<parameter key="target_function" value="non linear"/>
</operator>
<operator activated="true" class="numerical_to_binominal" compatibility="6.2.000" expanded="true" height="76" name="Numerical to Binominal" width="90" x="179" y="120">
<parameter key="attribute_filter_type" value="single"/>
<parameter key="attribute" value="label"/>
<parameter key="include_special_attributes" value="true"/>
<parameter key="min" value="-100000.0"/>
<parameter key="max" value="32.0"/>
</operator>
<operator activated="true" class="weka:W-RandomForest" compatibility="5.3.001" expanded="true" height="76" name="W-RandomForest" width="90" x="313" y="120"/>
<operator activated="true" class="store" compatibility="6.2.000" expanded="true" height="60" name="Store" width="90" x="447" y="120">
<parameter key="repository_entry" value="model"/>
</operator>
<operator activated="true" class="retrieve" compatibility="6.2.000" expanded="true" height="60" name="Retrieve" width="90" x="581" y="120">
<parameter key="repository_entry" value="model"/>
</operator>
<connect from_op="Generate Data" from_port="output" to_op="Numerical to Binominal" to_port="example set input"/>
<connect from_op="Numerical to Binominal" from_port="example set output" to_op="W-RandomForest" to_port="training set"/>
<connect from_op="W-RandomForest" from_port="model" to_op="Store" to_port="input"/>
<connect from_op="Retrieve" from_port="output" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>0 -
Mh, the process is working for me.
Have you tried to reinstall weka?
Do you have full accsess to the location where the repo is located? Has the hard disc free disc space?
Best.
Martin0 -
Martin,
What RM & java versions you got ? This simple process fails as I wrote above at my Win 7 64b / RM 6.2 / Java build 1.7.0_71-b14 machine.Martin Schmitz wrote:
Mh, the process is working for me.
Disk space, etc. is enough. Error occurs not when Storing or Writing model, but when Retreiveing or Reading model. Also, standard RM models works fine, problem with Weka models only.0 -
Im using RM 6.2, Windows 8 (64 bit) and Java 1.7.0_67
So nothing special on both of our sides..0 -
Changing java versions didn't help.
Solved: turn off RapidProM extension if installed -).
Martin, thanks for the help!0 -
Great!
Good to know that there is some "tension" between those plugins..0