Hitachi Vantara Pentaho Community Forums
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: SelectValueMeta error!

  1. #1
    Join Date
    Dec 2007
    Posts
    15

    Default SelectValueMeta error!

    Hi all,

    I am facing problem with example application for PDI. I am getting error in the following, just after calling svi.getMeta(), its NULL. I don't know how to fix this, any idea?


    SelectValuesMeta svi = new SelectValuesMeta();
    svi.allocate(0, 0, sourceFields.length);
    for (int i = 0; i < sourceFields.length; i++)
    {
    svi.getMeta()[i].setName(sourceFields[i]);
    svi.getMeta()[i].setRename(targetFields[i]);
    }


    Thanks,

    Mircha

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

    Default

    No idea, looks pretty good. You're probably in the best place to debug it.

    Regards,
    Sven

  3. #3
    Join Date
    Dec 2007
    Posts
    15

    Default

    I am getting ClassNotLoadedException in line

    svi.getMeta().

    svi meta is null (array of SelectMetaChange).

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

    Default

    Debug some more... it works for me. The return value is a regular class in the kettle jar file... so no reason you would get Class Loader exception on that.

    Regards
    Sven

  5. #5
    Join Date
    Dec 2007
    Posts
    15

    Default

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



    Thx.

  6. #6
    Join Date
    Dec 2007
    Posts
    15

    Default

    When i call :
    SelectValuesMeta svi = new SelectValuesMeta();

    it creates instance, but with NULL meta parameter, why?
    How can I debug this?

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

    Default

    If you don't know, I wouldn't touch the code with a 10" pole , you're going to run into much more difficult problems ... Eclipse... set breakpoint... debug.

    The meta object is assigned in the allocate() method.

    Regards,
    Sven

  8. #8
    Join Date
    Dec 2007
    Posts
    15

    Default

    I know how to debug in Eclipse, but when I receive
    org.eclipse.debug.core.DebugException: com.sun.jdi.ClassNotLoadedException: Type has not been loaded occurred while retrieving component type of array.

    while in

    svi.allocate(0, 0, sourceFields.length);

    and the next step throws error message:

    Exception in thread "main" org.pentaho.di.core.exception.KettleException:
    An unexpected error occurred creating the new transformation
    at net.test.TransBuilder.main (TransBuilder.java:245)
    at net.test.TransBuilder.buildCopyTable (TransBuilder.java:135)

    at net.test.TransBuilder.buildCopyTable(TransBuilder.java:182)
    at net.test.TransBuilder.main(TransBuilder.java:245)
    Caused by: java.lang.NullPointerException
    at net.test.TransBuilder.buildCopyTable(TransBuilder.java:135)
    ... 1 more

    You can assume that I am just using sample from PDI with no changes.

    Where to go from here? what other debugging I have to do?
    I don't have source to look at, hence asked if someone have gone through this kind of error. I am using jdk 1.6, maybe this is the cause?
    Last edited by Mircha; 12-27-2007 at 06:37 AM.

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

    Default

    So your classnotloaded exception is not your root cause, it's a strange result of debugging. The original problem seems to be in net.test.TransBuilder.buildCopyTable(TransBuilder. java:135) . Or possibly you're doing fishy things with JNDI.

    Unless you can make/share a small compilable version that shows your problem I doubt you're going to get more support on this forum.

    Regards,
    Sven
    Last edited by sboden; 12-27-2007 at 07:21 AM.

  10. #10
    Join Date
    Dec 2007
    Posts
    15

    Default

    But before this svi parameter meta is array of 12 NULL vaues, instead of Object of some type. If you look at variables, you'll see org.eclipse.debug.core.DebugException: com.sun.jdi.ClassNotLoadedException: Type has not been loaded occurred while retrieving component type of array.

    and call to

    Line 135 is - svi.getMeta()[i].setName(sourceFields[i]);
    which is getMeta()[i] call to null and null pointer exception is thrown.

    I changed only the following from kettle\extra:

    public static final String[] databasesXML = {
    "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
    "<connection>" +
    "<name>target</name>" +
    "<server>192.168.1.100</server>" +
    "<type>MSSQL</type>" +
    "<access>Native</access>" +
    "<database>rts_cp</database>" +
    "<port>1433</port>" +
    "<username>man</username>" +
    "<password>wake</password>" +
    "</connection>",

    "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
    "<connection>" +
    "<name>source</name>" +
    "<server>192.168.1.100</server>" +
    "<type>MSSQL</type>" +
    "<access>Native</access>" +
    "<database>rts_stage</database>" +
    "<port>1433</port>" +
    "<username>man</username>" +
    "<password>wake</password>" +
    "</connection>"
    };

    The rest is as in sample code. Both these databases exist and tables too.
    I didn't made any JNDI settings, is it needed?

    kettle libraries are in lib and rest are in libext respectively.

    Tnx,
    Mircha
    Last edited by Mircha; 12-27-2007 at 07:40 AM.

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.