Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JBoss logs Postgres driver is "non-JDBC-compliant"

I wired my JBoss server into a new Postgres database.

In standalone.xml:

<driver name="postgresql" module="com.postgresql.pgjdbc">
    <driver-class>org.postgresql.Driver</driver-class>
</driver>

In module.xml:

<module xmlns="urn:jboss:module:1.1" name="com.postgresql.pgjdbc">
    <resources>
        <resource-root path="postgresql-9.3-1102.jdbc41.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
    </dependencies>
</module>

When starting JBoss, I get the following log entry:

10:49:57,206 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 25) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.3)

The driver does seem to connect and work. What are the effects of this non-compliance?

like image 977
amphibient Avatar asked Nov 24 '14 15:11

amphibient


People also ask

Does Postgres have JDBC driver?

PostgreSQL provides a type 4 JDBC driver. Type 4 indicates that the driver is written in Pure Java, and communicates in the database system's own network protocol. Because of this, the driver is platform independent; once compiled, the driver can be used on any system.

Where is Postgres JDBC driver?

The PostgreSQL JDBC driver is available in the Maven central repository.


1 Answers

According this JBoss forum entry none: Why is my JDBC4-compliant driver loaded as "non-JDBC-compliant"?

Because org.postgresql.Driver#jdbcCompliant() returns false. So you can ignore that for now, and I'm sure that the PostgreSQL JDBC people would like code contributions

And source code:

 /**
* Report whether the driver is a genuine JDBC compliant driver. A
* driver may only report "true" here if it passes the JDBC compliance
* tests, otherwise it is required to return false. JDBC compliance
* requires full support for the JDBC API and full support for SQL 92
* Entry Level.
*
* <p>For PostgreSQL, this is not yet possible, as we are not SQL92
* compliant (yet).
*/
public boolean jdbcCompliant()
{
    return false;
}

https://github.com/pgjdbc/pgjdbc/blob/REL9_3_1102/org/postgresql/Driver.java.in

This is part of the TODO List http://jdbc.postgresql.org/development/todo.html#Compliance

like image 143
Federico Sierra Avatar answered Sep 26 '22 07:09

Federico Sierra