빵구의 개발 메꾸기

Tomcat 구동 시 Invalid byte tag in constant pool: 19 에러 해결 본문

BACK-END/SPRING

Tomcat 구동 시 Invalid byte tag in constant pool: 19 에러 해결

bkjo94 2022. 5. 4. 23:58

Tomcat에 스프링(Spring) 프로젝트를 올리고 구동을 시켰는데 다음과 같은 에러가 발생했다.

[ERROR] org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19 

원인은 Tomcat 버전과 pom.xml의 dependency에 넣어준 jar 파일의 버전이 맞지 않아서 생긴 에러였다.

오류 발생 과정과 해결 방법은 다음과 같다.

 

 

① 기존에 pom.xml의 dependency에 넣어준 jar 파일의 버전이다.

② 서버를 구동시켰으나 다음과 같은 에러가 발생했다. 

    [ERROR] org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19 

③ Tomcat 버전과 jar 파일의 호환이 맞지 않아서 발생한 문제임을 확인하고 jar 파일의 버전을 낮추고 서버를

    재구동했더니 에러 없이 정상적으로 서버가 올라갔다.

 

 

 

Comments