Olá pessoal,
estou com problema ao tentar montar meus modelos usando o EJB 3.1 no jboos6.0, quem puder me ajudar agradeço.
Meu projeto EJB de nome DA_Core.jar está sendo contruido:
META-INF
-------persistence.xml
-------MANIFEST.MF
modelo e ejbs
log4j.properties
Meu arquivo persistence.xml:
[code]<?xml version=“1.0” encoding=“UTF-8”?>
<persistence version="1.0"
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”>
<persistence-unit name=“JPA” transaction-type=“RESOURCE_LOCAL”>
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<!-- quem vai fornecer a implementacao da JPA - no caso, o Hibernate -->
<properties>
<property name="hibernate.archive.autodetection" value="class, hbm" />
<!-- opcional - estrategia de geracao das tabelas -->
<property name="hibernate.hbm2ddl.auto" value="update" />
<!-- driver JDBC utilizado para conectar no banco banco -->
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/teste" />
<property name="hibernate.connection.username" value="root" />
<property name="hibernate.connection.password" value="123" />
<!-- variacao de SQL utilizada pelo banco -->
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
<!-- mostra as consultas enviadas para o banco -->
<property name="hibernate.show_sql " value="true" />
<!-- formata as consultas mostradas -->
<property name="hibernate.format_sql" value="true" />
</properties>
</persistence-unit>
</persistence>
[/code]
meu projeto está sendo construído por um build.xml e é deployado para a pasta do jboss6.0. Mas ao tentar subir o projeto, o jboss lança um o seguinte erro:
ERROR [AbstractKernelController] Error installing to Parse: name=vfs:/jboss-6.0/server/default/deploy/DA_Core.jar state=PreParse mode=Manual requiredState=Parse: org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfs:///infra/jboss-6.0/server/default/deploy/DA_Core.jar
…
Caused by: org.xml.sax.SAXException: Content is not allowed in prolog. @ vfs:///jboss-6.0/server/default/deploy/DA_Core.jar/META-INF/persistence.xml[1,1]
…
ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS IN ERROR:
Deployment “/jboss-6.0/server/default/deploy/DA_Core.jar” is in error due to the following reason(s): org.xml.sax.SAXException:
Content is not allowed in prolog. @ /infra/jboss-6.0/server/default/deploy/DA_Core.jar/META-INF/persistence.xml[1,1]