1 Reply Latest reply on Jan 29, 2014 6:07 AM by Paata Lominadze

    Jboss Eap 6.2 Classloading (Apache Commons Lang)

    Paata Lominadze Newbie

      hello team,

       

      I have EJB Application on JBoss EAP 6.2

       

      I use CompareToBuilder from apache commons lang.

       

      My Entity Code snippet :

      @Entity
      @Table(name = "SOME_ENTITY", schema = "SOME_SCHEMA")
      public class SomeEntity implements Serializable, Comparable<SomeEntity> {
        private static final long serialVersionUID = 1L;
        private Long id;
        ...............................
        @Override
        public int compareTo(SomeEntity arg0) {
             return new CompareToBuilder().append(this.getId(), arg0.getId()).toComparison();
        }
      }
      
      
      

       

       

      When i tried to use this entity I got this exception :

       

      Caused by: java.lang.NoClassDefFoundError: org/apache/commons/lang/builder/CompareToBuilder
      
      
      

       

      usage : Set<SomeEntity> items = new TreeSet<SomeEntity>();

       

      But JBoss EAP 6.2 contains commons lang module :

       

      ~/jboss-eap-6.2/modules/system/layers/base/org/apache/commons/lang/main/commons-lang-2.6-redhat-2.jar

      and this jar contains CompareToBuilder class.



      Thanks In Advance


      ________________________________

      Regards,

      Paata Lominadze