Bonjour,

Je travaille sur un projet Java Enterprise Project sous Eclipse et j'utilise JBoss Server et Postgresql 9.0.

J'ai un problème quand je déploie mon application et d'après ce que j'ai compris j'ai un problème dans le fichier postgres-ds.xml
Voici la sortie de la console :
13:57:06,184 ERROR [AbstractKernelController] Error installing to Parse: name=vfsfile:/C:/Users/LikeNoOther/Downloads/jboss-5.0.1.GA/jboss-5.0.1.GA/server/default/deploy/postgres-ds.xml state=Not Installed mode=Manual requiredState=Parse
org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfsfile:/C:/Users/LikeNoOther/Downloads/jboss-5.0.1.GA/jboss-5.0.1.GA/server/default/deploy/postgres-ds.xml
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
Je dois aussi définir une non-jta-datasource mais je ne connais pas le jndi name :
java.lang.RuntimeException: Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a non-jta-data-source for a RESOURCE_LOCAL enabled persistence context named: hireEJB
at org.jboss.jpa.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:124)
Et une erreur de dépendances qui manquent :
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "persistence.unit:unitName=hire.ear/hireEJB.jar#PostgreSql" is missing the following dependencies:
Dependency "jboss.jca:name=PostgresDS,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=PostgresDS,service=DataSourceBinding' **")

DEPLOYMENTS IN ERROR:
Deployment "jboss.jca:name=PostgresDS,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=PostgresDS,service=DataSourceBinding' **
Deployment "persistence.unit:unitName=hire.ear/hireClient.jar#hireEJB" is in error due to the following reason(s): java.lang.RuntimeException: Specification violation [EJB3 JPA 6.2.1.2] - You have not defined a non-jta-data-source for a RESOURCE_LOCAL enabled persistence context named: hireEJB
Deployment "vfsfile:/C:/Users/LikeNoOther/Downloads/jboss-5.0.1.GA/jboss-5.0.1.GA/server/default/deploy/postgres-ds.xml" is in error due to the following reason(s): org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
postgres-ds.xml :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0" encoding="UTF-8"?>
 
<!-- ===================================================================== -->
<!--                                                                       -->
<!--  JBoss Server Configuration                                           -->
<!--                                                                       -->
<!-- ===================================================================== -->
 
<!-- $Id: postgres-ds.xml 41017 2006-02-07 14:26:14Z acoliver $ -->
<!-- ==================================================================== -->
<!--  Datasource config for Postgres                                      -->
<!-- ==================================================================== -->
 
 
<datasources>
  <local-tx-datasource>
    <jndi-name>PostgresDS</jndi-name>
    <connection-url>jdbc:postgresql://localhost/cvtheque</connection-url>
    <driver-class>org.postgresql.Driver</driver-class>
    <user-name>postgres</user-name>
    <password>admin</password>
        <!-- sql to call when connection is created.  Can be anything, select 1 is valid for PostgreSQL
        <new-connection-sql>select 1</new-connection-sql>
        -->
 
        <!-- sql to call on an existing pooled connection when it is obtained from pool.  Can be anything, select 1 is valid for PostgreSQL
        <check-valid-connection-sql>select 1</check-valid-connection-sql>
        -->
 
      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
      <metadata>
         <type-mapping>PostgreSQL 9.0</type-mapping>
      </metadata>
  </local-tx-datasource>
 
</datasources>
persistence.xml:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?xml version="1.0" encoding="utf-8"?>
<persistence version="2.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_2_0.xsd">
 
    <persistence-unit name="PostgreSql" transaction-type="JTA">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <jta-data-source>java:/PostgresDS</jta-data-source>
        <non-jta-data-source>java:/cvtheque</non-jta-data-source>
        <class>com.ejb.entities.Candidat</class>
        <class>com.ejb.entities.Connaissanceslinguistique</class>
        <class>com.ejb.entities.Cv</class>
        <class>com.ejb.entities.Experience</class>
        <class>com.ejb.entities.Formation</class>
        <class>com.ejb.entities.Infospersonnelle</class>
        <class>com.ejb.entities.Lettre</class>
        <class>com.ejb.entities.Loisir</class>
        <class>com.ejb.entities.Offre</class>
        <class>com.ejb.entities.Recruteur</class>
        <class>com.ejb.entities.Reponse</class>
        <class>com.ejb.entities.Secteur</class>
        <class>com.ejb.entities.Typelettre</class>
        <properties>
            <property name="hibernate.connection.driver_class"    value="org.postgresql.Driver" />
            <property name="hibernate.connection.username"        value="postgres" />
            <property name="hibernate.connection.password"        value="admin" />
            <property name="hibernate.connection.url"             value="jdbc:postgresql://localhost/cvtheque" />
            <property name="hibernate.dialect"                    value="org.hibernate.dialect.PostgreSQLDialect" />
            <property name="hibernate.hbm2ddl.auto"               value="update" />
            <property name="hibernate.show_sql"                   value="true" />
        </properties>
    </persistence-unit>
</persistence>
Quelqu'un saurait-il m'aider à résoudre ces problèmes ?

Merci d'avance pour votre aide.