1 Reply Latest reply on Mar 2, 2013 1:30 PM by Nicklas Karlsson

    Problems with Classloading 3rd Party-Jars in AS 7

    Newbie

      Hi all

       

      I want to build and deploy an application via .jar (WTP during development), and deliver 3rd party jars within it (for not to have to create modules on any customer jboss, it's not allowed!)

       

      When deploying my jar via Indigo and WTP into AS7 standalone deploy folder, JBoss says

       

      Caused by: java.lang.ClassNotFoundException: org.dozer.Mapper from [Module "deployment.ejbneu.jar:main" from Service Module Loader]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

          ... 15 more

       

      Structure:

       

      ejbneu.jar

      |

      |-ejbModule

        |

        |-<my Ejbs>

          |

          |-package1

          |-package2

          |-lib

            |

            |-dozer-5.3.2.jar

        |-META-INF

          |

          |-MANIFEST.MF

          |-lib

            |

            |-dozer-5.3.2.jar

        |-lib

          |

          |-dozer-5.3.2.jar

      |

      |-lib

        |

        |-dozer-5.3.2.jar

      |

      |-dozer-5.3.2.jar

       

       

      I put the dozer-5.3.2.jar to anywehre it could be to be sure there is no problem wiht path

       

      in manifest I tried anything possible:

       

      <snip>

      Manifest-Version: 1.0

      Class-Path: dozer-5.3.2.jar

       

      <snap>

       

      Tried already:

      Class-Path: dozer-5.3.2.jar

      Class-Path: /dozer-5.3.2.jar

      Class-Path: lib/dozer-5.3.2.jar

      Class-Path: /lib/dozer-5.3.2.jar

       

       

      What to do for jboss can find my dozer-jar? The jar is contained in my jar.