Programing

Programing/Errors

[MyBatis] Cause: java.lang.NumberFormatException: For input string: "Y"

java.lang.NumberFormatException: For input string: "Y" There was an unexpected error (type=Internal Server Error, status=500). nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.lang.NumberFormatException: For input string: "Y" ### Cause: java.lang.NumberFormatException: For input string: "Y" MyBatis에서 if문 사용 중 위와 유사한 에러가 발생하는 경우가 있다. ..

Programing/Errors

[MyBatis] Cause: java.sql.SQLSyntaxErrorException: ORA-00933: SQL 명령어가 올바르게 종료되지 않았습니다

Cause: java.sql.SQLSyntaxErrorException: ORA-00933: SQL 명령어가 올바르게 종료되지 않았습니다 ; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00933: SQL 명령어가 올바르게 종료되지 않았습니다 ] with root cause oracle.jdbc.OracleDatabaseException: ORA-00933: SQL 명령어가 올바르게 종료되지 않았습니다 MyBatis에서 쿼리문 작성 시, 쿼리문 마지막에 세미콜론(;)을 붙이면 위와 같은 오류가 발생한다. 에러 파일 경로는 쿼리문에 담겨있는 .xml 파일 경로로 뜰 것이다. 쿼리문을 아래와 같이 작성하였기 때문에..

Programing/Errors

[MyBatis] Could not resolve type alias ''

Could not resolve type alias '' insert 문에서 parameterType을 Member로 설정해주었는데 엄청난 오류가 떴다. 오류 멈춰! 평소와 같이 DTO 역할을 하는 클래스명을 썼고, 파일도 잘 생성되어 있는데 왜 그런가 했더니 alias(별칭) 설정을 해주지 않아서였다. 사실 이것도 별칭을 왜 설정하지? 알아서 찾아가 주는 거 아닌가?라고 처음에 생각했었지만... ㅎㅅㅎ application.properties mybatis.type-aliases-package=com.example.domain 위와 같이 properties 파일에서 별칭 설정을 하여 패키지 명을 명시해주어야 한다. 별칭으로 명시해주면 자동으로 해당 패키지로 들어가 패키지 안에 있는 클래스를 찾아준다. ..

Programing/Errors

[Spring] Consider defining a bean of type 'Service' in your configuration.

Consider defining a bean of type 'Service명' in your configuration. @Service 어노테이션을 명시해주지 않아서 발생한 오류 이리저리 유사 코드를 복사하고, 기능 분리를 위해 파일을 나누고 하다 보면 이런 일이 비일비재하게 발생한다. 위와 같은 bean 타입을 찾지 못했다는 오류가 발생하면 어노테이션 먼저 확인해볼 것

밈아
'Programing' 카테고리의 글 목록 (2 Page)