본문 바로가기
오류 모음

OGNL(객체 그래프 탐색 언어) 표현식 구문 오류

by sgyeong 2024. 10. 28.
심각: Servlet.service() for servlet [action] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression '오류 구문' Cause: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression '오류 구문' [org.apache.ibatis.ognl.ParseException: Encountered "<EOF>" at line 1, column 123.
Was expecting one of:
    "," ...
    "=" ...
    "?" ...
    "||" ...
    "or" ...
    "&&" ...
    "and" ...
    "|" ...
    "bor" ...
    "^" ...
    "xor" ...
    "&" ...
    "band" ...
    "==" ...
    "eq" ...
    "!=" ...
    "neq" ...
    "<" ...
    "lt" ...
    ">" ...
    "gt" ...
    "<=" ...
    "lte" ...
    ">=" ...
    "gte" ...
    "in" ...
    "not" ...
    "<<" ...
    "shl" ...
    ">>" ...
    "shr" ...
    ">>>" ...
    "ushr" ...
    "+" ...
    "-" ...
    "*" ...
    "/" ...
    "%" ...
    "instanceof" ...
    "." ...
    "(" ...
    ")" ...
    "[" ...
    <DYNAMIC_SUBSCRIPT> ...
    ]] with root cause

 

 

위와 같은 경우 괄호 쌍이 맞지 않아 오류가 난 케이스였다.

 

 

해결 방법 

 

1) 괄호 쌍 확인

2) 연산자 및 구문 확인 (표현식에서의 올바른 논리연산자, 비교연산자 사용)

3) 정리된 표현식 작성 (표현식 간소화)