1 Reply Latest reply on Feb 8, 2016 1:09 PM by icarusdb

    wildfly 9.0.2 and postgresql 9.4 as module (fixed)

    icarusdb

      I have added, or at least tried, postgresql driver as a server module

       

      C:\dev\servers\wildfly\9.0.2.Final\modules\system\layers\base\org\postgresql\main\module.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <module xmlns="urn:jboss:module:1.1" name="org.postgres" >

          <resources>

              <resource-root path="postgresql-9.4.1207.jar" />

          </resources>

          <dependencies>

              <module name="javax.api" />

              <module name="javax.transaction.api" />

          </dependencies>

      </module>

       

      in standalone.xml

                      <datasource jndi-name="java:jboss/datasources/gradesDS" pool-name="gradesDS" enabled="true" use-java-context="true" >

                          <connection-url>jdbc:postgresql://localhost:5432/grades</connection-url>

                          <driver>postgresql</driver>

                          <security>

                              <user-name>grades</user-name>

                              <password>grades</password>

                          </security>

                      </datasource>

       

                      <drivers>

                          <driver name="postgresql" module="org.postgres">

                              <xa-datasource-class>org.postgresql.Driver</xa-datasource-class>

                          </driver>

                      </drivers>

       

      I started the server from eclipse ide ( jbosstools) and this is the full console result:

      13:02:48,075 INFO  [org.jboss.modules] (main) JBoss Modules version 1.4.3.Final

      13:02:48,608 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final

      13:02:48,729 INFO  [org.jboss.as] (MSC service thread 1-6) WFLYSRV0049: WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final) starting

      13:02:51,824 INFO  [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 3) WFLYCTL0028: Attribute 'job-repository-type' in the resource at address '/subsystem=batch' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.

      13:02:51,830 INFO  [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 26) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=ExampleDS' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.

      13:02:51,834 INFO  [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 26) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=gradesDS' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.

      13:02:51,985 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)

      13:02:52,063 INFO  [org.xnio] (MSC service thread 1-6) XNIO version 3.3.1.Final

      13:02:52,080 INFO  [org.xnio.nio] (MSC service thread 1-6) XNIO NIO Implementation Version 3.3.1.Final

      13:02:52,236 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 54) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique.

      13:02:52,236 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 53) WFLYSEC0002: Activating Security Subsystem

      13:02:52,270 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 37) WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors

      13:02:52,360 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 56) WFLYWS0002: Activating WebServices Extension

      13:02:52,423 INFO  [org.jboss.as.security] (MSC service thread 1-1) WFLYSEC0001: Current PicketBox version=4.9.2.Final

      13:02:52,464 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 46) WFLYNAM0001: Activating Naming Subsystem

      13:02:52,716 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 44) WFLYJSF0007: Activated the following JSF Implementations: [main]

      13:02:53,739 INFO  [org.jboss.as.connector] (MSC service thread 1-8) WFLYJCA0009: Starting JCA Subsystem (IronJacamar 1.2.5.Final)

      13:02:54,174 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0003: Undertow 1.2.9.Final starting

      13:02:54,174 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0003: Undertow 1.2.9.Final starting

      13:02:54,310 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 38) WFLYCLINF0001: Activating Infinispan subsystem.

      13:02:55,704 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 33) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

      13:02:55,742 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0018: Started Driver service with driver-name = h2

      13:02:55,743 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 33) WFLYCTL0013: Operation ("add") failed - address: ([

          ("subsystem" => "datasources"),

          ("jdbc-driver" => "postgresql")

      ]) - failure description: "WFLYJCA0041: Failed to load module for driver [org.postgres]"

      13:02:57,253 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0014: Creating file handler for path C:\dev\servers\wildfly\9.0.2.Final/welcome-content

      13:02:57,832 INFO  [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version 4.0.9.Final

      13:02:58,073 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0012: Started server default-server.

      13:02:58,850 INFO  [org.jboss.as.naming] (MSC service thread 1-3) WFLYNAM0003: Starting Naming Service

      13:02:58,853 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]

      13:02:59,294 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0018: Host default-host starting

      13:02:59,577 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0006: Undertow HTTP listener default listening on localhost/127.0.0.1:8080

      13:03:02,955 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]

      13:03:06,865 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-6) WFLYDS0013: Started FileSystemDeploymentService for directory C:\dev\servers\wildfly\9.0.2.Final\standalone\deployments

      13:03:08,609 INFO  [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBoss Web Services - Stack CXF Server 5.0.0.Final

      13:03:08,619 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([

          ("subsystem" => "datasources"),

          ("data-source" => "gradesDS")

      ]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [

          "jboss.data-source.java:jboss/datasources/gradesDS is missing [jboss.jdbc-driver.postgresql]",

          "jboss.driver-demander.java:jboss/datasources/gradesDS is missing [jboss.jdbc-driver.postgresql]"

      ]}

      13:03:08,626 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([

          ("subsystem" => "datasources"),

          ("data-source" => "gradesDS")

      ]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [

          "jboss.data-source.java:jboss/datasources/gradesDS is missing [jboss.jdbc-driver.postgresql]",

          "jboss.driver-demander.java:jboss/datasources/gradesDS is missing [jboss.jdbc-driver.postgresql]",

          "jboss.data-source.java:jboss/datasources/gradesDS is missing [jboss.jdbc-driver.postgresql]"

      ]}

      13:03:08,823 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report

      WFLYCTL0184:    New missing/unsatisfied dependencies:

            service jboss.jdbc-driver.postgresql (missing) dependents: [service jboss.data-source.java:jboss/datasources/gradesDS, service jboss.driver-demander.java:jboss/datasources/gradesDS]

       

       

      13:03:09,277 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management

      13:03:09,278 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990

      13:03:09,278 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final) started (with errors) in 21908ms - Started 204 of 384 services (4 services failed or missing dependencies, 210 services are lazy, passive or on-demand)

       

      Windows 10

      jdk1.8.0_72

      Eclipse Mars + JBossTools

      wildfly 9.0.2

      postgresql 9.2

        • 1. Re: wildfly 9.0.2 and postgresql 9.4 as module
          icarusdb

          ok I found my mistake

          the keyword org.postgres should be org.postgresql

           

          in standalone should be

                              <driver name="postgresql" module="org.postgresql">

                                  <xa-datasource-class>org.postgresql.Driver</xa-datasource-class>

                              </driver>

          and in module as well...

          <module xmlns="urn:jboss:module:1.1" name="org.postgresql" >

              <resources>