如何在Jboss 7中部署jboss seam 2.1.2

时间:2012-10-11 09:44:26

标签: java jboss seam jboss7.x seam2

  

现在我正在使用Jboss-seam 2.1.2,jsf 2.0,richfaces和jpa   我使用jboss-as 4.2.2现在我想迁移jboss-as-7.1.1.Final。

     

所以现在我使用jboss-seam使用seam-gen进行sampleDemo项目   2.1.2并在jboss 7中深化

     

最后我在jboss 7中遇到了一个不允许的问题

  <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是

  

聆听/127.0.0.1:9999 12:08:10,257 INFO   [org.jboss.as.remoting](MSC服务线程1-2)JBAS017100:听力   on /127.0.0.1:4447 12:08:10,381 INFO   [org.apache.coyote.http11.Http11Protocol](MSC服务线程1-2)   启动Coyote HTTP / 1.1 12:08:10,690 INFO   [org.jboss.as.controller](控制器启动线程)JBAS014774:   服务状态报告JBAS014775:新缺失/未满足   依赖关系:         service jboss.jdbc-driver.oracle(missing)dependents:[service jboss.data   -source.java:/sampleDemoDatasource]

     

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:   Admin con sole listen 12:08:11,080 ERROR   [org.jboss.as](MSC服务主题1-4)JBAS015875:JBoss AS   7.1.1.Final“Brontes”在4401ms开始(有错误) - 启动了229个服务中的150个(2个服务失败或缺少依赖,76个服务   被动或按照命令)12:08:11,210 INFO [org.jboss.as.server]   (DeploymentScanner-threads - 2)JBAS018 559:已部署“login.page.xml”

     

IN seam项目login.page.xml位于/view/login.page.xml

1 个答案:

答案 0 :(得分:1)

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