H2 db with Pentaho Data Integrator

667 views
Skip to first unread message

Kent_Andrews

unread,
Nov 26, 2010, 5:24:23 PM11/26/10
to H2 Database
Hi All,

ver 3.2 GA on Linux

I have a H2 db created by PDI in a dir that is wide open for
permissions and space etc.

I have a job that checks to see if the H2 db file exists and if it
does it uses the Check if Table Exists entry to see
if the table "FOO" exists and if it doesn't it uses the SQL JOb entry
to run a CREAT TABLE FOO ...

I even added a "commit;" within the SQL Job Entry ... not sure if the
commit is implicit or not at this point.

Regardless I then have another Check if Table Exists and if it does I
run a Trans that reads from a CSV file and uses a Table Output step to
push the rows into my FOO table within the H2 db.

I have verified that the H2 DB connection is Shared and that both the
job and the trans are referencing the same db connection. They are!

My Issue is the Trans fails saying that it can't find Table FOO and
throws an H2 error within the log.

So to recap:

The Job knew the Table didn't exist and created it using the SQL
entry.
The Job then checked if the Table existed and it did so it calls the
Trans.
The Trans fails saying it can't find the Table. (The very same table
that the Preceding Job found)

UGH!

:-)

Anyone made it over this hump?

Any thoughts MUCH appreciated.

Thanks

Kent

Thomas Mueller

unread,
Nov 29, 2010, 12:42:23 AM11/29/10
to h2-da...@googlegroups.com
Hi,

What is your database URL? See
http://h2database.com/html/faq.html#database_files

Regards,
Thomas

Kent_Andrews

unread,
Nov 29, 2010, 10:58:26 AM11/29/10
to H2 Database
Hi Thomas,

Thanks for looking at this.

I am letting PDI (Pentaho ETL) create the db. B the way the db is
being created and persisted as I can see the 4 files it creates. The
H2 log also shows the error that the PDI log is throwing back.

"11-26 22:07:37 jdbc[0]: SQLException org.h2.jdbc.JdbcSQLException:
Table MY_TABLE not found [42S02-46]"

I was possibly thinking that PDI may be opening up the H2 DB as a
"single-user" mode and that it is another thread trying to access the
db and that is why the error is being thrown.

I have used H2 before to act as the PDI repository (where it keeps all
the trans and jobs) and that has never had any issues being accessed
by multiple threads. As far as I know PDI would create a DB that acts
as a repository the same way it creates a db that doesn't.

Thoughts?

Thanks

Kent

On Nov 28, 10:42 pm, Thomas Mueller <thomas.tom.muel...@gmail.com>
wrote:

Kent_Andrews

unread,
Nov 29, 2010, 12:39:45 PM11/29/10
to H2 Database
Hi "again" Thomas,

I think it was plain and simple user error.

Thanks

Kent
Reply all
Reply to author
Forward
0 new messages