티스토리 뷰

평소에 이클립스 내의 서버만 이용해서 톰캣을 잘 쓰지 않았다.

오랜만에 톰캣을 켜보니 기존에 잘 돌아가던 프로젝트도 404 코드를 보이며 실행되지 않았다.

들어갈 수 있는건 아파치에서 제공하는 기본페이지 와 /example, /manager 뿐이었다. 



* 환경

- Windows 7

- Tomcat 7.0.27

- JDK 1.8.0



* 오류 로그

... 생략

Caused  by: org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 15

at org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:131)

at org.apache.tomcat.util.bcel.classfile.ConstantPool.<init>(ConstantPool.java:60)

at org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:209)

... 생략



* 원인


- https://bz.apache.org/bugzilla/show_bug.cgi?id=57173#c16

https://www.mkyong.com/tomcat/tomcat-7-java-8-invalid-byte-tag-in-constant-pool-15/

톰캣 자체 버그로 보는 의견


http://stackoverflow.com/questions/23541532/org-apache-tomcat-util-bcel-classfile-classformatexception-invalid-byte-tag-in

자바 1.8과  tomcat 7 의 충돌로 보는 의견


http://stackoverflow.com/questions/6751920/tomcat-7-servlet-3-0-invalid-byte-tag-in-constant-pool/12730059#12730059

설정 문제로 보는 의견

오류가 나는 프로젝트의 web.xml 의 <web-app> 요소에 metadata-complete="true" 를 설정하라고 함.




* 해결방법 - 자바 버전 변경 시도 [실패]


- http://dogcowking.tistory.com/42

위 내용 참고하여 자바 버전을 1.7로 변경해봤으나 아무런 반응 없었음.




* 해결방법 - web.xml 설정 변경

오류가 나는 프로젝트의 web.xml 의 <web-app> 요소에 metadata-complete="true" 를 설정


<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"

metadata-complete="true">


- 성공함.




* 해결방법 - 톰캣 업데이트 


- 시도해보지 않음



* Apache-tomcat 7 과 Java 8 의 호환이 안 되는 다른 문제가 생겼음

http://dogcowking.tistory.com/44







공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함