Jdbc wildfly-安装postgres驱动程序jar
我在安装postgres驱动程序时遇到困难。我试过很多方法:Jdbc wildfly-安装postgres驱动程序jar,jdbc,wildfly,wildfly-10,Jdbc,Wildfly,Wildfly 10,我在安装postgres驱动程序时遇到困难。我试过很多方法: a。尝试“部署”JAR(从CLI和管理控制台UI) a。已尝试将模块定义放入modules/org/postgresql b。尝试将模块定义放在modules/system/layers/base/org/postgresql中 以及: org.h2.jdbcx.JdbcDataSource org.postgresql.Driver org.postgresql.xa.PGXADataSource 在所有这些之后,我得到
以及:
org.h2.jdbcx.JdbcDataSource
org.postgresql.Driver
org.postgresql.xa.PGXADataSource
在所有这些之后,我得到了这个错误。所以,我认为wildfly可以“看到”模块,但有些地方不对劲
23:24:15889错误[org.jboss.as.controller.management operation](ServerService线程池--33)WFLYCTL0013:操作(“添加”)失败-地址:([
(“子系统”=>“数据源”),
(“jdbc驱动程序”=>“postgresql”)
])-故障描述:“WFLYJCA0041:未能加载驱动程序[org.postgresql]的模块”
原来我在standalone.xml中使用了“org.postgres”作为模块名,而不是在module.xml中声明的“org.postgresql”简短回答:将驱动程序放在/wildfly/standalone/deployments
文件夹中,它将自动部署驱动程序我也遇到了这个错误,这是由于module.xml没有正确的资源根请检查您的日志,据我所知,应该有更详细的信息(例如异常堆栈跟踪)关于模块加载失败的原因。注意org.postgresql.Driver
的可能重复项是错误的:org.postgresql.Driver
不是javax.sql.DataSource
;看看复本。我希望能把它修好,这是有道理的,但我得到了同样的东西。我又一次试着把车开走了,但没有成功。它的设置与工作的H2驱动程序相同……您是否将JAR和module.xml
放在modules/org/postgresql
或modules/org/postgresql/main
中?它应该在main
目录中。与Wildfly 21和Postgres JDBC驱动程序42.x配合使用,效果非常好。