title: The supplied java.sql.Connection object is null
body: <p>im trying to export a jrxml file to pdf, but i get this error: </p>
  
  <pre><code>WARN query.JRJdbcQueryExecuter  - The supplied java.sql.Connection object is null.
  </code></pre>
  
  <p>i only get a blank pdf file.. </p>
  
  <p>This is my method to export to PDF:</p>
  
  <pre><code>public void printReport(ActionEvent event) throws JRException, IOException {
  
      String reportPath = FacesContext.getCurrentInstance().getExternalContext().getRealPath("/test.jrxml");
      JasperReport report = JasperCompileManager.compileReport(reportPath);
      JasperPrint jasperPrint = JasperFillManager.fillReport(report, new HashMap&lt;String, String&gt;());
      HttpServletResponse httpServletResponse = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();
      httpServletResponse.addHeader("Content-disposition", "attachment; filename=report.pdf");
      ServletOutputStream servletOutputStream = httpServletResponse.getOutputStream();
      JasperExportManager.exportReportToPdfStream(jasperPrint, servletOutputStream);
      FacesContext.getCurrentInstance().responseComplete();
  }
  </code></pre>
  
  <p>I'm new with jasperreports so i'm a little lost.. do i have to specify the connection string to de database or what? and where should i add it.</p>
  
  <p>BTW, i'm using JSF 2, intellij and maven.</p>
  
  <p>thanks.</p>