Hitachi Vantara Pentaho Community Forums
Results 1 to 9 of 9

Thread: Kitchen 3.0RC2 problem when read plugin.xml

  1. #1
    Join Date
    Oct 2007
    Posts
    10

    Exclamation Kitchen 3.0RC2 problem when read plugin.xml

    Hi

    I write a my plugin step and I use it inside a job.

    I put inside the $kettlehome/plugins/step/myplug the jar file+plugin.xml+image.png

    When I start the job in batch mode with the Kitchen.bat it works if I run from $kettlehome while if I run the Kitchen.bat in my environment $myhome/bin I have an exception, it seems that can't find the file plugin.xml of my plugin.

    If I create $myhome/bin/plugins/step/myplug/plugin.xml then Kitchen start and run without problem, note that inside I have only the xml file, not jar.

    I don't understand if this problem is related to the PDI-296 (Plugins in 3.0RC1 are the 2.5 plugins).

    I try this scenario with 3.0 RC1 and RC2 with the same result.

    Regards
    Giovanni.

  2. #2
    Join Date
    Oct 2007
    Posts
    10

    Default

    I have missing that I try also to configure annotate steps with the @Step PDI annotation and KETTLE_PLUGIN_PACKAGES env but it doesn't change the result.

    Giovanni

  3. #3
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Hi Giovanni,

    Please don't hesitate to file a bug report for this. At least then we don't forget to verify or fix this problem before RC2.
    Make sure we get all the information we need, settings, scripts you use, plugin.xml or perhaps a little bit of code.

    Thanks in advance,

    Matt

  4. #4
    Join Date
    Oct 2007
    Posts
    10

    Default

    Hi Matt

    I try also with the DummyPlugin, I create a simple job/trasformation, run the job with Kettle.bat outside the $kettlehome and I have the same problem.

    I'll open a bug report and I'll attach the simple test and the batch Kitchen modified.

    I made the test on a windows XP with java 1.6.

    Giovanni

  5. #5
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Annotated plugins need to be placed in the classpath: in libext/
    I just ported the "Formula" step as a plugin to 3.0 and I am happy to report that everything is working as it should.

    http://wiki.pentaho.org/display/EAI/...ation+Plug-Ins

    HTH,
    Matt

  6. #6
    Join Date
    May 2006
    Posts
    4,882

    Default

    So the plugins directory in the main kettle directory is only for plugins using XML as descriptor, as well as the plugins under .kettle?
    Under the .kettle\plugins the jar files are tried to be exploded...

    Regards,
    Sven

  7. #7
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    The Java annotations (@Step and @Job) can only be picked up if the class is in the classpath.
    I would have loved to have the regular plugins/ directory serve as a loader as well. We could search all the jar files in there very much like Eclipse does. Unfortunately there wasn't enough time to write and debug this feature. We'll get it in in the next release ;-)

    Nothing really changed vs 2.5.x, we just got a few more options for deploying.

    As an example, take a look at the recently ported "Formula" plugin: http://wiki.pentaho.org/display/EAI/...+3+plugin+page

    Matt

  8. #8
    Join Date
    Oct 2007
    Posts
    10

    Question

    I'm little bit confuse, these are my observation after some test about home/run of step plugins:

    1. I could deploy a step plugin using

    - @Step configuration inside the Meta NewpluginStep.java in this case we only need to put the jars in libext and png under ui/images, we configure the KETTLE_PLUGIN_PACKAGES env with the package name like "a.b.c" and we provide it to Kettle or Spoon.

    or

    - XML configuration file, in this case we need to copy under KETTLE_HOME/plugins/steps/newplugin the jar+xml+png

    2. Spoon find the new plugin only if under $KETTLE_HOME/plugins/newplugin there are jar+xml+png otherwise it can't find the new trasformation image on GUI.

    3. Kitchen run outside the $KETTLE_HOME can't find the plugin XML file and goes in Exception, the only way to find it is to put the XML file under the directory tree plugins\steps\NewPlugin create under the dir where start the batch Kitchen.

    4. Kitchen configured with KETTLE_PLUGIN_PACKAGES find the class but continue to search for XML file and goes in Exception the same of point 3.

    INFO 16-10 09:50:02,859 (LogWriter.javarintln:407) -Kitchen - Logging is at level : Minimal logging
    INFO 16-10 09:50:02,875 (LogWriter.javarintln:407) -Kitchen - Start of run.
    2007/10/16 09:50:05:546 CEST [INFO] DefaultFileReplicator - Using "C:\DOCUME~1\all\IMPOST~1\Temp\vfs_cache" as temporary files store.
    ERROR 16-10 09:50:05,859 (LogWriter.javarintln:404) -Thread[test load job (test load job (Thread-1)),5,main] - org.pentaho.di.core.exception.KettleException:
    Unexpected error during transformation metadata load

    Error reading object from XML file

    Unable to load step info from XML step nodeorg.pentaho.di.core.exception.KettleStepLoaderException:
    Unable to load class for step/plugin with id [MyPlugin]. Check if the plugin is available in the plugins subdirectory of the Kettle distribution.

    Unable to load class for step/plugin with id [MyPlugin]. Check if the plugin is available in the plugins subdirectory of the Kettle distribution.

    at org.pentaho.di.job.entries.trans.JobEntryTrans.getTransMeta(JobEntryTrans.java:761)
    at org.pentaho.di.job.entries.trans.JobEntryTrans.execute(JobEntryTrans.java:427)
    at org.pentaho.di.job.Job.execute(Job.java:335)
    at org.pentaho.di.job.Job.execute(Job.java:393)
    at org.pentaho.di.job.Job.execute(Job.java:261)
    at org.pentaho.di.kitchen.Kitchen.main(Kitchen.java:335)
    Caused by: org.pentaho.di.core.exception.KettleXMLException:
    Error reading object from XML file

    Unable to load step info from XML step nodeorg.pentaho.di.core.exception.KettleStepLoaderException:



    Giovanni

  9. #9
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Giovanni,

    We have 3 or 4 samples now on version 3, both for annotated plugins as for regular plugins deployed through plugin.xml.

    As documented:
    - Annotated step plugins should be present in the classpath and you need to modify the KETTLE_PLUGIN_PACKAGES variable
    - Regular step (plugin.xml) plugins need to be placed in either $KETTLE_HOME/.kettle/plugins/steps <distribution>/plugins/steps/
    If KETTLE_HOME is not set, $HOME is used.

    HTH,

    Matt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.