Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: problem with java class

  1. #1
    Join Date
    Nov 2011

    Default problem with java class

    I am trying to use a List in a user defined java class. The class code reads:

    import java.util.*;

    public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException
    // First, get a row from the default input hop
    Object[] r = getRow();

    // If the row object is null, we are done processing.
    if (r == null) {
    return false;

    try {
    List<String> myString = new ArrayList<String>();
    } catch (Exception e) {

    putRow(data.outputRowMeta, r);
    return true;

    The code will not pass Test class or compile. The error message is

    Line 15, Column 20: Expression "List < String > myString" is not an lvalue

    In my actual code, I have <String> replaced with an imported object. Java is not my preferred programming language but I thought I had lists down. Any suggestions?

    PDI 4.2.0-stable on Windows 7
    Last edited by doneal24; 11-15-2011 at 11:35 AM.

  2. #2
    Join Date
    Sep 2009


    Hi there,

    don't use generics. Simply make it a List. I don't think the built-in compiler supports generics.


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.