[英]JBoss7 + PostgreSQL New missing/unsatisfied dependencies
我正在將項目從JBoss3遷移到JBoss7。 我剛開始並重新配置了我的standalone.xml,module.xml和persistence.xml。
在JBoss modules文件夾中,我創建了org / postgres / main目錄。 在這個目錄中,我得到了新的Postgres JDBC41驅動程序和我的module.xml。
這就是我得到的,如果我想啟動JBoss:
14:42:53,697 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.postgresql (missing) dependents: [service jboss.data-source.java:jboss/datasources/RESyDS]
14:42:53,725 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
14:42:53,726 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 3800ms - Started 155 of 234 services (2 services failed or missing dependencies, 76 services are passive or on-demand)
這是我在/ modules / org / postgresql / main中的module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" xmlns="urn:jboss:domain:datasources:1.0" name="org.postgresql">
<resources>
<resource-root path="postgresql-9.3-1101.jdbc41.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
standalone.xml數據源 - 部分:
<datasources>
<datasource jta="true" jndi-name="java:jboss/datasources/RESyDS" pool-name="RESyDS" enabled="true" use-java-context="true">
<connection-url>jdbc:postgresql://192.168.28.123:5432/dgap</connection-url>
<driver>postgresql</driver>
<driver-class>org.postgresql.Driver</driver-class>
<security>
<user-name>resy</user-name>
<password>resy</password>
</security>
</datasource>
<drivers>
<driver name="postgresql" module="org.postgresql">
<driver-class>org.postgresql.Driver</driver-class>
</driver>
</drivers>
</datasources>
persistence.xml中
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="em">
<jta-data-source>java:jboss/datasources/RESyDS</jta-data-source>
<properties>
<property name="hibernate.archive.autodetection" value="class" />
</properties>
</persistence-unit>
</persistence>
我不知道,如何解決問題。 已經嘗試部署驅動程序文件,但它不會改變任何東西。
我檢查了所有文件名,問我的同事,我覺得像檢查整個互聯網這個問題。 沒有人知道這個提示。
我希望有人能幫幫忙 ;)
干杯
我有完全相同的問題,這是上述評論的解決方案:
不要在<datasource>
節點中包含<driver-class>
。 這只屬於<driver>
聲明。 這解決了上述錯誤
不要在modules / org / postgresql / main / module.xml中使用xmlns="urn:jboss:domain:datasources:1.0"
。 這修復了第一個問題修復后出現的另一個錯誤。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.