You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/10/19 04:16:00 UTC

[jira] [Commented] (AMQ-6780) New Postgres JDBC-Driver not recognized

    [ https://issues.apache.org/jira/browse/AMQ-6780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16656255#comment-16656255 ] 

ASF GitHub Bot commented on AMQ-6780:
-------------------------------------

GitHub user jbonofre opened a pull request:

    https://github.com/apache/activemq/pull/311

    [AMQ-6780] Add PostgreSQL version JDBC driver name in jdbc store services

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jbonofre/activemq AMQ-6780

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq/pull/311.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #311
    
----
commit 46f8deeb67623e095622debac18f53d736cb3bcc
Author: Jean-Baptiste Onofré <jb...@...>
Date:   2018-10-19T04:11:14Z

    [AMQ-6780] Add PostgreSQL version JDBC driver name in jdbc store services

----


> New Postgres JDBC-Driver not recognized
> ---------------------------------------
>
>                 Key: AMQ-6780
>                 URL: https://issues.apache.org/jira/browse/AMQ-6780
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 5.15.0
>            Reporter: Ch.Krauss
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>              Labels: postgresql
>             Fix For: 5.16.0, 5.15.7
>
>         Attachments: postgresql_jdbc_driver
>
>
> After our switch of the postgres-jdbc-driver from version 9.4-1201 to 42.1.3 the JDBCPersistenceAdapter does not recognize postgres any more. 
> The log:
> {code:title=new driver}
> 2017-07-31 19:35:52,733 [INFO ] 259-949-060 [JDBCPersistenceAdapter : loadAdapter] - Database adapter driver override not found for : [postgresql_jdbc_driver].  Will use default implementation.
> 2017-07-31 19:35:52,765 [WARN ] 259-949-060 [DefaultJDBCAdapter : executeStatement] - Could not create JDBC tables; they could already exist. Failure was: CREATE TABLE ACTIVEMQ_MSGS(ID BIGINT NOT NULL, CONTAINER VARCHAR(250) NOT NULL, MSGID_PROD VARCHAR(250), MSGID_SEQ BIGINT, EXPIRATION BIGINT, MSG BLOB, PRIMARY KEY ( ID ) ) Message: ERROR: type "blob" does not exist
>   Position: 147 SQLState: 42704 Vendor code: 0
> {code}
> {code:title=old driver}
> 2017-07-31 19:37:21,021 [INFO ] 11b-e48-c83 [JDBCPersistenceAdapter : loadAdapter] - Database adapter driver override recognized for : [postgresql_native_driver] - adapter: class org.apache.activemq.store.jdbc.adapter.PostgresqlJDBCAdapter
> {code}
> The cause is the change of the name from "postgres_native_driver" to "postgres_jdbc_driver" (getDriverName() now returns "PostgreSQL JDBC Driver"). The PostgresqlJDBCAdapter uses the name to find the class. 
> Our workaround is to add a file "postgres_jdbc_driver" to "META-INF/services/org/apache/activemq/store/jdbc" in the "activemq-jdbc-store-5.15.0.jar".



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)