9 Replies Latest reply on Nov 25, 2011 5:19 AM by alesj

    JBOSS 5.1: ignore persistence.xml in jar file

    zsv

      Hello!

       

      I need to ignore persistence.xml in jar lib in my project on server jboss 5.1.

       

      Structure of my project:

       

      project.ear

      \ lib

      \ META-INF

      \ core.jar

           \ META-INF\persistence.xml

      \ other jars and wars

       

      There is jboss-classloading.xml file in project.ear\META-INF (because I'm using dirrefent hibernate lib):

       

       

      <?xml version="1.0" encoding="UTF-8"?>
      <classloading xmlns="urn:jboss:classloading:1.0"
          domain="project.ear"
          export-all="NON_EMPTY"
          import-all="true"
          parent-first="false">
      </classloading>
      

       

       

      I need to ignore  core.jar\META-INF\persistence.xml because jboss throw Exception during my PU start.

       

      I'm trying to add jboss-ignore.txt to project.ear/META-INF with following content:

       

      core.jar/META-INF/persistence.xml
      

       

      But without any effect.

       

      Please help!