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

Free Support Forum - aspose.com

Document.UpdateFields throws java.lang.reflect.InvocationTargetException

Hello!

We’ve run into an error using Aspose Word. The error only happens in production environment (linux (centOs) java 11 in AWS Lambda).

StackTrace:
java.lang.reflect.InvocationTargetException: java.lang.InternalError
java.lang.InternalError: java.lang.reflect.InvocationTargetException
at java.desktop/sun.font.FontManagerFactory$1.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.font.FontManagerFactory.getInstance(Unknown Source)
at java.desktop/sun.java2d.SunGraphicsEnvironment.getFontManagerForSGE(Unknown Source)
at java.desktop/sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(Unknown Source)
at java.desktop/sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(Unknown Source)
at java.desktop/sun.java2d.HeadlessGraphicsEnvironment.getAvailableFontFamilyNames(Unknown Source)
at asposewobfuscated.zzRV.(Unknown Source)
at asposewobfuscated.zzRC.zzZ(Unknown Source)
at asposewobfuscated.zz3.zzZ(Unknown Source)
at asposewobfuscated.zzC.zzZ(Unknown Source)
at asposewobfuscated.zzG.zzZ(Unknown Source)
at asposewobfuscated.zzC.zzZ(Unknown Source)
at asposewobfuscated.zzG.zzZ(Unknown Source)
at asposewobfuscated.zzRC.zzZ(Unknown Source)
at com.aspose.words.zz8X.zzZ(Unknown Source)
at com.aspose.words.zz8X.zzZ(Unknown Source)
at com.aspose.words.zz8X.zzZ(Unknown Source)
at com.aspose.words.zz8W.zzZ(Unknown Source)
at com.aspose.words.zz8W.zz8I(Unknown Source)
at com.aspose.words.zz8W.zz8L(Unknown Source)
at com.aspose.words.zzYYK.zzSj(Unknown Source)
at com.aspose.words.zzYYK.zzSi(Unknown Source)
at com.aspose.words.zzYYK.zzZsP(Unknown Source)
at com.aspose.words.zzZKX.zzW(Unknown Source)
at com.aspose.words.zzZKX.zzH(Unknown Source)
at com.aspose.words.zzZKZ.zzR(Unknown Source)
at com.aspose.words.zzZKZ.zzS(Unknown Source)
at com.aspose.words.zzZKV.zzZKz(Unknown Source)
at com.aspose.words.zzZKV.zzZKA(Unknown Source)
at com.aspose.words.zzZKV.zzW(Unknown Source)
at com.aspose.words.zzZL1.zzU(Unknown Source)
at com.aspose.words.zzZL0.zzZ(Unknown Source)
at com.aspose.words.zzW2.zzZ(Unknown Source)
at com.aspose.words.zzYYY.zzZ(Unknown Source)
at com.aspose.words.zzXI.zzu6(Unknown Source)
at com.aspose.words.zzXI.zzY(Unknown Source)
at com.aspose.words.zzZ7W.zzZwP(Unknown Source)
at com.aspose.words.zzZ7W.zzT(Unknown Source)
at com.aspose.words.zzZ7B.zzx(Unknown Source)
at com.aspose.words.zzYX2.zzRQ(Unknown Source)
at com.aspose.words.zz7B.zzXz(Unknown Source)
at com.aspose.words.zz7C.zz5V(Unknown Source)
at com.aspose.words.zzZM2.zzZ(Unknown Source)
at com.aspose.words.Document.updatePageLayout(Unknown Source)
at com.aspose.words.zz2T.perform(Unknown Source)
at com.aspose.words.zz2U.zzMu(Unknown Source)
at com.aspose.words.zzZZY.zzYV(Unknown Source)
at com.aspose.words.zzZZY.zzZ(Unknown Source)
at com.aspose.words.zzZZY.zzZK(Unknown Source)
at com.aspose.words.Range.updateFields(Unknown Source)
at com.aspose.words.Document.updateFields(Unknown Source)
at br.com.apollus.servico.RelatorioHigienePericulosidadeGheService.gerarRelatorio(RelatorioHigienePericulosidadeGheService.java:100)
at br.com.apollus.LambdaMethodHandler.gerarRelatorio(LambdaMethodHandler.java:39)
at br.com.apollus.LambdaMethodHandler.handleRequest(LambdaMethodHandler.java:30)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
… 59 more
Caused by: java.lang.NullPointerException
at java.desktop/sun.awt.FontConfiguration.getVersion(Unknown Source)
at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(Unknown Source)
at java.desktop/sun.awt.FontConfiguration.init(Unknown Source)
at java.desktop/sun.awt.X11FontManager.createFontConfiguration(Unknown Source)
at java.desktop/sun.font.SunFontManager$2.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.font.SunFontManager.(Unknown Source)
at java.desktop/sun.awt.FcFontManager.(Unknown Source)
at java.desktop/sun.awt.X11FontManager.(Unknown Source)
… 63 more

@PretoBranco

Could you please attach your input Word document here for testing? We will investigate the issue on our side and provide you more information.

REL_HOE_PERICULOSIDADE_GHE_V10.zip (196.2 KB)

@PretoBranco

We have tested the scenario using the latest version of Aspose.Words for Java 20.5 and have not found the shared issue. So, please use Aspose.Words for Java 20.5.