Bonjour,

J'essaye de migrer une application J2EE qui fonctionne très bien sur un JBoss 3.2.7 et 4.0.5 vers un JBoss 4.2.0.GA.

Sur Jboss 4.2.0.GA l'appel à dataSource.getConnection() comme dans le code suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
private Connection getConnection(){
   Connection conn = null;
   try {
      Context ctx = new InitialContext();
      DataSource dataSource = (DataSource)ctx.lookup("java:/jdbc/Administration");
      conn = dataSource.getConnection();
      if(logger.isTraceEnabled()){
         logger.trace("Recuperation de la connection java:/jdbc/Administration");
      }
   }catch(Exception e) {
      throw new EJBException(e);
   }
   return conn;
}
provoque invariablement l'exception suivante :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
java.rmi.ServerException: EJBException:; nested exception is: 
	javax.ejb.EJBException: org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -53effaf0:8ac:465ed728:98 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -53effaf0:8ac:465ed728:98 status: ActionStatus.ABORT_ONLY >))
	at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:365)
	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
	at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
	at org.jboss.ejb.Container.invoke(Container.java:960)
Les datasources utilisés sont déclarés dans le fichier postgres-ds.xml

Est-ce que quelqu'un a une idée ou a rencontré le même problème?
D'avance merci.