本文介绍了如何在Jboss 7中部署jboss seam 2.1.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以现在我使用jboss- seam使用seam-gen制作sampleDemo项目 2.1.2,并部署在jboss 7中

so now i am make sampleDemo project using seam-gen using jboss- seam 2.1.2 and deplyed in jboss 7

最后我在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.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

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>

获取错误是

12:08:10,919 INFO [org.jboss.as.server.deployment](MSC服务 线程1-4)JBA S015876:开始部署"login.page.xml" 12:08:11,075 INFO [org.jboss.as](MSC服务线程1-4)JBAS015951: 管理员控制台监听12:08:11,080错误 [org.jboss.as](MSC服务线程1-4)JBAS015875:JBoss AS 7.1.1.最终"Brontes"在4401毫秒内启动(有错误)-在229个服务中启动了150个(2个服务失败或缺少依赖项,76个服务 是被动还是按需提供)12:08:11,210 INFO [org.jboss.as.server] (DeploymentScanner-threads-2)JBAS018 559:部署了"login.page.xml"

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接缝项目login.page.xml位于/view/login.page.xml

IN seam project login.page.xml is located in /view/login.page.xml

推荐答案

module ="com.oracle.db"看起来不对.这是来自JBOSS_HOME/modules/的相同路径,您可能拥有的是JBOSS_HOME/modules/oracle/jdbc/main.如果是这种情况,模块应该是oracle.jdbc.

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.

这篇关于如何在Jboss 7中部署jboss seam 2.1.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 20:07