agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] Error trapping help
Date: Mon, 25 Sep 2006 17:42:11 +0200
Message-ID: <4517F8D3.1080404@tada.se> (raw)
In-Reply-To: <4517F5F4.2020804@softhome.net>
References: <4517F5F4.2020804@softhome.net>
Hi Scott,
Try and catch the ExceptionInInitializerError and print the stack trace
of the exception that caused it. That will probably give you the
information you are looking for.
Regards,
Thomas Hallgren
Scott Petersen wrote:
> 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.
> _______________________________________________
> Pljava-dev mailing list
> Pljava-dev at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/pljava-dev
>
view thread (4+ messages) latest in thread
Message-ID: <4517F8D3.1080404@tada.se>
Permalink: ../4517F8D3.1080404@tada.se/
Also on: postgresql.org/message-id/4517F8D3.1080404@tada.se
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pljava-dev@postgresql.org
Subject: Re: [Pljava-dev] Error trapping help
In-Reply-To: <4517F8D3.1080404@tada.se>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox