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

[SOLVED] Cannot retreive stored Weka model: java.io.InvalidClassException

alal Member Posts: 10 Contributor II
edited October 2019 in Help
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.
Tagged:

Answers

  • alal Member Posts: 10 Contributor II
    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.
  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    Could you provide an example process? Then i would try it with my RM
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • alal Member Posts: 10 Contributor II
    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>
  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    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.

    Martin
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • alal Member Posts: 10 Contributor II
    Martin,
    Martin Schmitz wrote:

    Mh, the process is working for me.
    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.

    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.
  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    Im using RM 6.2, Windows 8 (64 bit) and Java 1.7.0_67

    So nothing special on both of our sides..
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • alal Member Posts: 10 Contributor II
    Changing java versions didn't help.

    Solved: turn off RapidProM extension if installed -).

    Martin, thanks for the help!
  • MartinLiebigMartinLiebig Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,533 RM Data Scientist
    Great!

    Good to know that there is some "tension" between those plugins..
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
Sign In or Register to comment.