Sun Java Studio Creator and PostgreSQL

Started by Poul Møller Hansenover 19 years ago5 messagesgeneral
Jump to latest
#1Poul Møller Hansen
freebsd@pbnet.dk

I have some troubles getting Sun Java Studio Creator & Sun Java
Application Server to work with
PostgreSQL.

Trying different syntaxes for the SQL statement (schema or no schema) in
the session bean
I get either the error: "No columns in table: pmh.tablename" or
"Cannot change transaction isolation level in the middle of a transaction"
when trying to delete, insert or update rows. Selecting is ok.

The application works fine when using an Apache Derby database, so the
problem is related to PostgreSQL

I can see several postings on other mailing lists with the same problem,
but haven's found any solution.

Do anyone of you know what I can do ?

Thanks,
Poul

#2Jim Nasby
Jim.Nasby@BlueTreble.com
In reply to: Poul Møller Hansen (#1)
Re: Sun Java Studio Creator and PostgreSQL

On Sep 14, 2006, at 4:40 PM, Poul Møller Hansen wrote:

I have some troubles getting Sun Java Studio Creator & Sun Java
Application Server to work with
PostgreSQL.

Trying different syntaxes for the SQL statement (schema or no
schema) in the session bean
I get either the error: "No columns in table: pmh.tablename" or
"Cannot change transaction isolation level in the middle of a
transaction"
when trying to delete, insert or update rows. Selecting is ok.

The application works fine when using an Apache Derby database, so
the problem is related to PostgreSQL

I can see several postings on other mailing lists with the same
problem, but haven's found any solution.

Just because it works with Derby doesn't mean it's PostgreSQL's
fault. There's plenty of things that "work" in certain databases that
really shouldn't.

In any case, you might try asking on pgsql-jdbc, since there's more
java-heads over there. I'd also recommend turning query logging on so
you can see exactly what commands are being sent to the server.
--
Jim Nasby jimn@enterprisedb.com
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

#3Mike Chiarappa
mikechiarappa@libero.it
In reply to: Poul Møller Hansen (#1)
Re: Sun Java Studio Creator and PostgreSQL

Hello Poul,
take a look to thread:
http://forum.sun.com/jive/thread.jspa?forumID=123&threadID=101711

It works for me !!! :o))

Mike

Jim Nasby ha scritto:

Show quoted text

On Sep 14, 2006, at 4:40 PM, Poul Møller Hansen wrote:

I have some troubles getting Sun Java Studio Creator & Sun Java
Application Server to work with
PostgreSQL.

Trying different syntaxes for the SQL statement (schema or no
schema) in the session bean
I get either the error: "No columns in table: pmh.tablename" or
"Cannot change transaction isolation level in the middle of a
transaction"
when trying to delete, insert or update rows. Selecting is ok.

The application works fine when using an Apache Derby database, so
the problem is related to PostgreSQL

I can see several postings on other mailing lists with the same
problem, but haven's found any solution.

Just because it works with Derby doesn't mean it's PostgreSQL's
fault. There's plenty of things that "work" in certain databases that
really shouldn't.

In any case, you might try asking on pgsql-jdbc, since there's more
java-heads over there. I'd also recommend turning query logging on so
you can see exactly what commands are being sent to the server.
--
Jim Nasby jimn@enterprisedb.com
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

#4Poul Møller Hansen
freebsd@pbnet.dk
In reply to: Jim Nasby (#2)
Re: Sun Java Studio Creator and PostgreSQL

Just because it works with Derby doesn't mean it's PostgreSQL's fault.
There's plenty of things that "work" in certain databases that really
shouldn't.

In any case, you might try asking on pgsql-jdbc, since there's more
java-heads over there. I'd also recommend turning query logging on so
you can see exactly what commands are being sent to the server.

I did try the pgsql-jdbc
http://archives.postgresql.org/pgsql-jdbc/2006-09/msg00078.php
But ended up in not knowing if the problem is related to the
CachedRowSetXImpl() class
or the jdbc driver.
And I don't know how to trace the error.

Any help is much appreciated.

Poul

#5Poul Møller Hansen
freebsd@pbnet.dk
In reply to: Mike Chiarappa (#3)
Re: Sun Java Studio Creator and PostgreSQL

Mike Chiarappa skrev:

Hello Poul,
take a look to thread:
http://forum.sun.com/jive/thread.jspa?forumID=123&threadID=101711

It works for me !!! :o))

Mike

Thanks Mike, had solved that issue the same way :)

Don't know how it works internally, but I guess the JDBC driver is
reporting the isolation level wrong,
as the default setting on the app-server "drivers default" isn't
working, but setting it to "read comitted" works.

Poul