Error java.lang.reflect.InvocationTargetException in Linux environment

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.