Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Load Images to Database

  1. #1
    Join Date
    Jul 2010
    Posts
    8

    Default Load Images to Database

    I am trying to build a transformation that loads image data to a database.

    My input data format is:

    id, name, filepath
    1, userimage1, c:/test/image1.jpg
    2, userimage2, c:/test/image2.jpg

    I am using the transformation example to load images to the database as my base and I get this error:

    2010/07/18 23:18:07 - Script.0 - Value #4 - [filename] is used in the script.
    2010/07/18 23:18:07 - Script.0 - This script is using 2 values from the input stream(s)
    2010/07/18 23:18:07 - Script.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : Unexpected error :
    2010/07/18 23:18:07 - Script.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : java.lang.ArrayIndexOutOfBoundsException: 1
    2010/07/18 23:18:07 - Script.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : org.pentaho.di.trans.steps.script.ScriptMeta.createNewScriptEngine(ScriptMeta.java:873)
    2010/07/18 23:18:07 - Script.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : org.pentaho.di.trans.steps.script.Script.addValues(Script.java:155)
    2010/07/18 23:18:07 - Script.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : org.pentaho.di.trans.steps.script.Script.processRow(Script.java:608)
    2010/07/18 23:18:07 - Script.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : org.pentaho.di.trans.step.RunThread.run(RunThread.java:40)
    2010/07/18 23:18:07 - Script.0 - ERROR (version 4.0.0-stable, build 13376 from 2010-06-15 11.00.26 by buildguy) : java.lang.Thread.run(Unknown Source)
    2010/07/18 23:18:07 - Script.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)

    Attached is my transformation. Please help!!!
    Attached Files Attached Files

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

    Default

    Do you have any missing or zero-length images? Something like that?

  3. #3
    Join Date
    Jul 2010
    Posts
    8

    Default

    I verified each of my files. All of them are valid images and no zero length files.

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

    Default

    I believe the original sample works great so I have no clue, sorry.

  5. #5
    Join Date
    Sep 2009
    Posts
    810

    Default Bad step type used?

    Hmm...
    I believe the problem is that you are using the "script" step from the "Experimental" section.
    You should be using the "Modified Java Script Value" step from the "Scripting" section, instead.

    Hope that fixes it for you...

    Cheers

    Slawo

  6. #6
    Join Date
    Jul 2010
    Posts
    8

    Thumbs up

    That worked.

    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.