From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | Orestis Tsakiridis <otsakir(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: postgresql server version & JDBC driver version |
Date: | 2014-07-03 13:31:59 |
Message-ID: | CADK3HHLsTjDjFGgByqsRdgJFvGHrSeiwjOxYNPc66zU0TM4ViQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Well the JDBC4 bits that are not implemented may or may not be relevant.
You can try the 9.1 driver or even the 9.3 driver. I still don't see enough
information in the stacktrace to tell what the issue really is?
Dave Cramer
dave.cramer(at)credativ(dot)ca
http://www.credativ.ca
On 3 July 2014 09:26, Orestis Tsakiridis <otsakir(at)gmail(dot)com> wrote:
> Thanks for your quick response.
>
> There are several layers between the application and the JDBC. There is
> hibernate ORM and Bitronix transaction manager so it's hard to tell exactly
> what causes the problem. It all boils down to this exception (i've tried to
> throw out the irrelevant parts).
>
> ...
> ...
> Caused by: org.hibernate.exception.GenericJDBCException: could not execute
> query
> at
> org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
> at
> org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
> at
> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
> at org.hibernate.loader.Loader.doList(Loader.java:2545)
> at
> org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
> at org.hibernate.loader.Loader.list(Loader.java:2271)
> at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459)
> at
> org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365)
> at
> org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
> at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
> at
> org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.selectList(AbstractHibernatePersistenceService.java:606)
> ... 34 more
> Caused by: java.sql.SQLException: error enlisting a JdbcConnectionHandle
> of a JdbcPooledConnection from datasource jdbc/bonitaDSXA in state
> ACCESSIBLE with usage count 1 wrapping
> org(dot)postgresql(dot)xa(dot)PGXAConnection(at)12fd60c0 on Pooled connection wrapping
> physical connection org(dot)postgresql(dot)jdbc4(dot)Jdbc4Connection(at)38dae6fd
> at
> bitronix.tm.resource.jdbc.JdbcConnectionHandle.enlistResource(JdbcConnectionHandle.java:87)
> at
> bitronix.tm.resource.jdbc.JdbcConnectionHandle.prepareStatement(JdbcConnectionHandle.java:242)
> at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:622)
> at
> bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
> at com.sun.proxy.$Proxy18.prepareStatement(Unknown Source)
> at
> org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
> at
> org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
> at
> org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
> at
> org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1700)
> at org.hibernate.loader.Loader.doQuery(Loader.java:801)
> at
> org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
> at org.hibernate.loader.Loader.doList(Loader.java:2542)
> ... 42 more
> Caused by: bitronix.tm.internal.BitronixSystemException: transaction timed
> out
> at
> bitronix.tm.resource.common.TransactionContextHelper.enlistInCurrentTransaction(TransactionContextHelper.java:63)
> at
> bitronix.tm.resource.jdbc.JdbcConnectionHandle.enlistResource(JdbcConnectionHandle.java:85)
> ... 55 more
>
>
>
> I've looked into the jdbc list (http://jdbc.postgresql.org/download.html)
> According to this list i should have picked the 9.1-903 JDBC 3
> <http://jdbc.postgresql.org/download/postgresql-9.1-903.jdbc3.jar>, since
> i'm using 9.1.* postgres version and the JDBC4 driver is not fully
> implemented according to
> (quoting)
>
> - *JDK 1.6 - JDBC4. Support for JDBC4 methods is not complete, but the
> majority of methods are implemented.*
>
>
> I'm just asking to see whether is is worth the fuss of switching to 9.1-903
> JDBC 3 <http://jdbc.postgresql.org/download/postgresql-9.1-903.jdbc3.jar>
> and see if there is any chance this problem is solved with another driver.
>
>
> Anyway, thanks for your help
>
>
>
>
>
> On Thu, Jul 3, 2014 at 3:03 PM, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:
>
>> Can you elaborate as to your problems. That driver should work fine
>> depending on what you are doing. Also it would be better to use the jdbc
>> list.
>>
>> Dave Cramer
>>
>> dave.cramer(at)credativ(dot)ca
>> http://www.credativ.ca
>>
>>
>> On 3 July 2014 06:25, Orestis Tsakiridis <otsakir(at)gmail(dot)com> wrote:
>>
>>> Hello,
>>>
>>> I'm running a postgresql server with version:
>>>
>>> # psql --version
>>> psql (PostgreSQL) 9.1.12
>>>
>>>
>>> What is the correct jdbc driver version for this server?
>>>
>>> I'm currently using postgresql-9.2-1002.jdbc4.jar and having some
>>> problems with it and was thinking that maybe i'm using
>>> the wrong driver.
>>>
>>> Also, if it makes any difference i'm using JDK 1.6
>>>
>>>
>>>
>>>
>>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Arup Rakshit | 2014-07-03 15:24:56 | Re: Not able to understand how to write group by |
Previous Message | Orestis Tsakiridis | 2014-07-03 13:26:13 | Re: postgresql server version & JDBC driver version |