pdi-sdk-plugins icon indicating copy to clipboard operation
pdi-sdk-plugins copied to clipboard

trouble in running a transformation from the repository

Open eric-code opened this issue 6 years ago • 0 comments

when i invoke the method (runTransformationFromRepository) in the class org.pentaho.di.sdk.samples.embedding.RunningTransformations with the code below

     instance.runTransformationFromRepository("MyRepoCE", "/home/admin", "parametrized_transformation", "admin", "password");

i got a exception like this:

org.pentaho.di.core.exception.KettleException: 
Cannot find repository "MyRepoCE". Please make sure it is defined in your /Users/tony/.kettle/repositories.xml file

	at org.pentaho.di.sdk.samples.embedding.RunningTransformations.runTransformationFromRepository(RunningTransformations.java:210)
	at org.pentaho.di.sdk.samples.embedding.RunningTransformations.main(RunningTransformations.java:90)

here is the content of my repository file

<?xml version="1.0" encoding="UTF-8"?>
<repositories>
  <repository>    
    <id>PentahoEnterpriseRepository</id>
    <name>MyRepoCE</name>
    <description>Pentaho repository |http://192.168.9.100:8080/pentaho</description>
    <is_default>false</is_default>
    <repository_location_url>http://192.168.9.100:8080/pentaho</repository_location_url>
    <version_comment_mandatory>N</version_comment_mandatory>
  </repository>  <repository>    
    <id>PentahoEnterpriseRepository</id>
    <name>1moreRepo</name>
    <description>Pentaho repository | http://192.168.9.100:8080/pentaho</description>
    <is_default>false</is_default>
    <repository_location_url>http://192.168.9.100:8080/pentaho</repository_location_url>
    <version_comment_mandatory>N</version_comment_mandatory>
  </repository>  
</repositories>

the pentaho-server i use is compiled from https://github.com/pentaho/pentaho-platform

eric-code avatar Jan 12 '18 08:01 eric-code