JBoss 7上的JDBC Postgresql驱动程序 [英] JDBC Postgresql driver on JBoss 7
本文介绍了JBoss 7上的JDBC Postgresql驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
根据如何将Jboss-as-7.1.1与Postgresql连接。
- 路径$ JBOSS_HOME / modules / org / postgresql / main
-
在$ JBOSS_HOME / modules / org / postgresql / main / modules.xml
- Created the path $JBOSS_HOME/modules/org/postgresql/main
In $JBOSS_HOME/modules/org/postgresql/main/modules.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="org.postgresql">
<resources>
<resource-root path="postgresql-9.2-1002.jdbc4.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
<module name="javax.servlet.api" optional="true"/>
</dependencies>
</module>
在同一目录中放置postgresql-9.2-1002.jdbc4.jar
Into the same directory placed postgresql-9.2-1002.jdbc4.jar
通过运行$ JBOSS_HOME / bin / jboss-cli --connect并运行以下命令来打开jboss-cli:
Opened jboss-cli by running $JBOSS_HOME/bin/jboss-cli --connect and ran the command:
/subsystem=datasources/jdbc-driver=postgresql-driver:add(driver-name=postgresql-driver, driver-class-name=org.postgresql.Driver, driver-module-name=org.postgresql)
在得到这个之后错误:
Failed to get the list of the operation properties: "JBAS010850: No
handler for operation read-operation-description at address [
("subsystem" => "datasources"),
("jdbc-driver" => "postgresql-driver") ]"
推荐答案
尝试定义要在其中添加驱动程序的配置文件。此命令在完整的配置文件中添加新的驱动程序:
Try to define profile where you want to append a driver. This command appends a new driver in the full profile:
/profile=full/subsystem=datasources/jdbc-driver=postgresql-driver:add(driver-name=postgresql-driver, driver-class-name=org.postgresql.Driver, driver-module-name=org.postgresql)
这篇关于JBoss 7上的JDBC Postgresql驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文