How to add PostgreSQL datasource to WildFly 9.0?

后端 未结 6 1502
刺人心
刺人心 2020-12-03 15:23

I\'ve tried tutorial at mastertheboss.com:

  1. ./jboss-cli.sh
  2. module add --name=org.postgres --resources=/tmp/postgresql-9.3-1101.jdbc4
6条回答
  •  盖世英雄少女心
    2020-12-03 15:55

    I've encountered the same error and behavior of WildFly 9. I'm a complete newbie to WF, but after some research I've found that the trouble is in the module naming. If I'm getting it well, the actual package names in the module are used to resolve the path to module.xml.
    I've changed the steps to those below and it worked:

    module add --name=org.postgresql --slot=main --resources=/usr/local/lib/postgresql-9.4-1201.jdbc4.jar --dependencies=javax.api,javax.transaction.api

    /subsystem=datasources/jdbc-driver=postgres:add(driver-name="postgres",driver-module-name="org.postgresql",driver-class-name=org.postgresql.Driver)
    

提交回复
热议问题