1 Reply Latest reply on Feb 10, 2005 1:01 PM by sborges

    Hi I got this ClassDefNotFound Error....

    anu_katta

      Hello All,
      I had this situation where a java class packaged in a .jar file is not recognised when I placed it in the war files' WEB-INF/lib directory.
      but it is working fine if I add that jar file as an extracted dir in the war file. I really didn't understand why is this happening...
      Ok here is the scenario I had...

       core.ear
       |_ core.war
       |_ WEB-INF
       |_ lib
       |_ some.jar ( which is a package com.abc.chart.JFCChart.class
       and some other java classes. )
      
      


      When I deploy this kind of jar and try to run my application then it says that my com/abc/chart/JFCChart class not found error.

      But... if the same class is packaged in something like the following it has no problems at all...


      
       core.ear
       |_ core.war
       |_ WEB-INF
       | |_ lib
       | |_ some.jar ( which is a package com.abc.chart.JFCChart.class
       | and some other java classes. )
       |_ com
       |_abc
       |_chart
       |_ JFCChart.class
      
      

      That means I have to add the jar as an extracted version into the warfile root directory. and why is this working and why the other is not working...

      Please help me how to fix this problem.

      Thank you in advance.
      --Anu.