Thread: Sun Java Studio Creator and PostgreSQL

Sun Java Studio Creator and PostgreSQL

From
Poul Møller Hansen
Date:
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



Re: Sun Java Studio Creator and PostgreSQL

From
Jim Nasby
Date:
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)



Re: Sun Java Studio Creator and PostgreSQL

From
"Mike Chiarappa"
Date:
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:

> 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


Re: Sun Java Studio Creator and PostgreSQL

From
Poul Møller Hansen
Date:
> 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



Re: Sun Java Studio Creator and PostgreSQL

From
Poul Møller Hansen
Date:
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