[SOLVED] Last phase for my RecSys and integration problem

hattanhattan Member Posts: 7 Contributor II
edited November 2018 in Help
Hi

I have build chain of process in RapidMiner GUI for my RecommendationSystem .

now I'm trying to build a simple webpage interface for users,but I need to execute Rapidminer's chain of processes within submitting
after inserting the User data into my DB which I build my process to read from it.

which webpage language or tool give me the ability to run java within submitting or do you suggest me any other way run rapidminer process within page submitting ?!


an other problem is that I'm getting exception from netbeans


run:
Jan 25, 2012 11:08:15 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
INFO: Property rapidminer.home is not set. Guessing.
Jan 25, 2012 11:08:15 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
INFO: Trying parent directory of 'C:\Program Files\Rapid-I\RapidMiner5\lib\launcher.jar'...gotcha!
Jan 25, 2012 11:08:15 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
INFO: Trying parent directory of 'C:\Program Files\Rapid-I\RapidMiner5\lib\rapidminer.jar'...gotcha!
Jan 25, 2012 11:08:15 PM com.rapidminer.tools.ParameterService init
INFO: Reading configuration resource com/rapidminer/resources/rapidminerrc.
Jan 25, 2012 11:08:17 PM com.rapidminer.parameter.ParameterTypePassword decryptPassword
WARNING: Password in XML file looks like unencrypted plain text.
Jan 25, 2012 11:08:21 PM com.rapidminer.tools.plugin.Plugin registerOperators
INFO: No operator descriptor specified for plugin Community. Trying plugin initializtation class com.rapidminer.community.CommunityPluginInit.
Jan 25, 2012 11:08:21 PM com.rapidminer.tools.plugin.Plugin registerOperators
WARNING: No operator descriptor defined for: Community
Jan 25, 2012 11:08:21 PM com.rapidminer.tools.jdbc.JDBCProperties <init>
WARNING: Missing database driver class name for 'ODBC Bridge (e.g. Access)'
Jan 25, 2012 11:08:21 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver ca.ingres.jdbc.IngresDriver not found. Probably the driver is not installed.
Jan 25, 2012 11:08:21 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
INFO: JDBC driver oracle.jdbc.driver.OracleDriver not found. Probably the driver is not installed.
Exception in thread "main" com.rapidminer.repository.RepositoryException: Requested repository psf does not exist.
at com.rapidminer.repository.RepositoryManager.getRepository(RepositoryManager.java:189)
at com.rapidminer.repository.RepositoryLocation.getRepository(RepositoryLocation.java:143)
at com.rapidminer.repository.RepositoryLocation.locateEntry(RepositoryLocation.java:166)
at ProcessCreator.ProcessCreator.main(ProcessCreator.java:21)
Java Result: 1
BUILD SUCCESSFUL (total time: 7 seconds)



here is my code:


package ProcessCreator;
import com.rapidminer.Process;
import com.rapidminer.RapidMiner;
import com.rapidminer.RapidMiner.ExecutionMode;
import com.rapidminer.example.ExampleSet;
import com.rapidminer.operator.IOContainer;
import com.rapidminer.repository.ProcessEntry;
import com.rapidminer.repository.RepositoryLocation;
public class ProcessCreator {
     
      public static void main(String args[]) throws Exception {
// this initializes RapidMiner with your repositories available
RapidMiner.setExecutionMode(ExecutionMode.COMMAND_LINE);
RapidMiner.init();

// loads the process from the repository
RepositoryLocation pLoc = new RepositoryLocation("//psf/Home/Documents/Universty 2007-2012/W7 rapidminer repositry/clustering/Adventure.rmp");
ProcessEntry pEntry = (ProcessEntry) pLoc.locateEntry();
String processXML = pEntry.retrieveXML();
Process myProcess = new Process(processXML);


IOContainer ioResult = myProcess.run();

// use the result(s) as needed, for example if your process just returns one ExampleSet, use this:
if (ioResult.getElementAt(0) instanceof ExampleSet) {
ExampleSet resultSet = (ExampleSet)ioResult.getElementAt(0);
}}}



Please how can I fix it? and what do you recommend me for my webpage interface?

much of appreciation

Regards

Hattan
Tagged:

Answers

  • hattanhattan Member Posts: 7 Contributor II
    I made some changes in the code:
    import com.rapidminer.Process;
    import com.rapidminer.RapidMiner;
    import com.rapidminer.RapidMiner.ExecutionMode;
    import java.io.File;
    public class ProcessCreator {
          static File x=new File ("//psf/Home/Documents/Universty 2007-2012/W7 rapidminer repositry/clustering/Adventure.rmp");
       
         
          public static void main(String[] argv) throws Exception {
          RapidMiner.setExecutionMode(ExecutionMode.COMMAND_LINE);
            RapidMiner.init();
           
           
            Process process = new Process(x);
              process.run();
          }
       
      }

    and still getting
    run:
    Jan 26, 2012 3:42:02 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
    INFO: Property rapidminer.home is not set. Guessing.
    Jan 26, 2012 3:42:02 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
    INFO: Trying parent directory of 'C:\Program Files\Rapid-I\RapidMiner5\lib\launcher.jar'...gotcha!
    Jan 26, 2012 3:42:02 PM com.rapid_i.Launcher ensureRapidMinerHomeSet
    INFO: Trying parent directory of 'C:\Program Files\Rapid-I\RapidMiner5\lib\rapidminer.jar'...gotcha!
    Jan 26, 2012 3:42:02 PM com.rapidminer.tools.ParameterService init
    INFO: Reading configuration resource com/rapidminer/resources/rapidminerrc.
    Jan 26, 2012 3:42:10 PM com.rapidminer.parameter.ParameterTypePassword decryptPassword
    WARNING: Password in XML file looks like unencrypted plain text.
    Jan 26, 2012 3:42:21 PM com.rapidminer.tools.plugin.Plugin registerOperators
    INFO: No operator descriptor specified for plugin Community. Trying plugin initializtation class com.rapidminer.community.CommunityPluginInit.
    Jan 26, 2012 3:42:21 PM com.rapidminer.tools.plugin.Plugin registerOperators
    WARNING: No operator descriptor defined for: Community
    Jan 26, 2012 3:42:21 PM com.rapidminer.tools.jdbc.JDBCProperties <init>
    WARNING: Missing database driver class name for 'ODBC Bridge (e.g. Access)'
    Jan 26, 2012 3:42:21 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
    INFO: JDBC driver ca.ingres.jdbc.IngresDriver not found. Probably the driver is not installed.
    Jan 26, 2012 3:42:21 PM com.rapidminer.tools.jdbc.JDBCProperties registerDrivers
    INFO: JDBC driver oracle.jdbc.driver.OracleDriver not found. Probably the driver is not installed.
    Jan 26, 2012 3:42:21 PM com.rapidminer.tools.WrapperLoggingHandler log
    INFO: No filename given for result file, using stdout for logging results!
    Jan 26, 2012 3:42:21 PM com.rapidminer.Process run
    INFO: Process \\psf\Home\Documents\Universty 2007-2012\W7 rapidminer repositry\clustering\Adventure.rmp starts
    Jan 26, 2012 3:42:23 PM com.rapidminer.tools.jdbc.DatabaseHandler executeStatement
    INFO: Executing query: 'SELECT [All Goals].[Goal_ID], [All Goals].[Catigory_Name], [All Goals].[Goal_Name], [All Goals].[User_ID]
    FROM [All Goals]
    WHERE ((([All Goals].[Catigory_Name])='Adventure'));'
    Jan 26, 2012 3:42:25 PM com.rapidminer.tools.WrapperLoggingHandler log
    WARNING: Join: Special attribute 'label' already exist, skipping!
    Jan 26, 2012 3:42:25 PM com.rapidminer.tools.WrapperLoggingHandler log
    WARNING: Join: Special attribute 'id' already exist, skipping!
    Exception in thread "main" com.rapidminer.operator.UserError: Cannot resolve relative repository location '../store_cluster result/Adventure_cluster'. Process is not associated with a repository.
    at com.rapidminer.Process.resolveRepositoryLocation(Process.java:1211)
    at com.rapidminer.operator.Operator.getParameterAsRepositoryLocation(Operator.java:1382)
    at com.rapidminer.operator.io.RepositoryStorer.write(RepositoryStorer.java:53)
    at com.rapidminer.operator.io.AbstractWriter.doWork(AbstractWriter.java:67)
    at com.rapidminer.operator.Operator.execute(Operator.java:833)
    at com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:51)
    at com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:709)
    at com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:379)
    at com.rapidminer.operator.Operator.execute(Operator.java:833)
    at com.rapidminer.Process.run(Process.java:925)
    at com.rapidminer.Process.run(Process.java:848)
    at com.rapidminer.Process.run(Process.java:807)
    at com.rapidminer.Process.run(Process.java:802)
    at com.rapidminer.Process.run(Process.java:792)
    at ProcessCreator.main(ProcessCreator.java:15)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 31 seconds)
    Please help me in resolving the error

    Thanks
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,993 RM Engineering
    Hi,

    looks like you're trying to use a relative repository location but RapidMiner does not know where the process is coming from - so of course it cannot resolve a relative location. Try this: click

    Regards,
    Marco
  • hattanhattan Member Posts: 7 Contributor II
    Thanks for replying Marco

    I solved the problem by uncheck"resolve relative to" choice from my operators and then select by absolute repository locations.
Sign In or Register to comment.