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] Assign repository in JAVA

radoneradone RapidMiner Certified Expert, Member Posts: 74 Guru
edited November 2018 in Help
How can I assign repository location to JAVA application?

Where is my problem:
I would like to run external "execute_process" process from my current process.

Notification:
INFO: Cannot access file system in execution mode UNKNOWN. Not loading repositories.

JAVA Code

               RapidMiner.init();
try {
RepositoryManager.getInstance(null).addRepository(new LocalRepository("MyRepo", new File("processes")));
} catch (RepositoryException e1) {
e1.printStackTrace();
}
Process process = null;
try {
process = RapidMiner.readProcessFile(new File(annotationProcess));
// RepositoryProcessLocation loc = new RepositoryProcessLocation(new RepositoryLocation(annotationProcess));
                       // process = loc.load(null);
                       
                       IOContainer results = process.run();

} catch (Exception e) {
e.printStackTrace();
RapidMiner.quit(RapidMiner.ExitMode.ERROR);
}
"execute_process" operator definition:

<operator activated="true" class="execute_process" compatibility="5.3.000" expanded="true" height="76" name="Execute ExtracGlobaltFeatures (3)" width="90" x="246" y="120">
       <parameter key="process_location" value="RMModule/processes/ExtracGlobaltFeatures"/>
       <parameter key="use_input" value="true"/>
       <parameter key="store_output" value="false"/>
       <parameter key="propagate_metadata_recursively" value="true"/>
       <parameter key="cache_process" value="true"/>
       <list key="macros"/>
     </operator>
Error:
com.rapidminer.operator.UserError: Cannot resolve relative repository location 'ExtracGlobaltFeatures'. Process is not associated with a repository.

Thanks for any help.

Radim
Tagged:

Answers

  • radoneradone RapidMiner Certified Expert, Member Posts: 74 Guru
    The solution was to add: (the processes are in "processes" directory):

                    try {
    RepositoryManager.getInstance(null).addRepository(
    new LocalRepository("MyRepo", new File("processes")));
    } catch (RepositoryException e1) {
    e1.printStackTrace();
    }
    and to change to //MyRepo/ExtractFeatures:
    <operator activated="true" class="execute_process" compatibility="5.3.000" expanded="true" height="76" name="Execute ExtracGlobaltFeatures (3)" width="90" x="246" y="120">
            <parameter key="process_location" value="//MyRepo/ExtracGlobaltFeatures"/>
            <parameter key="use_input" value="true"/>
            <parameter key="store_output" value="false"/>
            <parameter key="propagate_metadata_recursively" value="true"/>
            <parameter key="cache_process" value="true"/>
            <list key="macros"/>
          </operator>
  • AlexeiwAlexeiw Member Posts: 3 Contributor I
    Thanks, it's been very usefull to me
Sign In or Register to comment.