오류 : HTTP 상태 500 – 내부 서버 오류
javax.servlet.ServletException: 서블릿 []을(를) 위한 Servlet.init() 호출이 예외를 발생시켰습니다.
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:750)
org.jasypt.exceptions.EncryptionInitializationException: java.lang.NoClassDefFoundError: Could not initialize class com.ibm.icu.impl.NormalizerImpl
org.jasypt.encryption.pbe.StandardPBEByteEncryptor.initialize(StandardPBEByteEncryptor.java:716)
org.jasypt.encryption.pbe.StandardPBEStringEncryptor.initialize(StandardPBEStringEncryptor.java:553)
org.jasypt.encryption.pbe.StandardPBEStringEncryptor.decrypt(StandardPBEStringEncryptor.java:705)
org.jasypt.properties.PropertyValueEncryptionUtils.decrypt(PropertyValueEncryptionUtils.java:72)
org.jasypt.spring3.properties.EncryptablePropertyPlaceholderConfigurer.convertPropertyValue(EncryptablePropertyPlaceholderConfigurer.java:109)
org.springframework.beans.factory.config.PropertyResourceConfigurer.convertProperty(PropertyResourceConfigurer.java:121)
org.springframework.beans.factory.config.PropertyResourceConfigurer.convertProperties(PropertyResourceConfigurer.java:104)
org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:81)
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:669)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:602)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665)
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:521)
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:462)
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
javax.servlet.GenericServlet.init(GenericServlet.java:158)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:750)
근본 원인 (root cause)
java.lang.NoClassDefFoundError: Could not initialize class com.ibm.icu.impl.NormalizerImpl
com.ibm.icu.text.Normalizer$Mode.normalize(Normalizer.java:188)
com.ibm.icu.text.Normalizer.normalize(Normalizer.java:1177)
com.ibm.icu.text.Normalizer.normalize(Normalizer.java:1146)
org.jasypt.normalization.Normalizer.normalizeWithIcu4j(Normalizer.java:204)
org.jasypt.normalization.Normalizer.normalizeToNfc(Normalizer.java:129)
org.jasypt.encryption.pbe.StandardPBEByteEncryptor.initialize(StandardPBEByteEncryptor.java:661)
org.jasypt.encryption.pbe.StandardPBEStringEncryptor.initialize(StandardPBEStringEncryptor.java:553)
org.jasypt.encryption.pbe.StandardPBEStringEncryptor.decrypt(StandardPBEStringEncryptor.java:705)
org.jasypt.properties.PropertyValueEncryptionUtils.decrypt(PropertyValueEncryptionUtils.java:72)
org.jasypt.spring3.properties.EncryptablePropertyPlaceholderConfigurer.convertPropertyValue(EncryptablePropertyPlaceholderConfigurer.java:109)
org.springframework.beans.factory.config.PropertyResourceConfigurer.convertProperty(PropertyResourceConfigurer.java:121)
org.springframework.beans.factory.config.PropertyResourceConfigurer.convertProperties(PropertyResourceConfigurer.java:104)
org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:81)
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:669)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:602)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665)
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:521)
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:462)
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
javax.servlet.GenericServlet.init(GenericServlet.java:158)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:750)
비고 근본 원인(root cause)의 풀 스택 트레이스를, 서버 로그들에서 확인할 수 있습니다.
java.lang.NoClassDefFoundError: Could not initialize class com.ibm.icu.impl.NormalizerImpl
at co m.ibm.icu.text.Normalizer.compose(Normalizer.java:873)
at co m.ibm.icu.text.Normalizer$NFCMode.normalize(Normalizer.java:404)
at co m.ibm.icu.text.Normalizer.normalize(Normalizer.java:1111)
at co m.ibm.icu.text.Normalizer.normalize(Normalizer.java:1127)
SEVERE: Servlet.service() for servlet [] threw exception
java.lang.IllegalArgumentException: Invalid version number: Version number may be negative or greater than 255
at co m.ibm.icu.util.VersionInfo.getInstance(VersionInfo.java:191)
at co m.ibm.icu.impl.ICUDebug.getInstanceLenient(ICUDebug.java:65)
at com.ibm.icu.impl.ICUDebug.<clinit>(ICUDebug.java:69)
java.lang.NoClassDefFoundError: Could not initialize class com.ibm.icu.impl.NormalizerImpl
at com.ibm.icu.text.Normalizer.compose(Normalizer.java:873)
at com.ibm.icu.text.Normalizer$NFCMode.normalize(Normalizer.java:404)
at com.ibm.icu.text.Normalizer.normalize(Normalizer.java:1111)
at com.ibm.icu.text.Normalizer.normalize(Normalizer.java:1127)
java.lang.ExceptionInInitializerError
at com.ibm.icu.impl.NormalizerDataReader.<clinit>(NormalizerDataReader.java:300)
at com.ibm.icu.impl.NormalizerImpl.<init>(NormalizerImpl.java:288)
at com.ibm.icu.impl.NormalizerImpl.<clinit>(NormalizerImpl.java:35)
at Test.main(Test.java:8)
Caused by: java.lang.IllegalArgumentException: Invalid version number: Version number may be negative or greater than 255
at com.ibm.icu.util.VersionInfo.getInstance(VersionInfo.java:197)
at com.ibm.icu.impl.ICUDebug.getInstanceLenient(ICUDebug.java:65)
at com.ibm.icu.impl.ICUDebug.<clinit>(ICUDebug.java:69)
... 4 more
상황 :
JDK 1.8 톰캣 9 로 프로젝트를 실행했는데 위와 같은 오류가 뜨고 있는 상황이였다.
결과:
알고보니 포함된 라이브러리중 하나가 버전이 맞지 않았다.
TLDR; replace your icu4j.jar file with the latest version.
This is likely caused by an older version of ICU4J in your classpath. The VersionInfo class was limited to 2-character version numbers, setting a limit to 255. Since Java 8 is now at 1.8.0_291, the 291 exceeds the 2-character limit, causing the ICU4J VersionInfo exception.
@sanketpatel 1.8.0_261 to 1.8.0.252 , currently I am using openjdk.
자바 버전을 255 이하로 내리면 된다는데
그냥 나는 확 내려서 202 버전으로 설치하여 해결했다.
출처 :
https://github.com/eclipse-birt/birt/issues/660