Hi there,
I’m currently experiencing a problem with Aspose.PDF and Glassfish 4. I’m using the following (simple) snippet to add text to a new PDF file.
ByteArrayOutputStream baos = new ByteArrayOutputStream();
com.aspose.pdf.Document pdf = new com.aspose.pdf.Document();
Page page = pdf.getPages().add();
TextFragment fragment = new TextFragment(“example”);
page.getParagraphs().add(fragment);
pdf.save(baos);
As soon as I reach the TextFragment line I end up nowhere, everything hangs. I can not step into, over or anything. Furthermore there is no exception or anything in the server.log.
When enabling glassfish classloader logging to check if the classes are loaded at all I found the followin entries:
[Loaded com.aspose.pdf.internal.ms.System.z133 from file:/home/imaadm/glassfish4/glassfish/domains/ima_develop_95/lib/aspose-pdf-10.6.2.jar]
[Loaded com.aspose.pdf.internal.ms.System.z107 from file:/home/imaadm/glassfish4/glassfish/domains/ima_develop_95/lib/aspose-pdf-10.6.2.jar]
<dependency_failed type=‘leaf_type’ ctxk=‘java/lang/NullPointerException’ witness=‘com/aspose/pdf/internal/ms/System/z107’ stamp=‘227.866’/>
<dependency_failed type=‘leaf_type’ ctxk=‘java/lang/NullPointerException’ witness=‘com/aspose/pdf/internal/ms/System/z107’ stamp=‘227.866’/>
I also checked Aspose.PDF 10.8.0, same result.
We’re additionally using Aspose.Cells, Slides, Words and Email in the same application, all of them are working fine, it’s just the PDF module that somehow does nothing.
Glassfish 4 is running on CentOS 6.3 with Java 1.8.
Kind regards,
Tim