Hitachi Vantara Pentaho Community Forums
Results 1 to 23 of 23

Thread: Exception - Message not found in the preferred and failover locale

  1. #1

    Question Exception - Message not found in the preferred and failover locale

    How to make this go away ?
    19:54:35,583 INFO [i18n] i18n - org.pentaho.di.core.exception.KettleException:
    Message not found in the preferred and failover locale: key=[ClosureGenerator.Step.ToolTip], package=org.pentaho.di.trans.step

    at org.pentaho.di.i18n.LAFMessageHandler.calculateString(LAFMessageHandler.java:109)
    at org.pentaho.di.i18n.GlobalMessages.getString(GlobalMessages.java:398)
    at org.pentaho.di.i18n.BaseMessages.getString(BaseMessages.java:54)
    at org.pentaho.di.trans.step.Messages.getString(Messages.java:11)
    at org.pentaho.di.core.config.AnnotatedStepsConfigManager.load(AnnotatedStepsConfigManager.java:71)
    at org.pentaho.di.core.config.BasicConfigManager.loadAs(BasicConfigManager.java:34)
    at org.pentaho.di.trans.step.BaseStep.<clinit>(BaseStep.java:81)
    at org.pentaho.di.trans.StepLoader.readNatives(StepLoader.java:127)
    at org.pentaho.di.trans.StepLoader.init(StepLoader.java:112)
    at org.pentaho.di.trans.StepLoader.init(StepLoader.java:122)

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

    Default

    Raise a JIRA... It's a missing translation in the step. If you want to make it go away quickly you would probably have to unjar the kettle.jar and add the key to a property file.

    Regards,
    Sven

  3. #3

    Default

    Done. PDI-494

    Can you tell me which file and what key to add?

    -rusang

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

    Default

    The files are in org/pentaho/di/trans/steps/closure/messages ... I checked current translations, the english and french translations contain the key, are you using the dutch one?

    Regards.
    Sven

  5. #5
    Join Date
    Nov 1999
    Posts
    459

    Default

    This was fixed Oct-3-2007 by PDI-246, it seems you do not use the GA version. I double checked and it works fine in 3.0.0 GA.
    http://jira.pentaho.org/browse/PDI-494
    Cheers,
    Jens

  6. #6

    Default

    That is true. I was still using RC2. I will upgrade to GA version.

    Thanks.
    -Sanjay

  7. #7

    Default

    I upgraded to GA version and I don't see that exception any more.

    Thanks.
    -Sanjay

  8. #8
    Join Date
    Sep 2007
    Posts
    10

    Default Still getting the error...

    I'm using 3.0.1 and I get these errors when I try to run my ETLRunner class. I am using NetBeans 6.0 as a java IDE on a Mac. My transforms worked fine under 2.5.2 (did not have this error). I can send you an NB project if needed.

    Eventually I will embed PDI into another application and I am concerned about this error. Is there a special way to package these files?

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

    Default

    API wise, version 3 is not compatible with 2.5.
    I obviously have no idea what you mean by "ETLRunner", but it probably needs porting to 3.0

    Matt

  10. #10
    Join Date
    Sep 2007
    Posts
    10

    Default Porting problem

    ETLRunner is a custom application that uses the Kettle classes to run a transformation. It's like an embedded Pan but only concerns itself with running one single process. There is other logic in there that allows the calling program to set the inout/output files.

    It worked under 2.5.2 but under 3.x that Exception comes up when steps get loaded. The Transform itself executes.

    The issue seems to be that some message classes can't be found even though they are right there (in kettle-engine-3.0.0.jar)

  11. #11

    Default

    I am using 3.0.0 GA and I started seeing these errors again. Any clue ??


    INFO 11-01 10:51:57,215 (LogWriter.javarintln:403) -org.pentaho.di.core.util.ResolverUtil@211e92 - Scanning for classes in [/C:/tools/Kettle-3.0.0.GA/lib/kettle-engine-3.0.jar] matching criteria: [Lorg.pentaho.di.core.util.ResolverUtil$Test;@211f16
    INFO 11-01 10:51:58,266 (LogWriter.javarintln:403) -org.pentaho.di.core.util.ResolverUtil@211e92 - Scanning for classes in [/C:/TrueDemand/Kettle/release/lib/kettle-engine-3.0.jar] matching criteria: [Lorg.pentaho.di.core.util.ResolverUtil$Test;@211f16
    INFO 11-01 10:51:58,783 (LogWriter.javarintln:403) -i18n - org.pentaho.di.core.exception.KettleException:
    Message not found in the preferred and failover locale: key=[ClosureGenerator.Step.Description], package=org.pentaho.di.trans.step

    at org.pentaho.di.i18n.LAFMessageHandler.calculateString(LAFMessageHandler.java:121)
    at org.pentaho.di.i18n.GlobalMessages.getString(GlobalMessages.java:410)
    at org.pentaho.di.i18n.BaseMessages.getString(BaseMessages.java:66)
    at org.pentaho.di.core.config.AnnotatedStepsConfigManager.load(AnnotatedStepsConfigManager.java:76)
    at org.pentaho.di.core.config.BasicConfigManager.loadAs(BasicConfigManager.java:46)
    at org.pentaho.di.trans.step.BaseStep.<clinit>(BaseStep.java:77)
    at org.pentaho.di.trans.StepLoader.readNatives(StepLoader.java:123)
    at org.pentaho.di.trans.StepLoader.init(StepLoader.java:108)
    at org.pentaho.di.trans.StepLoader.init(StepLoader.java:118)
    at com.tdemand.server.di.TdKettle.initKettle(TdKettle.java:94)
    at com.tdemand.server.di.TdKettle.transform(TdKettle.java:113)
    at com.tdemand.di.client.PDIWrapperClient.runTransStandAlone(PDIWrapperClient.java:323)
    at com.tdemand.di.client.PDIWrapperClient.main(PDIWrapperClient.java:230)

    INFO 11-01 10:51:58,799 (LogWriter.javarintln:403) -i18n - org.pentaho.di.core.exception.KettleException:
    Message not found in the preferred and failover locale: key=[ClosureGenerator.Step.Description], package=org.pentaho.di.trans.step

    at org.pentaho.di.i18n.LAFMessageHandler.calculateString(LAFMessageHandler.java:121)
    at org.pentaho.di.i18n.GlobalMessages.getString(GlobalMessages.java:410)
    at org.pentaho.di.i18n.BaseMessages.getString(BaseMessages.java:66)
    at org.pentaho.di.trans.step.Messages.getString(Messages.java:23)
    at org.pentaho.di.core.config.AnnotatedStepsConfigManager.load(AnnotatedStepsConfigManager.java:77)
    at org.pentaho.di.core.config.BasicConfigManager.loadAs(BasicConfigManager.java:46)
    at org.pentaho.di.trans.step.BaseStep.<clinit>(BaseStep.java:77)
    at org.pentaho.di.trans.StepLoader.readNatives(StepLoader.java:123)
    at org.pentaho.di.trans.StepLoader.init(StepLoader.java:108)
    at org.pentaho.di.trans.StepLoader.init(StepLoader.java:118)
    at com.tdemand.server.di.TdKettle.initKettle(TdKettle.java:94)

  12. #12

    Default

    I debugged a bit more. Here is the problem:


    The Kettle code is looking for locale key - ClosureGenerator.Step.Description under org.pentaho.di.trans.step.messages where as this key is under
    org.pentaho.di.trans.steps.messages - notice step vs steps. I copied the keys from steps to step folder and it works.

    Do you want me to raise a new JIRA or can it be taken care of under PDI-246 or PDI 494. I am using 3.0.0 GA

    Message not found in the preferred and failover locale: key=[ClosureGenerator.Step.Description], package=org.pentaho.di.trans.step


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

    Default

    Why don't you try 3.0.1GA first and see if the problem is not gone. (I'm sure it is)

    HTH,

    Matt

  14. #14

    Default

    i tried with 3.0.1 version - same thing.

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

    Default

    If it bothers you that much, why not try one of the daily builds? ;-)
    I'm sure I saw it get fixed.

    We're planning a 3.0.2 release end of next week, you can also wait for that one.

  16. #16

    Default

    I tested the last nightly build 536 - same problem.

    2008/01/31 12:14:01 - i18n - org.pentaho.di.core.exception.KettleException:
    2008/01/31 12:14:01 - i18n - Message not found in the preferred and failover locale: key=[ClosureGenerator.Step.Description], package=org.pentaho.di.trans.step
    2008/01/31 12:14:01 - i18n -
    2008/01/31 12:14:01 - i18n - at org.pentaho.di.i18n.LAFMessageHandler.calculateString(LAFMessageHandler.java:121)
    2008/01/31 12:14:01 - i18n - at org.pentaho.di.i18n.GlobalMessages.getString(GlobalMessages.java:412)
    2008/01/31 12:14:01 - i18n - at org.pentaho.di.i18n.BaseMessages.getString(BaseMessages.java:66)
    2008/01/31 12:14:01 - i18n - at org.pentaho.di.core.config.AnnotatedStepsConfigManager.load(AnnotatedStepsConfigManager.java:76)
    2008/01/31 12:14:01 - i18n - at org.pentaho.di.core.config.BasicConfigManager.loadAs(BasicConfigManager.java:46)
    2008/01/31 12:14:01 - i18n - at org.pentaho.di.trans.step.BaseStep.<clinit>(BaseStep.java:77)
    2008/01/31 12:14:01 - i18n - at org.pentaho.di.trans.StepLoader.readNatives(StepLoader.java:123)
    2008/01/31 12:14:01 - i18n - at org.pentaho.di.trans.StepLoader.init(StepLoader.java:108)
    2008/01/31 12:14:01 - i18n - at org.pentaho.di.trans.StepLoader.init(StepLoader.java:118)

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

    Default

    Nobody else seems to have the problem.

    I can't help but notice you embedded Kettle into your own "True Demand" java packages. Maybe something went wrong there.

    Matt

  18. #18
    Join Date
    Nov 1999
    Posts
    459

    Default

    I found out that especially the loading of the step ClosureGenerator (and RowGenerator) is different from the others (by annotations and not by kettle-steps.xml) and this could lead to this problem:
    Message not found in the preferred and failover locale: key=[ClosureGenerator.Step.Description]

    I can not reproduce this on my system, but have a feeling that this is related to
    http://jira.pentaho.org/browse/PDI-302 (step annotations)
    and could be operating system / JVM specific.

    On what OS and Java version do we get this error?

    Thanks,
    Jens
    Last edited by jbleuel; 02-05-2008 at 08:07 AM.

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

    Default

    Why Jens, those things are totally unrelated.

  20. #20

    Default

    If you look at the exception -
    "Message not found in the preferred and failover locale: key=[ClosureGenerator.Step.Description], package=org.pentaho.di.trans.step"

    The code is looking for key "ClosureGenerator.Step.Description" in package "org.pentaho.di.trans.step" and it is not there it is in "org.pentaho.di.trans.steps" package. As soon as I create this key in the package org.pentaho.di.trans.steps and error is gone.

    We are invoking kettle transformation from our java program - the code is your Pan.java code with few lines to set Kettle Variables.
    If it helps I have pasted the code.

    It is not harmful, just ugly to use in production environment. I had my customers complaining.


    public static LogWriter initKettle(String logLevel, String logFile) throws KettleException {
    // 0. Init Environment
    EnvUtil.environmentInit();
    //1. Set the LogWriter
    LogWriter log=null;
    LogWriter.setConsoleAppenderDebug();
    if (Const.isEmpty(logFile))
    {
    log=LogWriter.getInstance( LogWriter.LOG_LEVEL_BASIC );
    } else {
    log=LogWriter.getInstance( logFile, true, LogWriter.LOG_LEVEL_BASIC );
    }

    if (!Const.isEmpty(logLevel))
    {
    log.setLogLevel(logLevel.toString());
    log.logMinimal("TdKettle", "Logging is at level : "+log.getLogLevelDesc());
    }

    /* Load the plugins etc.*/
    try {
    StepLoader.init();
    JobEntryLoader.init();
    }
    catch(KettleException e)
    {
    log.logError("Pan", "Error loading steps... halting Pan!", e);
    throw e;
    }
    return log;
    }

    public static int transform(String transFilename,
    String inputFileName,
    String outFileName,
    String loglevel,
    String logfile,
    Properties props)
    throws Exception
    {
    LogWriter log=initKettle(loglevel, logfile);
    log.logMinimal("TdKettle", "Inside Transform - trans: " + transFilename
    +"\ninputFileName: " + inputFileName
    +"\noutFileName: " + outFileName
    +"\nloglevel: " + loglevel + ", logfile:" + logfile
    +"\nProps: " + props);

    Calendar cal=Calendar.getInstance();
    Date start = cal.getTime();

    TransMeta transMeta = new TransMeta(transFilename);
    Trans trans = new Trans(transMeta);

    trans.initializeVariablesFrom(null);
    String key;
    if(props != null){
    for(Enumeration en = props.propertyNames(); en.hasMoreElements(){
    key = (String)en.nextElement();
    trans.setVariable(key, props.getProperty(key));
    }
    }
    trans.setVariable("INPUT_FILE", inputFileName);
    trans.setVariable("OUTPUT_FILE", outFileName);
    trans.getTransMeta().setInternalKettleVariables(trans);

    // allocate & run the required sub-threads
    ArrayList<String> args = new ArrayList <String>();
    args.add("-file="+transFilename);
    args.add("-logfile="+logfile);
    args.add("-level="+loglevel);
    //args.add("-safemode="+optionSafemode);

    log.logMinimal("TdPan", "args: " + args + "\nInputFile: " + inputFileName + "\nOutputFile: " + outFileName);
    log.logMinimal("TdPan", "Start of run.");
    trans.execute((String[])args.toArray(new String[args.size()]));

    trans.waitUntilFinished();
    trans.endProcessing("end");

    log.logMinimal("Pan", "Finished!");

    return 0;
    }

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

    Default

    Actually, no that's not quite right. Over here in Kettle land, the i18n key is first searched in this file

    http://source.pentaho.org/svnkettler..._US.properties

    In package org.pentaho.di.trans.steps.closure

    In other words, in the same package as class ClosureGeneratorMeta
    Something in your configuration (xml configuration changed, whatever) causes this change in behavior.

    Matt

  22. #22
    Join Date
    Nov 1999
    Posts
    459

    Default

    This one is fixed in the upcoming releases 3.0.2 and 3.1, see explanation over here: http://jira.pentaho.org/browse/PDI-494

    Thanks,
    Jens

  23. #23

    Default

    cool. Thanks !

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.