Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- intellij
- R2DBC Paging
- 핀포인트
- OIDC
- RedirectService
- pinpoint 2.5.3
- 논블록킹 성능
- jar 배포
- 월급루팡 일지
- pinpoint
- reids
- Loki 로그
- LPOS
- fake jwt
- 노드간 통신
- 플루터
- 7879
- formik
- Ingress Controller Fake
- jsonMarshaller
- 오블완
- UnsupportedOperationException
- hbase 저장공간 설정
- Armeria
- save/update
- 애자일 싫타
- 개발 어렵당.ㅠ
- 티스토리챌린지
- ㅉ때
- nGinder
Archives
- Today
- Total
대머리개발자
간만에 mybatis 힘들구만 본문
728x90
해당 오류 한나절..에휴
### Cause: java.lang.UnsupportedOperationException
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:153)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)
proto를 빌드하면 자동으로 아래와 같이 빌드해준다. 배열의 초기값이 emptyList() 자동으로 빌드 해준다...변수명 끝에 밑줄 생기는것도 맘에 안들고...암튼..왜 이야기를 하나면... emptyList()로 초기화 하기되기 때문에 mybatis에서 바인딩이 안 된다. ㅠ
...
mobile_ = "";
type_ = 0;
roles_ = java.util.Collections.emptyList();
...
진짜 실제 해당 부분이 문제가 맞나 싶어서 일반 DTO를 만들어 동일한 객체(emptyList())로 설정해봤더니... ..어익후
그냥 List()로만 설정해줬어도... 자동으로 만들어주는 Grpc 객체를 재 사용할 수 있었는데;;;
내가 하고자 했던 부분은 association을 이용하는 부분이었다.
<resultMap id="userRoleMapper" type="userRole">
<result property="seq_" column="seq" javaType="java.lang.Integer"/>
<result property="roleName_" column="roleName" javaType="java.lang.String"/>
</resultMap>
<resultMap id="userMapper" type="oauth.user.UserGrpc$User">
<result property="uid_" column="uid" javaType="java.lang.String"/>
<result property="id_" column="id" javaType="java.lang.String"/>
<result property="name_" column="name" javaType="java.lang.String"/>
<association property="roles_" javaType="list" resultMap="userRoleMapper"/>
</resultMap>
위에서 이야기 했던것처럼 userMapper에 roles_가 바인딩이 안된다.
바인딩되는 DTO 객체를 별도로 만들기도 뭐하고..그냥 각각 DB 호출해서 merage했다.ㅠ
오류의 발생 지점
728x90
'개발이야기 > 예외' 카테고리의 다른 글
http1.1 get은 브라우저가 캐쉬를 하네.ㅎㄷㄷ (0) | 2023.11.01 |
---|---|
[레디스] ERR unknown command `LPOS` (0) | 2023.10.13 |
Jasypt 복호화 이슈 (In centos7) (0) | 2023.09.11 |
[코틀린] Could not autowire (0) | 2023.09.04 |
[코틀린] Ensure that xx.dto has a non-private no-argument constructor. (0) | 2023.04.18 |