1 Reply Latest reply on Nov 26, 2010 8:42 AM by Alexey Alexey

    Order of loading applications

    Alexey Alexey Newbie

      Hi all!

      Can you please help me in question how to create order of deploying applications in JBoss 5.1


      I have an application exploded in *.war folder. And I have an application in *.sar file. If I have them both in server/default/deploy folder I have the error of deploying application in *.war... The error:


      2010-11-25 20:53:55,891 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/application_war]] (main) Exception starting filter applicationFilter
      java.lang.NoClassDefFoundError: com/pack/some/package/MyFilter
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
              at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:63)
              at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:572)
              at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:532)


      It seems like classloader looks anyway but not in lib directory of war-module (this class exists in one of lib of war application)


      If I have only war-application in server/default/deploy folder, everything is okey, after deploying of application I put in this directory my *.sar file and it is deploying well...


      I tried to change order of deploying by changing deployers.xml like that:


      <bean name="topContextComparator">
           <constructor factoryClass="org.jboss.system.deployers.LegacyDeploymentContextComparator" factoryMethod="getInstance"/>
          <property name="suffixOrder" class="java.util.Map"> 
           <map keyClass="java.lang.String" valueClass="java.lang.Integer"> 

         <property name="useDefaults">true</property>


      But ia also did not help.. It seems like classloader anyway looks for classes in *.sar application.... Could you help me with some suggestion? Thank you.