11 07 2017
SimpleCaptcha(캡차)의 Unix,Linux에서 sun.awt.X11GraphicsEnvironment 에러
윈도우에서 잘돌아 가는 SimpleCaptcha가 Unix/Linux 서버에서 에러가 날 경우
1 |
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment |
이 경우
Tomcat의 경우
catalina.sh 파일 제일위에 -Djava.awt.headless=true
1 |
CATALINA_OPTS="-Djava.awt.headless=true" |
제우스 같은 경우는
config 디렉토리 디벼보면 JEUSMain.xml 파일이 있는데 요걸 바로 수정해 주거나 아니면 webadmin 을 이용해서 수정해 주면 된다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<jeus-system xmlns="http://www.tmaxsoft.com/xml/ns/jeus"> <node> ... ... <engine-container> <name>testContainer</name> <id>121</id> <base-port>11011</base-port> <command-option>-Xms256m -Xmx512m -Djava.awt.headless=true</command-option> <engine-command> <type>servlet</type> <name>test</name> </engine-command> <sequential-start>true</sequential-start> </engine-container> ... ... </jeus-system> |
출처: http://stove99.tistory.com/166 [스토브 훌로구]
아래 링크
설정파일 변경 적용의 예
1.3.3 – Configuring options and paths for Tomcat
Configure the setenv.sh file to achieve a high-performance system.
To configure options and paths for Tomcat:
-
In the <Tomcat home>/bin directory, create a file called setenv.sh owned by the user <otuser> and the group <otgroup> (if not present already).
-
Configure the following settings in the setenv.sh file as indicated per operating system in Tomcat options per OS.
-
Set the maximum Java heap size to at least 2 GB (-Xmx2048m).
-
Set Abstract Window Toolkit to be used “headless” (-Djava.awt.headless=true; required by the included XML parser).
-
Set the SHARED_LIB_PATH variable to the lib directory of Archive Center.
<OT install AC> is the path to the directory into which you plan to install Archive Center.
Tomcat options per OS
- AIX
-
On AIX, several special settings are required. See Configuring Tomcat settings for IBM AIX.
- Linux
1CATALINA_OPTS="<b class="highlight">-Xmx2048m -Djava.awt.headless=true</b> $CATALINA_OPTS"
123SHARED_LIB_PATH=<<i class="varname">OT install AC</i>>/libLD_LIBRARY_PATH=$SHARED_LIB_PATH:$LD_LIBRARY_PATHexport LD_LIBRARY_PATH- HP-UX
1CATALINA_OPTS="<b class="highlight">-Xss1m -Xmx2048m -d64 -Djava.awt.headless=true</b> $CATALINA_OPTS"
123SHARED_LIB_PATH=<<i class="varname">OT install AC</i>>/libSHLIB_PATH=$SHARED_LIB_PATH:$SHLIB_PATHexport SHLIB_PATH- Solaris
1CATALINA_OPTS="<b class="highlight">-Xmx2048m -d64 -Djava.awt.headless=true</b> $CATALINA_OPTS"
123SHARED_LIB_PATH=<<i class="varname">OT install AC</i>>/libLD_LIBRARY_PATH=$SHARED_LIB_PATH:$LD_LIBRARY_PATHexport LD_LIBRARY_PATHIf a cloud storage system is used (Amazon S3, Windows Azure), also add the following lines:
12LANG=en_US.UTF-8export LANG
-
Oracle DDL문 생성및관리 SimpleCaptcha 예제