问题
Now I am using Jboss-seam 2.1.2 ,jsf 2.0 ,richfaces and jpa till now i am used jboss-as 4.2.2 now I want to migrate jboss-as-7.1.1.Final.
so now i am make sampleDemo project using seam-gen using jboss- seam 2.1.2 and deplyed in jboss 7
finally I got one issue in jboss 7 its not allow
<jta-data-source>sampleDemoDatasource</jta-data-source> its not allow in jboss7 changed to
persistence.xml
<persistence 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>
<persistence-unit name="sampleDemo" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/sampleDemoDatasource</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.default_schema" value="-"/>
<!-- Only relevant if Seam is loading the persistence unit (Java SE bootstrap) -->
<property name="hibernate.transaction.manager_lookup_class" value="@transactionManagerLookupClass@"/>
</properties>
</persistence-unit>
</persistence>
standalone.xml
<subsystem xmlns="urn:jboss:domain:datasources:1.0"> <datasources> <datasource jta="true" jndi-name="java:/sampleDemoDatasource" pool-name="sampleDemoDatasource" enabled="true" use-java-context="true" use-ccm="true"> <connection-url>jdbc:oracle:thin:@localhost:1521:mobee</connection-url> <driver>oracle</driver> <security> <user-name>manam</user-name> <password>manam</password> </security> </datasource> <drivers> <driver name="oracle" module="com.oracle.db"> <xa-datasource-class>oracle.jdbc.driver.OracleDriver</xa-datasource-class> </driver> </drivers> </datasources> </subsystem>
gettting ERROR is
Listening on /127.0.0.1:9999 12:08:10,257 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:4447 12:08:10,381 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Starting Coyote HTTP/1.1 12:08:10,690 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774 : Service status report JBAS014775: New missing/unsatisfied dependencies: service jboss.jdbc-driver.oracle (missing) dependents: [service jboss.data -source.java:/sampleDemoDatasource]
12:08:10,919 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBA S015876: Starting deployment of "login.page.xml" 12:08:11,075 INFO [org.jboss.as] (MSC service thread 1-4) JBAS015951: Admin con sole listening 12:08:11,080 ERROR [org.jboss.as] (MSC service thread 1-4) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 4401ms - Started 150 of 229 servi ces (2 services failed or missing dependencies, 76 services are passive or on-de mand) 12:08:11,210 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018 559: Deployed "login.page.xml"
IN seam project login.page.xml is located in /view/login.page.xml
回答1:
module="com.oracle.db" looks wrong. This is same path from JBOSS_HOME/modules/ What you might be having there is JBOSS_HOME/modules/oracle/jdbc/main. if this is the case module should be oracle.jdbc.
来源:https://stackoverflow.com/questions/12836688/how-to-deployee-jboss-seam-2-1-2-in-jboss-7