Pentaho 命令行空指针异常 [英] Pentaho commandline nullpointer exception
问题描述
Pentaho PDI 8.3.0 CE 版(如果重要)
Pentaho PDI version 8.3.0 CE if it matters
当我尝试分别使用厨房或平底锅运行作业或转换命令行时,出现空指针异常.仅当尝试从存储库运行某些内容时才会发生这种情况.当我尝试从勺子运行相同的转换或作业时,一切都很好,而且作业运行良好.
When I try to run a job or transformation commandline using kitchen or pan respectively I get a nullpointer exception. This happens only when trying to run something from a repository. When I try to run the same transformation or job from spoon, all is fine and the job runs great.
我使用以下命令,它们都提供相同的错误:
I use the following commands, which both provide the same error:
./pan.sh -trans=get_clusters -rep=myrepo -user=admin -pass=mypass -dir=/Transformations
./pan.sh -trans=get_clusters -rep=myrepo -user=admin -pass=mypass -dir=/Transformations
和
./kitchen.sh -job=scheduled_update_job -rep=myrepo -user=admin -pass=mypass -dir=/Jobs
./kitchen.sh -job=scheduled_update_job -rep=myrepo -user=admin -pass=mypass -dir=/Jobs
注意:当我尝试从 docker 容器运行作业或转换时,也会发生此错误.
NOTE: This error also happens when I try to run the job or transformation from a docker container.
我收到的错误如下,PAN 和 Kitchen 相同:
The error I receive is as follows and identical for PAN and Kitchen:
020/02/05 09:07:56 - Pan - Start of run.
Processing has stopped because of an error: null
java.lang.NullPointerException
at org.pentaho.di.core.plugins.PluginRegistry.getPluginId(PluginRegistry.java:689)
at org.pentaho.di.core.plugins.PluginRegistry.getPlugin(PluginRegistry.java:715)
at org.pentaho.di.core.plugins.PluginRegistry.loadClass(PluginRegistry.java:370)
at org.pentaho.di.base.AbstractBaseCommandExecutor.establishRepositoryConnection(AbstractBaseCommandExecutor.java:195)
at org.pentaho.di.pan.PanCommandExecutor.execute(PanCommandExecutor.java:119)
at org.pentaho.di.pan.Pan.main(Pan.java:270)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
任何帮助将不胜感激.
推荐答案
使用 pan.sh 或 kitchen.sh 的完整路径从您的主目录(作为工作目录)运行作业.
Run the job from your home directory (as working directory) using the full path of pan.sh or kitchen.sh.
我不确定到底是什么导致了问题.可能的原因:
I'm not sure what exactly causes the trouble. Likely causes:
- 您的 KETTLE_HOME 无效,导致 Pentaho 在工作目录中查找 .kettle.(不要在 HOME 中包含 .kettle)
- 这种情况的一个变体是,如果您以 root 身份复制/移动文件,则您对这些文件没有权限.
- 您的用户没有对数据集成目录的写访问权限,导致写入通常会进入工作目录的配置失败.使用没有写访问权限的帐户运行 Pentaho 是正常的,这不是问题,只是它不喜欢不可写的工作目录.
这篇关于Pentaho 命令行空指针异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!