【kettle】pdi/data-integration 打开ktr文件报错“Unable to load step info from XML“

一、报错内容:

Unable to load step info from XML step nodeorg.pentaho.di.core.exception.KettleXMLException: 
Unable to load step info from XML
 at org.pentaho.commons.launcher.Launcher.main (Launcher.java:92)
 at java.lang.reflect.Method.invoke (Method.java:498)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
 at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
 at sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
 at org.pentaho.di.ui.spoon.Spoon.main (Spoon.java:707)
 at org.pentaho.di.ui.spoon.Spoon.start (Spoon.java:9179)
 at org.pentaho.di.ui.spoon.Spoon.waitForDispose (Spoon.java:7817)
 at org.pentaho.di.ui.spoon.Spoon.readAndDispatch (Spoon.java:1381)
 at org.eclipse.swt.widgets.Display.readAndDispatch (null:-1)
 at org.eclipse.swt.widgets.Display.runDeferredEvents (null:-1)
 at org.eclipse.swt.widgets.Widget.sendEvent (null:-1)
 at org.eclipse.swt.widgets.Display.sendEvent (null:-1)
 at org.eclipse.swt.widgets.EventTable.sendEvent (null:-1)
 at org.eclipse.jface.action.ActionContributionItem$5.handleEvent (ActionContributionItem.java:402)
 at org.eclipse.jface.action.ActionContributionItem.access$2 (ActionContributionItem.java:490)
 at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:545)
 at org.eclipse.jface.action.Action.runWithEvent (Action.java:498)
 at org.pentaho.ui.xul.jface.tags.JfaceMenuitem$1.run (JfaceMenuitem.java:106)
 at org.pentaho.ui.xul.jface.tags.JfaceMenuitem.access$100 (JfaceMenuitem.java:43)
 at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke (AbstractXulComponent.java:141)
 at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke (AbstractXulComponent.java:157)
 at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke (AbstractXulDomContainer.java:313)
 at java.lang.reflect.Method.invoke (Method.java:498)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
 at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
 at sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
 at org.pentaho.di.ui.spoon.Spoon.openFile (Spoon.java:4252)
 at org.pentaho.di.ui.spoon.Spoon.openFile (Spoon.java:4315)
 at org.pentaho.di.ui.spoon.Spoon.openFile (Spoon.java:4637)
 at org.pentaho.di.ui.spoon.TransFileListener.open (TransFileListener.java:61)
 at org.pentaho.di.trans.TransMeta.loadXML (TransMeta.java:3075)
 at org.pentaho.di.trans.step.StepMeta. (StepMeta.java:321)
 at org.pentaho.di.trans.steps.fileinput.text.TextFileInputMeta.loadXML (TextFileInputMeta.java:328)
 at org.pentaho.big.data.kettle.plugins.hdfs.trans.HadoopFileInputMeta.loadSource (HadoopFileInputMeta.java:108)
 at org.pentaho.big.data.kettle.plugins.hdfs.trans.HadoopFileInputMeta.loadUrl (HadoopFileInputMeta.java:145)
 at org.pentaho.di.core.vfs.KettleVFS.getFileObject (KettleVFS.java:105)
 at org.pentaho.di.core.vfs.KettleVFS.getFileObject (KettleVFS.java:109)
 at org.pentaho.di.core.vfs.KettleVFS.getFileObject (KettleVFS.java:152)
 at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile (DefaultFileSystemManager.java:648)
 at org.pentaho.di.core.vfs.ConcurrentFileSystemManager.resolveFile (ConcurrentFileSystemManager.java:91)
 at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile (DefaultFileSystemManager.java:711)
 at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile (AbstractOriginatingFileProvider.java:55)
 at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile (AbstractOriginatingFileProvider.java:71)
 at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.getFileSystem (AbstractOriginatingFileProvider.java:93)
 at org.apache.commons.vfs2.provider.AbstractFileProvider.addFileSystem (AbstractFileProvider.java:96)
 at org.apache.commons.vfs2.provider.AbstractVfsContainer.addComponent (AbstractVfsContainer.java:49)
 at org.apache.commons.vfs2.provider.AbstractFileSystem.init (AbstractFileSystem.java:115)
 at org.pentaho.big.data.impl.vfs.hdfs.HDFSFileSystem.addCapabilities (HDFSFileSystem.java:52)

二、日志解读

kettle日志有个特点,最后被调用的栈\代码在最下边,这和java是相反的。所以从下往上看报错就对了。

(1)此处报空指针。HDFSFileSystem.addCapabilities 可能是hadoop fileSystem(以下简称fs)没有取到。
(2)在之前果然有取fs的代码 AbstractOriginatingFileProvider.getFileSystem
所以可以推断kettle在读取ktr或kjb时候就会尝试获取fs,但是后面代码缺少校验,所以包空指针错误。

所以直接文本编辑器打开ktr文件,可以看到类似下边的内容:
【kettle】pdi/data-integration 打开ktr文件报错“Unable to load step info from XML“_第1张图片

三、检验和解决

  1. haoop是否可以连接
  2. ktr里的source_configuration_name指定的配置名称是否在kettle中有配置

你可能感兴趣的:(hadoop)