2 Replies Latest reply on Apr 21, 2010 8:27 AM by pillingworth

    Deploying pebble on JBoss AS 5.1

    pillingworth

      When deploying pebble.war (lightweight java blog application) I get problems with class conflicts as it ships with its own implementations of jaxb and org.xml.sax. I have added a jboss-classloading.xml file into pebble.war/WEB-INF with the following contents

       

      <?xml version="1.0" encoding="UTF-8"?>
      <!-- Isolate the classloading -->
      <classloading xmlns="urn:jboss:classloading:1.0"
                      name="pebble.war"
                      domain="pebble.war.domain"
                      export-all="NON_EMPTY"
                      import-all="true">
      </classloading>

      to isolate the classloading and this almost works. The class conflicts are no longer causing any problems and the application starts up, but there is still a classloader issue. pebble comes with lucence-1.4.1 in its WEB-INF/lib folder but I also have other wars/sars that use lucene-core-2.2.0 in my jboss-all/lib folder. It seems that pebble is finding the wrong version of lucene, its finding the 2.2.0 version and not the 1.4.1.

       

      If I remove the 2.2.0 version then pebble seems to work fine, but obviously none of the other wars/sars work anymore.

       

      How and why is the wrong version of lucence being found and how do I make it find the right version?

        • 1. Re: Deploying pebble on JBoss AS 5.1
          jaikiran

          Where exactly is the lucence-core 2.2.0? It's not being shipped in JBoss AS. So ideally, each app should package that within the application.

          1 of 1 people found this helpful
          • 2. Re: Deploying pebble on JBoss AS 5.1
            pillingworth

            That is likely to be the problem - I am using a modified JBoss installation that has been split into two to keep jboss code separate from our code and then classpath entries added to the \server\reims\conf\jboss-service.xml so that addition classpath directories are included.

             

            I have taken a different approach - it seems pebble ships with it own versions of org.w3c.dom and org.xml.sax code which also comes with the JDK in endorsed folder. This is the conflict that I was trying to avoid by isolating the classloading. By removing this code and using the endorsed code I no longer need to isolate as the standard war classloading policy works and my problems go away.