在Kettle上加载转换时发现缺少插件

时间:2015-02-12 08:22:13

标签: java maven pentaho data-integration

每当我从命令行运行提取时,我都会收到此错误,而不是在Spoon UI中。

Missing plugins found while loading a transformation

Step : MongoDbInput

        at org.pentaho.di.job.entries.trans.JobEntryTrans.getTransMeta(JobEntryTrans.java:1200)
        at org.pentaho.di.job.entries.trans.JobEntryTrans.execute(JobEntryTrans.java:643)
        at org.pentaho.di.job.Job.execute(Job.java:714)
        at org.pentaho.di.job.Job.execute(Job.java:856)
        ... 4 more
Caused by: org.pentaho.di.core.exception.KettleMissingPluginsException:
Missing plugins found while loading a transformation

我的maven依赖关系如下。

    <dependency>
      <groupId>rhino</groupId>
      <artifactId>js</artifactId>
    </dependency>
    <dependency>
      <groupId>pentaho-kettle</groupId>
      <artifactId>kettle-core</artifactId>
    </dependency>
    <dependency>
      <groupId>pentaho-kettle</groupId>
      <artifactId>kettle-engine</artifactId>
    </dependency>
    <dependency>
      <groupId>pentaho-library</groupId>
      <artifactId>libbase</artifactId>
      <version>5.1.0.0-752</version>
    </dependency>
    <dependency>
      <groupId>pentaho</groupId>
      <artifactId>pentaho-big-data-plugin</artifactId>
      <version>5.1.0.0-751</version>
    </dependency>
    <dependency>
      <groupId>pentaho</groupId>
      <artifactId>pentaho-mongodb-plugin</artifactId>
      <version>5.1.0.0-751</version>
    </dependency>
    <dependency>
      <groupId>org.mongodb</groupId>
      <artifactId>mongo-java-driver</artifactId>
      <version>2.11.1</version>
    </dependency>
    <dependency>
      <groupId>pentaho</groupId>
      <artifactId>metastore</artifactId>
      <version>5.1.0.0-751</version>
    </dependency>
    <dependency>
      <groupId>pentaho-library</groupId>
      <artifactId>libformula</artifactId>
    </dependency>
    <dependency>
      <groupId>simple-jndi</groupId>
      <artifactId>simple-jndi</artifactId>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-compiler</artifactId>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
    </dependency>
  </dependencies>

我错过了什么吗?

4 个答案:

答案 0 :(得分:3)

在init kettleEnviroment之前

KettleEnviroment.init();

你应该添加像

这样的代码
StepPluginType.getInstance().getPluginFolders().add(new PluginFolder("your plugins path", false, true));

答案 1 :(得分:1)

将MongoDB插件作为依赖项仅适用于编译。当PDI运行时,它会在当前目录下查找插件/文件夹,并从那里加载所有插件。您可以通过设置KETTLE_PLUGIN_BASE_FOLDERS系统属性来覆盖该位置。无论哪种方式,您都需要一个插件/文件夹并将MongoDB插件包(而不是JAR)解压缩到插件/中。这应该在plugins /下放置一个名为pentaho-mongodb-plugin的文件夹,如果PDI指向那个插件/文件夹,它应该在运行时加载并成功使用该插件。

答案 2 :(得分:1)

您必须从Kettle安装目录运行Kitchen。
 正如这里所写: http://wiki.pentaho.com/display/EAI/Kitchen+User+Documentation

  

请确保您位于Kettle目录中   在运行下面的示例之前。如果你把这些脚本放入   批处理文件或shell脚本,只需更改目录即可   安装目录

答案 3 :(得分:0)

只需编辑spoon.sh并添加

即可
OPT="$OPT -DKETTLE_PLUGIN_BASE_FOLDERS=$BASEDIR/plugins"

在设置OPT变量的行之后。

这实际上是来自mattyb的解决方案。编辑spoon.sh可以很好地解决问题。

另一个解决方案是在$ {KETTLE_HOME} /.bill目录中创建一个指向plugins文件夹的符号链接。