3 Replies Latest reply on May 5, 2016 9:40 AM by ctomc

    ClassNotFound from ejb.jar in ear deployed

    valsaraj007

      Hi,

       

      I am getting ClassNotFound from ejb.jar in ear deployed. But the ejb.jar contains the required jar file. I wonder why it is throwing not found error. This was working fine in JBoss 4. Do we need any change in wildfly-8.2.1?

       

      Thanks!

        • 1. Re: ClassNotFound from ejb.jar in ear deployed
          ctomc

          how exactly your ear structure looks like?

          what does return?

          jar tf <name-of-ear>

          1 of 1 people found this helpful
          • 2. Re: ClassNotFound from ejb.jar in ear deployed
            valsaraj007

            Hi Tomaz,

             

            Here is the structure of ear. jakarta-httpcore-4.0-alpha1.jar contains classes used in appEJB.jar but it is throwing ClassNotFound from EJB class.

             

            app.ear

            |

            |----appEJB.jar

            |          |----META-INF

            |          |----jakarta-httpcore-4.0-alpha1.jar

            |

            |----appWEB.war

             

            Here is manifest if appEJB.jar:

            Manifest-Version: 1.0

            Ant-Version: Apache Ant 1.7.1

            Created-By: 25.51-b03 (Oracle Corporation)

             

            jar tf app.ear

            -----------------

            META-INF/

            META-INF/MANIFEST.MF

            lib/

            META-INF/application.xml

            META-INF/jboss-deployment-structure.xml

            lib/antlr-runtime-3.0.jar

            lib/bcprov-jdk16-140.jar

            lib/commons-beanutils-1.7.jar

            lib/commons-codec-1.3.jar

            lib/commons-collections.jar

            lib/commons-digester-1.7.jar

            lib/commons-fileupload-1.2.1.jar

            lib/commons-fileupload-1.3.1.jar

            lib/commons-io-1.4.jar

            lib/commons-javaflow-20060411.jar

            lib/commons-lang-2.4.jar

            lib/commons-math-1.2.jar

            lib/el-ri.jar

            appEJB.jar

            appWEB.war

             

            Thank you!

            • 3. Re: ClassNotFound from ejb.jar in ear deployed
              ctomc

              Hey,

               

              that is a miracle that ever worked, It was probably a bug in jboss as 4 that allowed this.

               

              you will need to move jakarta-httpcore-4.0-alpha1.jar to ear/lib directory and it will work.


              also while you are at it, remove duplicate commons-fileupload jar and upgrade bcprov to latest version to work properly with newer JDKs WildFly runs with.