Wildfly缺少依赖项

时间:2015-11-07 18:12:36

标签: java jpa wildfly

我正在将glassfish应用程序转换为wildfly,并且我遇到了依赖项问题。

错误是:

{"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"Dashboard-1.0-SNAPSHOT.war#dashboard\" is missing [jboss.naming.context.java.\"\\\"java:\".\"OracleDS\\\"\"]"]}

Persistance.xml:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="dashboard" transaction-type="JTA">
 <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>"java:/OracleDS"</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
  <property name="eclipselink.ddl-generation" value="create-tables"/>
  <property name="eclipselink.ddl-generation.output_mode" value="both"/>
  <property name="javax.persistence.schema-generation.database.action" value="create"/>
</properties>
</persistence-unit>
</persistence>

在上述错误中调用的独立xml部分:

 <datasource jta="true" jndi-name="java:/OracleDS" pool-name="Oracle" enabled="true" use-ccm="true">

模块XML与oracle相关:

<module xmlns="urn:jboss:module:1.1" name="com.oracle">
   <resources>
    <resource-root path="ojdbc6.jar"/>
   </resources>
 <dependencies>
   <module name="javax.api"/>
   <module name="javax.transaction.api"/>
 </dependencies>
 </module>

persistance.xml中的数据源和standalone.xml中的JNDI名称显然有些不正确,但我无法使其匹配。

1 个答案:

答案 0 :(得分:0)

检查是否有适用于Oracle数据源的JDBC驱动程序。