Return-Path:
X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io
Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io
Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183])
by cust-asf2.ponee.io (Postfix) with ESMTP id 3D991200B61
for ; Tue, 9 Aug 2016 20:49:58 +0200 (CEST)
Received: by cust-asf.ponee.io (Postfix)
id 3C1CE160AA5; Tue, 9 Aug 2016 18:49:58 +0000 (UTC)
Delivered-To: archive-asf-public@cust-asf.ponee.io
Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
by cust-asf.ponee.io (Postfix) with SMTP id 5A972160A6B
for ; Tue, 9 Aug 2016 20:49:57 +0200 (CEST)
Received: (qmail 7032 invoked by uid 500); 9 Aug 2016 18:49:56 -0000
Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: "Tomcat Users List"
Delivered-To: mailing list users@tomcat.apache.org
Received: (qmail 7021 invoked by uid 99); 9 Aug 2016 18:49:55 -0000
Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142)
by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2016 18:49:55 +0000
Received: from localhost (localhost [127.0.0.1])
by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 8B89C1A85D3
for ; Tue, 9 Aug 2016 18:49:55 +0000 (UTC)
X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org
X-Spam-Flag: NO
X-Spam-Score: 1.513
X-Spam-Level: *
X-Spam-Status: No, score=1.513 tagged_above=-999 required=6.31
tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1,
NO_RDNS_DOTCOM_HELO=0.433, RCVD_IN_DNSWL_LOW=-0.7,
RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled
Received: from mx1-lw-eu.apache.org ([10.40.0.8])
by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024)
with ESMTP id mpngxcNTlhuL for ;
Tue, 9 Aug 2016 18:49:53 +0000 (UTC)
Received: from vms173021pub.verizon.net (vms173021pub.verizon.net [206.46.173.21])
by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id F3A0D5F3A0
for ; Tue, 9 Aug 2016 18:49:52 +0000 (UTC)
Received: from vz-proxy-l005.mx.aol.com ([64.236.82.152])
by vms173021.mailsrvcs.net
(Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014))
with ESMTPA id <0OBN000M8OAI3T30@vms173021.mailsrvcs.net> for
users@tomcat.apache.org; Tue, 09 Aug 2016 13:49:30 -0500 (CDT)
X-CMAE-Score: 0
X-CMAE-Analysis: v=2.1 cv=btqxfxui c=1 sm=1 tr=0 a=a3t/a0oOYlYu/nGe1mf8ZA==:117
a=IkcTkHD0fZMA:10 a=7z1cN_iqozsA:10 a=j4nzMFrpAAAA:8 a=QfKxxUxMAAAA:8
a=hRdKyjGFa_UgYkOOEK8A:9 a=9jsmGJAr1bfn64XT:21 a=SAzHL0D_ylaHmXPH:21
a=JQWh_xWtoWBcTr4Y:21 a=QEXdDO2ut3YA:10
Received: by 71.127.40.115 with SMTP id 288ddf2c; Tue, 09 Aug 2016 18:49:30 GMT
Subject: Re: headless mode in tomcat
To: Tomcat Users List
References:
From: Christopher Schultz
Message-id: <62836d92-309f-e9f9-a9a7-2505a3381437@christopherschultz.net>
Date: Tue, 09 Aug 2016 14:49:29 -0400
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0)
Gecko/20100101 Thunderbird/45.2.0
MIME-version: 1.0
In-reply-to:
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: 7bit
archived-at: Tue, 09 Aug 2016 18:49:58 -0000
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
XMing,
On 8/3/16 4:50 AM, XMing wrote:
> I've add the following line to setenv.sh in tomcat bin directory.
>
> export CATALINA_OPTS="$CATALINA_OPTS -Djava.awt.headless=true"
This shouldn't usually be necessary. What happens if you don't set
"headless" mode?
> I have some image processing code in spring bean which runs well at
> the first time.
>
> After some time,let me say 1 or 2 days, exception occurs. Any clue
> would be appreciated.
>
> Env detail: OS : Ubuntu 14.10 Server version: Apache Tomcat/7.0.63
> Server built: Jun 30 2015 08:08:33 UTC Server number: 7.0.63.0
> OS Name: Linux OS Version: 3.19.0-59-generic
> Architecture: amd64 JVM Version: 1.7.0_79-b15 JVM Vendor:
> Oracle Corporation
>
>
> Here is the exception message:
> ========================================== HTTP/1.1 500 Internal
> Server Error Server: Apache-Coyote/1.1 Set-Cookie:
> JSESSIONID=145E29B2CF34304B36EC686F20106B58; Path=/; HttpOnly
> Content-Type: text/html;charset=utf-8 Content-Language: en
> Content-Length: 5261 Date: Wed, 03 Aug 2016 08:04:07 GMT
> Connection: close
>
> Apache Tomcat/7.0.63 - Error
> report
> HTTP Status 500 - Handler processing failed;
> nested exception is java.lang.NoClassDefFoundError: Could not
> initialize class java.awt.image.BufferedImage
noshade="noshade">type Exception
> report
message Handler processing failed; nested
> exception is java.lang.NoClassDefFoundError: Could not initialize
> class java.awt.image.BufferedImage
description
> The server encountered an internal error that prevented it from
> fulfilling this request.
exception
>
org.springframework.web.util.NestedServletException: Handler
> processing failed; nested exception is
> java.lang.NoClassDefFoundError: Could not initialize class
> java.awt.image.BufferedImage
> org.springframework.web.servlet.DispatcherServlet.triggerAfterCompleti
onWithError(DispatcherServlet.java:1303)
>
>
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherS
ervlet.java:977)
> org.springframework.web.servlet.DispatcherServlet.doService(Dispatcher
Servlet.java:893)
>
>
org.springframework.web.servlet.FrameworkServlet.processRequest(Framewor
kServlet.java:966)
> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServl
et.java:868)
>
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServ
let.java:842)
>
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>
>
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(
CharacterEncodingFilter.java:85)
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRe
questFilter.java:107)
>
>
root cause
java.lang.NoClassDefFoundError: Coul
d
> not initialize class java.awt.image.BufferedImage
> com.qqm.common.util.QRCodeUtil.createQRImage(QRCodeUtil.java:70)
> com.qqm.api.service.business.app.v3.impl.V3InvitationBizServiceImpl.ge
tQrcodeInfo(V3InvitationBizServiceImpl.java:389)
>
>
com.qqm.api.service.business.app.v3.impl.V3InvitationBizServiceImpl$$Fas
tClassBySpringCGLIB$$78bdc775.invoke(<generated>)
> org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:20
4)
>
>
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedIntercepto
r.intercept(CglibAopProxy.java:649)
> com.qqm.api.service.business.app.v3.impl.V3InvitationBizServiceImpl$$E
nhancerBySpringCGLIB$$5ab5e2f0.getQrcodeInfo(<generated>)
>
>
com.qqm.api.action.app.app3.InvitationAction.getQrcodeInfo(InvitationAct
ion.java:80)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
ava:57)
>
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:43)
> java.lang.reflect.Method.invoke(Method.java:606)
> org.springframework.web.method.support.InvocableHandlerMethod.doInvoke
(InvocableHandlerMethod.java:221)
>
>
org.springframework.web.method.support.InvocableHandlerMethod.invokeForR
equest(InvocableHandlerMethod.java:137)
> org.springframework.web.servlet.mvc.method.annotation.ServletInvocable
HandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
>
>
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHand
lerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHa
ndlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
>
>
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.
handle(AbstractHandlerMethodAdapter.java:85)
> org.springframework.web.servlet.DispatcherServlet.doDispatch(Dispatche
rServlet.java:959)
>
>
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherSe
rvlet.java:893)
> org.springframework.web.servlet.FrameworkServlet.processRequest(Framew
orkServlet.java:966)
>
>
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet
.java:868)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServ
let.java:842)
>
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>
>
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(
CharacterEncodingFilter.java:85)
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRe
questFilter.java:107)
>
>
note The full stack trace of the root cause is
> available in the Apache Tomcat/7.0.63 logs.
noshade="noshade">Apache Tomcat/7.0.63
> ==========================================
You need to look at the log file to see the "real" root cause: it's
not displayed here in the abridged error message.
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBCAAGBQJXqiW5AAoJEBzwKT+lPKRYRFEQAIZRpF/eGlJdL/QzO1L2QNgK
KGvezeSIu9uN/5l/WZl5A1oz4HgIJiTp3K8B8psFlptUctiYTC5NstxV034zRSvk
YdOuKl95R2bpcYjX6vAlToNgXDYxtOX0CEDVSGsFVl1KAlreJL4iwXHUf3emc9dO
lsvCI1U9SfrXPrYAjMTpEJH/sGPGHi6/TgrkOPouFcwaE6Sj8Ywwl7fR+uuBDGei
+pVsi3c/qQEm1PwGUtsFfqX0N0QQHNe80w40D0HG93TjRBj3iSD2rq7GZjySRWaT
x6roBipIH+SjQmtw0Y8VU+N5BEcGqI7u5ZF/qcKGKWXz48iuTbjX7yPNU5INp87Q
ug+AVRMla/7+VSzhe3q60rjlv2OQes3+3JH+pcpE94PqWcfCWIZvvG7Sld3wGH6u
HHCHWGI05dg8SqZQnwqkdTTTvfKF4xQs+07uIIna/RPLRpxzzpdiKZ+zEAlrOfFU
kMvyQhgq1OHLRldBFvaq7IOyOHRMHIwoPstfgGQmZLxqWUZxADvmOelEWvc4Q0b5
GVzQy+ALjdE5VNAflAjj/BOr0NRwnp6pS+hlkrrGYtOJL6+/CRXLdPGHFYhY0LVH
Obn/ccTuQd4x8BI8s0eHtFtmBygdZPLFosno5SLVNJdAshlqAUZMPosnFZpwMRAe
9oaslEiTzAf9lPTPlNHQ
=DnAl
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org