Note that there are some explanatory texts on larger screens.

plurals
  1. POiSeries JAVA program with RPGLE Interface crashes when processing images
    primarykey
    data
    text
    <p>I have made a java program that creates PDF files based to GnuPdf. It runs perfectly when run using native java code (on windows or iSeries QSH), however, when run through an RPGLE interface, the program crashes (at what seems like random intervals) when processing images. I tracked down one of these down to loading an image from a .jar file and removed the call from the code. It worked for a while but is now crashing for images loaded from IFS. Maybe RPGLE is locking the files somehow, and ideas? The code is called from a Service Program.</p> <p>Here is the stacktrace</p> <pre><code>java.lang.NullPointerException at gnu.jpdf.PDFImage.write(PDFImage.java:286) at gnu.jpdf.PDFOutput.write(PDFOutput.java:114) at gnu.jpdf.PDFDocument.write(PDFDocument.java:307) at gnu.jpdf.PDFJob.end(PDFJob.java:182) at com.mysite.pdf.PdfDocumentStateValid.endDocument(PdfDocumentStateValid.java:657) at com.mysite.pdf.PdfDocument.endDocument(PdfDocument.java:36) java.io.IOException: Descriptor not valid. at java.lang.Throwable.&lt;init&gt;(Throwable.java:196) at java.lang.Exception.&lt;init&gt;(Exception.java:41) at java.io.IOException.&lt;init&gt;(IOException.java:40) at java.io.FileOutputStream.writeBytes(Native Method) at java.io.FileOutputStream.write(FileOutputStream.java:260) at java.io.ByteArrayOutputStream.writeTo(ByteArrayOutputStream.java:112) at gnu.jpdf.PDFOutput.&lt;init&gt;(PDFOutput.java:96) at gnu.jpdf.PDFDocument.write(PDFDocument.java:302) at gnu.jpdf.PDFJob.end(PDFJob.java:182) at java.awt.PrintJob.finalize(PrintJob.java:60) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:116) at java.lang.ref.Finalizer.access$100(Finalizer.java:47) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:193) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload