Feras,
estou configurando um projeto para usar JPA, fiz todas as configurações necessárias porém quando “chamo” a pagina inicial do projeto da o erro HTTP Status 404 - que ele não achou meu projeto, quando inicio o Jboss o log esta conforme abaixo, estou usando Jboss 7
WARNING: -logmodule is deprecated. Please use the system property 'java.util.logging.manager' or the 'java.util.logging.LogManager' service loader.
12:01:08,333 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
12:01:08,634 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
12:01:08,743 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
12:01:10,569 INFO [org.xnio] XNIO Version 3.0.3.GA
12:01:10,569 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
12:01:10,584 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
12:01:10,615 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
12:01:10,647 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
12:01:11,367 INFO [org.jboss.as.security] (MSC service thread 1-3) JBAS013100: Current PicketBox version=4.0.7.Final
12:01:11,445 INFO [org.jboss.as.naming] (MSC service thread 1-3) JBAS011802: Starting Naming Service
12:01:11,539 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-3) JBoss Web Services - Stack CXF Server 4.0.2.GA
12:01:11,555 INFO [org.jboss.as.connector] (MSC service thread 1-3) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
12:01:11,570 INFO [org.jboss.as.mail.extension] (MSC service thread 1-3) JBAS015400: Bound mail session [java:jboss/mail/Default]
12:01:12,069 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) JBAS015012: Started FileSystemDeploymentService for directory C:\jboss-as-7.1.1.Final\standalone\deployments
12:01:12,225 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015014: Re-attempting failed deployment mysql-connector-java-5.1.7-bin.jar
12:01:12,275 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found portalEmail.war in deployment directory. To trigger deployment create a file called portalEmail.war.dodeploy
12:01:45,357 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080
12:01:45,615 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:4447
12:01:45,709 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [java:/catalina]
12:02:08,172 INFO [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on /127.0.0.1:9999
12:02:08,305 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "mysql-connector-java-5.1.7-bin.jar"
12:02:08,320 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "portalEmail.war"
12:02:08,617 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
12:02:12,330 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment.
12:02:12,330 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment.
12:02:12,362 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "portalEmail.war" was rolled back with failure message Operation cancelled
12:02:12,362 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015871: Deploy of deployment "mysql-connector-java-5.1.7-bin.jar" was rolled back with no failure message
12:02:12,377 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment mysql-connector-java-5.1.7-bin.jar in 18ms
12:02:15,794 INFO [org.jboss.as.jpa] (MSC service thread 1-1) JBAS011401: Read persistence.xml for portalEmail
12:02:16,021 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment portalEmail.war in 3657ms
segue abaixo as configurações
Persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<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 http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="portalEmail" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/catalinaDS</jta-data-source>
<properties>
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="false" />
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
</properties>
</persistence-unit>
</persistence>
no Jboss alterei o arquivo standalone.xml conforme abaixo
<datasources>
<datasource jta="true" jndi-name="java:/catalina" pool-name="my_pool" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/catalina</connection-url>
<driver>mysql</driver>
<security>
<user-name>root</user-name>
<password>123</password>
</security>
<statement>
<prepared-statement-cache-size>100</prepared-statement-cache-size>
<share-prepared-statements>true</share-prepared-statements>
</statement>
</datasource>
<drivers>
<driver name="mysql" module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
e no diretório do Jboss “jboss-as-7.1.1.Final\modules\com\mysql\main” adicionei o jar para conectar no banco do Mysql e mais o arquivo module.xml
conteudo do arquivo module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="com.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.7-bin.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>