0

I've tried to add Postgres as datasource in Wildfly but keep on getting the JDBC connection error as follow :

Failed to create JDBC connection.

An internal error occurred. Details Unexpected HTTP response: 500

Request { "name" => "PostgresDS", "enabled" => true, "jndi-name" => "java:/PostgresDS", "user-name" => "admin", "password" => "123", "pool-name" => "PostgresDS_Pool", "use-ccm" => false, "jta" => false, "connection-url" => "jdbc:postgresql://localhost:5432/postgresdb", "driver-class" => "org.postgresql.Driver", "driver-name" => "postgresql-9.4.1208.jar", "valid-connection-checker-class-name" => "org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker", "background-validation" => true, "exception-sorter-class-name" => "org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter", "operation" => "add", "address" => [ ("subsystem" => "datasources"), ("data-source" => "PostgresDS") ] }

Response

Internal Server Error { "outcome" => "failed", "failure-description" => "WFLYCTL0212: Duplicate resource [ (\"subsystem\" => \"datasources\"), (\"data-source\" => \"PostgresDS\") ]", "rolled-back" => true }

3
  • When does this error occur? It looks like something is trying to add the datasource twice. Oct 17, 2016 at 22:22
  • Hi @JamesR.Perkins. Its happen when I tried to add a new Datasource. Weird because I just set up my Wildfly (fresh installation) and never register any datasource before. My steps : Configuration > Subsystems > Datasources > Non-XA > Add. Did I miss anything here?
    – shkhssn
    Oct 18, 2016 at 2:58
  • It looks like then you're trying to add a data source that already exists. Try using a different name or modify the existing one. Oct 18, 2016 at 16:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.