0

I want to go from a TomeEE server to WildFly. I have aplication that uses postgresql db.

According to different tutorials I 1) Deployed driver to the server 2) Registered it in data sources.

enter image description here

Connection test is successful.

When I try to start a project I get the following error:

09:18:45,442 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("data-source" => "PostgresDS")
]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.data-source.PostgresDS" => "WFLYJCA0033: Error during the deployment of PostgresDS
    Caused by: org.jboss.jca.deployers.common.DeployException: WFLYJCA0030: unable to deploy
    Caused by: org.jboss.as.controller.OperationFailedException: WFLYJCA0117: org.postgresql.Driver is not a valid javax.sql.DataSource implementation [ \"WFLYJCA0117: org.postgresql.Driver is not a valid javax.sql.DataSource implementation\" ]"}}
09:18:45,443 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("data-source" => "PostgresDS")

But everything work correctly! What causes this error and can I remove it?

P.S. I have a dependency im pom.xml:

        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.2.5</version>
        </dependency>

My persistence.xml:

<persistence-unit name="PersistenceUnitJTA" transaction-type="JTA">
        <jta-data-source>java:jboss/PostgresDS</jta-data-source>
        <properties>
            ...
        </properties>
</persistence-unit>
Anton Sorokin
  • 494
  • 6
  • 23

1 Answers1

2

As documented in the manual the class for the DataSource implementation provided by the Postgres JDBC driver is: org.postgresql.ds.PGConnectionPoolDataSource

You need to configure that classname for the in the "Datasource Class" property.