1 Reply Latest reply on Dec 29, 2010 3:29 PM by david.cole

    JBOSS 4.2.3 - class not found exception

    david.cole

      I have introduced POI into the JBOSS application.

      We have a flex front end, and I am loading an excel file in FLEX, passing the byte array to the backend and trying to create a HSSFWorkbook out of it.

       

      I find the classes in eclipse, it compiles in maven but at run time I get a class not found exception on:

      HSSFWorkbook bw = new HSSFWorkbook(content);

       

      Within the ear file the POI library is included.

       

      What do I have to do additionally that it is found at runtime?

       

      I am also using POI to generate Excel as part of a war application that is also included in the ear - there i do not havew any problem.

       

       

      I am sure it is something really easy,but would appreciate some help

       

      thanks

       

      David

        • 1. Re: JBOSS 4.2.3 - class not found exception
          david.cole

          well I solved the problem.

          JBOSS by default does not include the linked libraries - they must be in the manifest.mf file.

          I extended my pom.xml with the AddClassPath tag as below and ti worked

           

          <ejbVersion>3.0</ejbVersion>
               <generateClient>true</generateClient>
               <clientExcludes>
                <clientExcludes>**/*Bean.class</clientExcludes>
               </clientExcludes>
               <archive>
                         <manifest>
                            <addClasspath>true</addClasspath>
                         </manifest>
                       </archive>
              </configuration>