We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Getting java.lang.NullPointerException when trying to instantiate LayoutEnumerator

Hi,
we are getting a java.lang.NullPointerException when calling new LayoutEnumerator(asposeDocument);.

Please find attached an example document which can be used to reproduce the issue.

NullPointerException_DocumentExample.docx (23.6 KB)

Environment
We’re using v21.9 and I can reproduce this on Mac and on Linux.

JVM
openjdk 11.0.10 2021-01-19
OpenJDK Runtime Environment (build 11.0.10+9)
OpenJDK 64-Bit Server VM (build 11.0.10+9, mixed mode)

Stack trace

Caused by: java.lang.NullPointerException
	at com.aspose.words.zzZhO.zzrj(Unknown Source)
	at com.aspose.words.zzZhO.zzYMS(Unknown Source)
	at com.aspose.words.zzZhO.zzZjh(Unknown Source)
	at com.aspose.words.zzda.zzW8o(Unknown Source)
	at com.aspose.words.zzYLf.zzZ2C(Unknown Source)
	at com.aspose.words.zzYLf.zzY2m(Unknown Source)
	at com.aspose.words.zzYLf.zzWzr(Unknown Source)
	at com.aspose.words.zzYW6.zzYMS(Unknown Source)
	at com.aspose.words.zzYW6.zzYMS(Unknown Source)
	at com.aspose.words.zzY0H.zzYPA(Unknown Source)
	at com.aspose.words.zzY0H.zzWqN(Unknown Source)
	at com.aspose.words.zzY0H.zzYMS(Unknown Source)
	at com.aspose.words.zz26.zzYTl(Unknown Source)
	at com.aspose.words.zz26.zzY2m(Unknown Source)
	at com.aspose.words.zz26.zzWzr(Unknown Source)
	at com.aspose.words.zzXlu.zzk0(Unknown Source)
	at com.aspose.words.zzXlu.zzZ2C(Unknown Source)
	at com.aspose.words.zzXlu.zzXg9(Unknown Source)
	at com.aspose.words.zzXlu.zzYpv(Unknown Source)
	at com.aspose.words.zzWwM.zzX3S(Unknown Source)
	at com.aspose.words.zzX0q.zzYUe(Unknown Source)
	at com.aspose.words.zzYYZ.zzX3S(Unknown Source)
	at com.aspose.words.zzA6.zzX7F(Unknown Source)
	at com.aspose.words.zzWBl.zzZhm(Unknown Source)
	at com.aspose.words.Document.updatePageLayout(Unknown Source)
	at com.aspose.words.Document.zzZoA(Unknown Source)
	at com.aspose.words.LayoutEnumerator.zzXBY(Unknown Source)
	at com.aspose.words.LayoutEnumerator.reset(Unknown Source)
	at com.aspose.words.LayoutEnumerator.<init>(Unknown Source)

Many thanks.

@m.aitwakrim

We have tested the scenario and managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-22926. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

1 Like

The issues you have found earlier (filed as WORDSNET-22926) have been fixed in this Aspose.Words for Java 22.2 update.