title: java.lang.NoClassDefFoundError in Jasper Report
body: <p>i have created one jasper report in <strong><em>iReport-4.5.0</em></strong></p>
  
  <p>But now i have to view this report in my java web application which is in <strong><em>Spring</em></strong>,</p>
  
  <p>here is my java file code as,</p>
  
  <pre><code>/***********************Bill-viewer ..Invoice Page ****************************/
  /*****Bill-viewer*****/
  @RequestMapping("/Billviewer")
  public @ResponseBody
  ModelAndView billReport(HttpSession session) {
      System.out.println("In Print.......");
      String invoice = (String) session.getAttribute("invoiceNo");
  
      System.out.println(invoice);
  
       try
         {
              Connection conn;
              Statement st;
              Class.forName("com.mysql.jdbc.Driver");
              conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/cjbranchdb","root","root");
              st=conn.createStatement();
             JasperReport jasperReport = JasperCompileManager.compileReport("C:\\Jasper Reports\\BillReport.jrxml");
             JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,new HashMap&lt;Object, Object&gt;(),conn);
             JasperViewer jv = new JasperViewer(jasperPrint);
             jv.show();          
  
             boolean isExitOnClose = false;
  
             JasperViewer.viewReport(jasperPrint, isExitOnClose);
  
  
             st.close();
             conn.close();
  
  
  
         }
         catch(Exception c)
         {
             JOptionPane.showMessageDialog(null,c.getMessage());
             System.out.println("aaaaaaaaaaaa   "+ c);
  
         }     
  
  
      return new ModelAndView("Billviewer");
  }
  </code></pre>
  
  <p>and my jsp file is as,</p>
  
  <pre><code>&lt;%@page contentType="text/html" pageEncoding="UTF-8"%&gt;
  &lt;!DOCTYPE HTML&gt;
  
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
      &lt;title&gt;JSP Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h2&gt;Hello World!&lt;/h2&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>i have build it well and run on browser but it gives following errors...</p>
  
  <pre><code>root cause
  
  java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JasperCompileManager
  com.pis.controller.HomePageController.billReport(HomePageController.java:462)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  java.lang.reflect.Method.invoke(Unknown Source)
                org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
  org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
  org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
  org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
  org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
  org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
  org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
  org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
  org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
  org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  </code></pre>
  
  <p>I have also added jar libraries files for <strong>Jasper Report</strong> in my web application project.</p>
  
  <p>so please help me , Thanks in advance.....</p>