Today, an Excel export feature was developed, and the error was found on the Linux server.
Catch exception is invocationtargetexception exception, have not seen this anomaly before, on-line search a bit.
The contents are as follows:
A jar package X.jar is used in a project A.
and X.jar introduced a class Y,
You should include Y.jar before you can use the Y class.
But Y.jar is not included in the project,
This will run out of InvocationTargetException in Project A.
This error means that the jar package is not found and the class under this Jar package is used, and the source discovery is caused by this class.
Sun.awt.X11FontManager
Workaround: Add the container configuration:
-Djava.awt.headless=true
The class is accompanied by a blog about the configuration:
http://dikar.iteye.com/blog/1417625
Error java.lang.reflect.InvocationTargetException in Linux environment