0 Replies Latest reply on Jun 25, 2013 9:50 AM by Nilesh Patidar

    java.lang.LinkageError: loader constraint violation: when resolving method

    Nilesh Patidar Newbie

      Hi,

       

      I am getting "java.lang.LinkageError: loader constraint violation: when resolving method "com.experian.ncac.consumer.ConsumerChoice.setEverifyRetCode(Lcom/experian/ncac/service/OWEVerifyReturnCode;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, com/experian/ncac/everify/OutWalletAnswers2Action, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, com/experian/ncac/consumer/ConsumerChoice, have different Class objects for the type com/experian/ncac/service/OWEVerifyReturnCode used in the signature"

       

      i know that my classes are conflicting because same classes are loaded multiple times.

       

      i want to ISOLATE my classess,

       

      my Ear structure is

       

       

      MyApp.ear

           |

           |-META-INF

           |     |-application.xml

           |     |-MANIFEST.MF

           |-Lib

           |   |-Jars

           |-Module 1

           |     |-WEB-INF/classes

           |-Module 2

           |     |-WEB-INF/classes

           |-Module 3

           |     |-WEB-INF/classes

           |-MyAppEJB.jar

           |     |-classes

           |     |-META-INF

        

      I want to convert the above structue like below

       

      MyApp.ear

           |

           |-META-INF

           |     |-application.xml

           |     |-MANIFEST.MF

           |-Lib

           |   |-Jars

           |-Module 1

           |     |-WEB-INF

           |-Module 2

           |     |-WEB-INF

           |-Module 3

           |     |-WEB-INF

           |-MyAppEJB.jar

           |     |-META-INF

           |-classes

       

      but when i put classes folder outside of WEB-INF it will throw the ClassNotFound Exception.

       

      Can anyone help me how to isolated the classes?

       

      Regards:

      NIlesh Patidar