You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by SergueiM <ev...@idirect.com> on 2012/06/10 07:35:30 UTC

jdbc Master fails: AMQ v.5.6, Postgres v.9.1, Ubuntu

Hi,

jdbc Master fails to run with AMQ v.5.6, Postgres 9.1 on Ubuntu.
Can run it with AMQ v.5.4.2 (same settings).

Getting:
... ERROR | Failed to update database lock: java.sql.SQLException: Method
org.postgresql.jdbc3g.Jdbc3gPreparedStatement.setQueryTimeout(int) is not
yet implemented. | org.apache.activemq.store.jdbc.DefaultDatabaseLocker |
ActiveMQ Cleanup Timer
java.sql.SQLException: Method
org.postgresql.jdbc3g.Jdbc3gPreparedStatement.setQueryTimeout(int) is not
yet implemented.
	at org.postgresql.Driver.notImplemented(Driver.java:751)
...

Similar log message with Jdbc4 driver.

Postgres v.9.1 is on Ubuntu 12.04 64bit host.
AMQ is on Ubuntu 10.04 64bit host.
Both hosts have Sun JDK v.1.6.

Fails with Postgres 9.0 as well.

Fails with:
- postgresql-9.1-902.jdbc4.jar
- postgresql-9.1-902.jdbc3.jar
- postgresql-9.1-901.jdbc4.jar
jdbc drivers as long as it is AMQ v.5.6.

Downgrading to AMQ v.5.4.2 removes the issue.
I believe it runs with AMQ v.5.5.0 as well (just don't have the logs handy).

Any ideas/comments?

Thank you.
-
Serguei


--
View this message in context: http://activemq.2283324.n4.nabble.com/jdbc-Master-fails-AMQ-v-5-6-Postgres-v-9-1-Ubuntu-tp4653140.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

About the secession method

Posted by Nishizawa Kenji <Ni...@exc.epson.co.jp>.
Mail was transmitted. 
However, mail is sent. 

 To remove your address from the list, send a message to:
   <us...@activemq.apache.org>

Re: jdbc Master fails: AMQ v.5.6, Postgres v.9.1, Ubuntu

Posted by Gary Tully <ga...@gmail.com>.
the correct impl should be picked up based on the type of the
underlying datasource. There is a mapper properties file that provides
overrides. ms sql server is the only driver that currently uses the
transact locker:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/lock/microsoft_sql_server_2005_jdbc_driver?view=markup

In the absence of doc, the best place to see what an individual config
option does it to check the source[1] One would only use the adapter
element if you want to explicitly provide the implementation, as in
the auto mapping is not correct.

Please open jira issues to trigger a doc enhancement so that the
experience is better for the next user.

[1] http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/


On 11 June 2012 06:58, SergueiM <ev...@idirect.com> wrote:
> metatech, thank you.
>
> The config piece that actually worked:
> <jdbcPersistenceAdapter ... >
>        <databaseLocker>
>                <database-locker queryTimeout="-1" />
>        </databaseLocker>
> </jdbcPersistenceAdapter>
>
> Folks,
> where one could read about those many options as in activemq-core.xsd?
> I could not find answers in AMQ docs, nor in Fuse docs, nor in the "ActiveMQ
> in Action" book.
>
> For example, in my context of jdbc Master/Slave:
> - when do I use database-locker as opposed to transact-database-locker?
> - disabling the setQueryTimeout (as in the above setting) affects/results in
> what?
> - what the "adapter" child element to jdbcPersistenceAdapter is for?
>
> Thank you.
>
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/jdbc-Master-fails-AMQ-v-5-6-Postgres-v-9-1-Ubuntu-tp4653140p4653146.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
http://fusesource.com
http://blog.garytully.com

Re: jdbc Master fails: AMQ v.5.6, Postgres v.9.1, Ubuntu

Posted by SergueiM <ev...@idirect.com>.
metatech, thank you.

The config piece that actually worked:
<jdbcPersistenceAdapter ... >
	<databaseLocker>
		<database-locker queryTimeout="-1" />
	</databaseLocker>
</jdbcPersistenceAdapter>

Folks, 
where one could read about those many options as in activemq-core.xsd?
I could not find answers in AMQ docs, nor in Fuse docs, nor in the "ActiveMQ
in Action" book.

For example, in my context of jdbc Master/Slave:
- when do I use database-locker as opposed to transact-database-locker? 
- disabling the setQueryTimeout (as in the above setting) affects/results in
what?
- what the "adapter" child element to jdbcPersistenceAdapter is for?

Thank you.


 



--
View this message in context: http://activemq.2283324.n4.nabble.com/jdbc-Master-fails-AMQ-v-5-6-Postgres-v-9-1-Ubuntu-tp4653140p4653146.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: jdbc Master fails: AMQ v.5.6, Postgres v.9.1, Ubuntu

Posted by metatech <me...@gmail.com>.
SergueiM wrote
> 
> org.postgresql.jdbc3g.Jdbc3gPreparedStatement.setQueryTimeout(int) is not
> yet implemented. | 

For JDBC drivers should do not implement the setQueryTimeout, the following
configuration will disable the feature :

<jdbcPersistenceAdapter>
<databaseLocker queryTimeout="-1"/>
</jdbcPersistenceAdapter>

Regards,

metatech

--
View this message in context: http://activemq.2283324.n4.nabble.com/jdbc-Master-fails-AMQ-v-5-6-Postgres-v-9-1-Ubuntu-tp4653140p4653143.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.