Solution to the Problem of calling awt in Linux

Source: Internet
Author: User
Solution to the Problem of calling awt in Linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. Images on the website suddenly become inaccessible and become red-handed, with similar exceptions:

HTTP Status 500-

Type Exception report

Message

Description The server encountered an internal error () that prevented it from fulfilling this request.

Exception

Javax. servlet. ServletException
Org. apache. jasper. runtime. PageContextImpl. doHandlePageException (PageContextImpl. java: 825)
Org. apache. jasper. runtime. PageContextImpl. handlePageException (PageContextImpl. java: 758)
Org. apache. jsp. Imaging_005fToWeb_jsp. _ jspService (Imaging_005fToWeb_jsp.java: 106)
Org. apache. jasper. runtime. HttpJspBase. service (HttpJspBase. java: 94)
Javax. servlet. http. HttpServlet. service (HttpServlet. java: 802)
Org. apache. jasper. servlet. JspServletWrapper. service (JspServletWrapper. java: 324)
Org. apache. jasper. servlet. JspServlet. serviceJspFile (JspServlet. java: 292)
Org. apache. jasper. servlet. JspServlet. service (JspServlet. java: 236)
Javax. servlet. http. HttpServlet. service (HttpServlet. java: 802)

This problem occurs only in unix or unix-like linux and may occur when the awt method is called (awt is used in showimage. jsp). solution:

Add this sentence to the jboss STARTUP script run. sh-Djava. awt. headless = true

# Setup JBoss sepecific properties
JAVA_OPTS = "$ JAVA_OPTS-Dprogram. name = $ PROGNAME-Djava. awt. headless = true"

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.