0
votes

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

and

./kitchen.sh -job=scheduled_update_job -rep=myrepo -user=admin -pass=mypass -dir=/Jobs

NOTE: This error also happens when I try to run the job or transformation from a docker container.

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)

Any help would be appreciated.

1
FYI: I also set the KETTLE_HOME as mentioned in the documentation. This made no difference in either the local setup nor my docker container. - JustLudo
Also: I have tossed away the karaf caches for both pan and kitchen entirely, but this does not solve it either. - JustLudo
It looks like it can't get some plugin, perhaps the repository plugin. Are you running it from the same data-integration folder? If not you might be missing a plugin. - Cyrus
Also, if you configured the KETTLE_HOME differently from the one used by Spoon, check if there's a valid repositories.xml - Cyrus
Hmmmm. For some reason this worked! Now only to figure out why it works like this (I would expect this to be the reason for setting KETTLE_HOME in the first place) and then figure out how to incorporate into a docker container. Thanks Cyrus and please turn the comment into an answer so I can accept it. - JustLudo

1 Answers

1
votes

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:

  • Your KETTLE_HOME is not valid, causing Pentaho to look for .kettle in the working directory. (Do not include .kettle in the HOME)
  • A variant of this is that you don't have permissions on the files if you copied/moved them as root.
  • Your user does not have write access to the data-integration directory, causing some failure writing a configuration that would normally go into the working dir. It is normal to run Pentaho with an account that does not have write access here, that is not the problem, just that it doesn't like a non-writable working dir.