1 Reply Latest reply: Jan 20, 2010 11:59 PM by 553405 RSS

    compiling a java source in pl/sql developer - problems

    746027
      Hi,
      i'm using pl/sql developer and i created a javasource like this:


      import net.sf.jasperreports.engine.JRException;
      import net.sf.jasperreports.engine.JasperFillManager;
      create or replace and compile java source named Test as
      import net.sf.jasperreports.engine.JasperPrint;
      import net.sf.jasperreports.view.JasperViewer;
      import persistencia.JdbcDaoFactory;

      /**
      *
      * @author igor.simoes
      */
      public class ProcessoRelController {

      ...
      }

      the problem is: when i compile the source, an error is displayed(canno't find symbol) in the first line (import net.sf.jasperreports.engine.JRException;)
      i wanna know how can i make the oracle JVM see the package(.jar) that contains net.sf.jasperreports.engine.JRException class, and the others classes in the import statement..

      thank's
      Igor Simões
        • 1. Re: compiling a java source in pl/sql developer - problems
          553405
          Hi,

          Refer the 'Implementing the report service' section in the following article: http://java.dzone.com/articles/java-reporting-part-2

          import java.sql.Connection;
          import java.sql.DriverManager;
          import java.sql.SQLException;
          import java.util.HashMap;

          import net.sf.jasperreports.engine.JRException;
          import net.sf.jasperreports.engine.JRExporterParameter;
          import net.sf.jasperreports.engine.JasperCompileManager;
          import net.sf.jasperreports.engine.JasperExportManager;
          import net.sf.jasperreports.engine.JasperFillManager;
          import net.sf.jasperreports.engine.JasperPrint;
          import net.sf.jasperreports.engine.JasperReport;
          import net.sf.jasperreports.engine.export.JRXlsExporter;

          public static Connection establishConnection()
          {
          Connection connection = null;
          try
          {
          Class.forName("oracle.jdbc.driver.OracleDriver");
          String oracleURL = "jdbc:oracle:thin:@localhost:1521:mySID";
          connection = DriverManager.getConnection(oracleURL,"username","password");
          connection.setAutoCommit(false);
          }
          catch(SQLException exception)
          {
          exception.printStackTrace();
          }
          return connection;

          }

          -Priyanka