기록
Home
  • 분류 전체보기 (187)
    • Programming (109)
      • JAVA (15)
      • Javascript (0)
      • 데이터베이스 (8)
      • React (7)
      • 프레임워크 (1)
      • Spring (11)
      • 웹(Web) (4)
      • 운영체제 (5)
      • 서버&네트워크 (6)
      • 자료구조 (0)
      • 알고리즘 (1)
      • 형상관리 (0)
      • 에러노트 (35)
      • 개발 툴 (15)
      • TEMP. (1)
    • Project (0)
      • 트러블슈팅 (0)
    • Personal (2)
      • 리뷰 (1)
      • 업무 (0)
    • Course (73)
      • 모든 개발자를 위한 HTTP 웹 기본 지식 (1)
      • 스프링 핵심 원리 - 기본편 (51)
      • 자바 ORM 표준 JPA 프로그래밍 - 기본편 (21)
    • TEMP (0)
Home
  • 분류 전체보기 (187)
    • Programming (109)
      • JAVA (15)
      • Javascript (0)
      • 데이터베이스 (8)
      • React (7)
      • 프레임워크 (1)
      • Spring (11)
      • 웹(Web) (4)
      • 운영체제 (5)
      • 서버&네트워크 (6)
      • 자료구조 (0)
      • 알고리즘 (1)
      • 형상관리 (0)
      • 에러노트 (35)
      • 개발 툴 (15)
      • TEMP. (1)
    • Project (0)
      • 트러블슈팅 (0)
    • Personal (2)
      • 리뷰 (1)
      • 업무 (0)
    • Course (73)
      • 모든 개발자를 위한 HTTP 웹 기본 지식 (1)
      • 스프링 핵심 원리 - 기본편 (51)
      • 자바 ORM 표준 JPA 프로그래밍 - 기본편 (21)
    • TEMP (0)
블로그 내 검색

기록

  • Programming/에러노트

    [Spring Framework/Junit] java.lang.NoClassDefFoundError: javax/servlet/SessionCookieConfig / Missing artifact javax.servlet:servlet-api:jar:3.1.0

    2022. 3. 10.

    by. 개발도비

    2021.5.15 작성

    JUnit으로 테스트를 하는데  java.lang.NoClassDefFoundError: javax/servlet/SessionCookieConfig 라는 오류가 발생할 때

     

    pom.xml의 Servlet 라이브러리로 가서 버전을 확인한다

    Spring legacy Project를 생성하면 servlet-api의 버전이 자동으로 2.5로 설정되는데 3.1 하위 버전으로는 SessionCookieConfig 클래스를 찾지 못 한다고 한다 

    버전을 3.1 이상으로 바꿔준다(나는 일단 3.1버전으로 줬는데 그 이상의 상위버전도 문제없이 호환되는 것을 확인했다)

     

    버전 변경을 해주니 이번에는 Missing artifact javax.servlet:servlet-api:jar:3.1.0 이라는 에러가 뜬다 

     

    기존의 artifactId도 변경해주어야 한다. 

    javax를 추가해준다 (servlet-api -> javax.servlet-api)

    'Programming > 에러노트' 카테고리의 다른 글

    [Mybatis/MySQL] Data truncation: Truncated incorrect DOUBLE value 에러 해결 방법(org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: )  (0) 2022.03.10
    [MySQL/Workbench] Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect.  (0) 2022.03.10
    [Spring Framework/Junit] java.lang.IllegalStateException: Failed to load ApplicationContext  (0) 2022.03.10
    [Spring Framework/MySQL] Public Key Retrieval is not allowed  (0) 2022.03.10
    [GIT] 원격 저장소에 push가 안 될 때 (Updates were rejected because the remote contains work that you do / Updates were rejected because the tip of your current branch is behind)  (0) 2022.03.10

    댓글

    관련글

    • [Mybatis/MySQL] Data truncation: Truncated incorrect DOUBLE value 에러 해결 방법(org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: ) 2022.03.10
    • [MySQL/Workbench] Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect. 2022.03.10
    • [Spring Framework/Junit] java.lang.IllegalStateException: Failed to load ApplicationContext 2022.03.10
    • [Spring Framework/MySQL] Public Key Retrieval is not allowed 2022.03.10
    맨 위로
전체 글 보기
Tistory 로그인
Tistory 로그아웃
로그아웃 글쓰기 관리

Today

Total

Powered by ⓒ Kakao Corp.

Designed by Nana
블로그 이미지
개발도비

티스토리툴바