1 Reply Latest reply on Sep 15, 2011 3:49 AM by Daniel Bevenius

    Overide libs from modules

    Alex Ander Newbie

      Hi All,

       

      I have the following Problem:

       

      In JB7 Lightning is the hibernate version 4.0.0.Beta1, wich contaions the following bug.

      This bug makes problems in my application, but it is fixed in version >= 4.0.0.CR1

       

      1. I updated the module in $JBOSS_HOME/modules/org/hibernate to 4.0.0.CR2,

      which solved the problem!

       

      BUT

       

      I do not have access to $JBOSS_HOME/modules (cause its in a cloud [openshift]).

       

      Now i put my hibernate.4.0..0.CR2 into my WAR/lib folder, but JB7 take hibernate from

      modules folder. This is how Class Loading Presendence works in JB7, i know. But is

      there no way to override the module library, without modifying the module folder and

      module.xml's?

       

      I have only access to: application folder, standalone.xml.

       

      Thanks

      Alex

        • 1. Re: Overide libs from modules
          Daniel Bevenius Master

          Hi,

           

          But is

          there no way to override the module library, without modifying the module folder and

          module.xml's?

          You should be able to exclude the org.hibernate from the modules directory and have the one you have packaged be used in instead by using a jboss-deployment-structure.xml. Some thing like this:

           

           

          <jboss-deployment-structure>
              <deployment>
                  <exclusions>
                      <module name="org.hibernate" slot="main"/>
                  </exclusions>
              </deployment>
          </jboss-deployment-structure>
          

           

          Regards,

           

          /Daniel