4 Replies Latest reply on Feb 7, 2011 7:40 AM by Gert Vanthienen

    Configure failover using JDBC lock with postgres

    Florian Florian Newbie

      Hi,

       

      I got a question regaring the configuration of failover using JDBC locking mechanism with PostgreSQL.

       

      Unlikely there seems to be a problem acquiring the lock.

       

      The following errormessage is shown in the logfile:

       

      """

      WARNING: Failed to acquire database lock: org.postgresql.util.PSQLException: Method org.postgresql.jdbc4.Jdbc4PreparedStatement.setQueryTimeout(int) is not yet implemented.

      17:51:33,232 | WARN  | Thread-2         | DefaultJDBCLock                  | pache.karaf.main.DefaultJDBCLock  164 |  -  -  | Failed to acquire database lock: org.postgresql.util.PSQLException: Method org.postgresql.jdbc4.Jdbc4PreparedStatement.setQueryTimeout(int) is not yet implemented.

      """

       

      I got the following setup:

       

      • apache-servicemix-4.3.0-fuse-03-00

      • com.springsource.org.postgresql.jdbc4-8.3.604.jar

       

      Postgres version used: "PostgreSQL 8.3.11"

       

      I put the following lines to the "system.properties" file:

       

      """

      karaf.lock=true

      karaf.lock.class=org.apache.karaf.main.DefaultJDBCLock

      karaf.lock.level=50

      karaf.lock.delay=10

      karaf.lock.jdbc.url=jdbc:postgresql://weblin01.int/serviceMix

      karaf.lock.jdbc.driver=org.postgresql.Driver

      karaf.lock.jdbc.user=user

      karaf.lock.jdbc.password=password

      karaf.lock.jdbc.table=KARAF_LOCK

      karaf.lock.jdbc.clustername=karaf

      karaf.lock.jdbc.timeout=30

      """

       

      Maybe some of you got an idea what do to to solve the problem!?

       

      Best,

      Florian