beepbeep

오늘의 오류 본문

오류 기록장

오늘의 오류

삑삑도요 2022. 10. 26. 00:44

2022.11.01

문제 1 : pom.xml line1 maven configuration error

- 프로그램 : spring

- 발생 시점 : 파일 복사 - 붙여넣기 후

- 증상 : 서버 실행 시 컨트롤러 충돌 오류와 함께 서버가 실행되지 않음

- 오류 코드 : 

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [spring/appServlet/servlet-context.xml]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'mainController' for bean class [경로.main.controller.MainController] conflicts with existing, non-compatible bean definition of same name and class [경로.MainController]
	org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:417)

- 해결 여부 : O (11.01)

- 해결 방법 : maven update 후 해결됨

 

2022.11.03

문제 : bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00936: missing expression

- 프로그램 : spring

- 발생 시점 : 프로그램 실행 후

- 증상 : sql문 실행 시 발생

- 오류 코드: 위와 동일

- 해결 여부 : O

- 해결 방법 : mapper에 작성된 sql문 문법 확인( , 가 하나 더 있었음)

 

2022.11.04

문제 : conflicts with existing, non-compatible bean definition of same name and class

- 프로그램 : spring

- 발생 시점 : 프로그램 실행 후

- 증상 : 서버 실행 불가

- 오류 코드 : org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'Controller이름' for bean class [Controller 경로] conflicts with existing, non-compatible bean definition of same name and class [Controller 경로]

- 해결 여부 : O

- 해결 방법 : clean, tomcat clean 후 재실행

 

문제2 : Mapped Statements collection does not contain value for postMapper.postList

- 프로그램 : spring

- 발생 시점 : SQL문 실행 시점

- 증상 : SQL문 실행 불가

- 오류 코드 : Mapped Statements collection does not contain value for postMapper.postList...

- 해결 여부 : O

- 해결 방법 : mybatis-config.xml에 mapper 파일 등록(작성)함

 

2022.11.10

문제1 : error 406 Could not find acceptable representation

- 프로그램 : spring

- 발생 시점 : ajax 이용해서 데이터 교환 시도

- 증상 : ajax 안됨

- 오류 코드 : org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation

- 해결 여부 : O

- 해결 방법 : jackson bind dependeny를 추가, 또는 오타 확인(success 등)

    <!-- jackson bind -->
    <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
    <dependency>
       <groupId>com.fasterxml.jackson.core</groupId>
       <artifactId>jackson-databind</artifactId>
       <version>2.9.8</version>
    </dependency>

 

2022.11.20

 

문제1 : WebFilter cannot be resolved to a type

- 프로그램 : spring

- 발생 시점 : 필터 파일 작성 중

- 증상 :  @WebFilter 적용이 안됨

- 오류 코드 : WebFilter cannot be resolved to a type

- 해결 여부 : O

- 해결 방법 : Project Facets에서 dynamic web module 버전 확인(최소 3.0 이상)

 

2022.11.27

 

문제1 : Could not set parameters for mapping

- 프로그램 : spring

- 발생 시점 : 프로그램 시작

- 증상 : 실행 불가

- 오류 코드 :

Could not set parameters for mapping: ParameterMapping{property='typeCode', mode=IN, javaType=class java.lang.String, jdbcType=null, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap')]을(를) 발생시켰습니다.

- 해결 여부 : O

- 해결 방법 : mybatis mapper로 넘긴 파라미터와 parameterType이 다름