[Pljava-dev] Error trapping help

Scott Petersen scottpetersen at softhome.net
Mon Sep 25 15:29:56 UTC 2006


Folks,

I have loaded my Jasper report definition (.jrxml) into a postgresql 
database as a text field.  I can retrieve the record and convert it to 
an InputStream.  This is where the problem breaks down.  When I pass the 
InputStream to  JRXmlLoader.load(is) to get a JasperDesign to then 
continue on the compile and execution process I receive an error that I 
have not been able to trap.

The following jar files are loaded:
commons-beanutils-1.5.jar
commons-collections-2.1.jar
commons-digester-1.7.jar
commons-logging-1.0.2.jar
itext-1.3.1.jar
jasperreports-1.2.6.jar
jdt-compiler-3.1.1.jar
pljava.jar

The following code snipet show what I am doing:
    try
    {
      rs.next();
      String reportSource = rs.getString("report_source");
      InputStream is = fromString(rs.getString("report_source"));
//      is.read(returnString, 0, is.available);         -- read of 
buffer works
      try
      {
        jasperDesign = JRXmlLoader.load(is); <<<== dies on this line
      }
      catch (JRException e)
      {
        e.printStackTrace();
        return "JRXmlLoader failure";
      }
    }
    catch (SQLException se)
    {
      se.printStackTrace();
      if (rs != null)
      {
          rs.close();
      }
      return "InputStream failure";
    }   


I was able to read the InputStream in a previous test.  But when I add 
the line that contains JRXmlLoader.load(is) the program returns the 
following error:

psql:java_test:112: ERROR:  java.lang.ExceptionInInitializerError


I have 2 issues.  First how do I get past this issue?  The second 
problem is how can I get more information on what the problem is in 
order to track it down.

Any and all help appreciated.
Scott.



More information about the Pljava-dev mailing list