0 Replies Latest reply on Jan 14, 2010 4:42 PM by B Dinh

    Persistence.xml not found in classpath

    B Dinh Newbie

      I'm trying to migrate our AS from JBoss 4.2.2 to JBoss 5.1.0. I've found various tips on updating xml headers and such. Updated JMS configurations.


      When I deploy, I get this error:


      [Ejb3Configuration] - Could not find any META-INF/persistence.xml file in the classpath


      This is my EAR structure:


      -- lib

         --various hibernate jars

      -- META-INF

         -- MANIFEST.MF

         -- application.xml

         -- jboss-app.xml

      -- utils.jar

      -- persistenceModule.jar

         -- META-INF/persistence.xml

      -- server.jar

      -- gui.war


      This is application.xml:


      <?xml version="1.0" encoding="UTF-8"?>
      <application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" id="Application_ID" version="5">


      I believe I have the persistence.xml file in the right place. And when JBoss starts up, I see debug that shows entities from persistenceModule.jar being bound to their respective database tables. So I don't understand why it can't find the persistence.xml file when it can load the entities from the same jar.


      Any help or suggestions would be greatly appreciated!