[에러] type parameters of <0> cannot be determined; no unique maximal instance exists for type variable T with upper bounds int,java.lang.Object
type parameters of <0> cannot be determined; no unique maximal instance exists for type variable T with upper bounds int,java.lang.Object
인텔리제이에서 빌드 시 위와 같은 에러가 떳다..
아래 블로그 대로 (Integer) 붙여주니 해결됨. 나도 count 쿼리 였음...자바 버그란다..
==================================================
내 이클립스에서는 분명 빌드도 잘되고, 톰캣도 잘 뜨는데
울회사 서버에 배포할 때 계속 빌드 실패...
에러 문구는 아래와 같았다.
type parameters of T cannot be determined; no unique maximal instance exists for type variable T with upper bounds int,java.lang.Object |
뭔소린진 알겠는데 뭘 어쩌란건지 모르겠었음 도무지 ㅋㅋㅋㅋ
이클립스에서 워닝도 안떴고 도저히 모르다가
겨우 찾음
난 myBatis를 쓰고 있는데
count를 해오는 쿼리가 있었다.
저 밑에 빨간색으로 표시한 Integer로 캐스팅하는게 빠져서 에러가 났던거였다.
public Integer selectCount(Integer id) { return (Integer) sqlSessionTemplate.selectOne(NAMESPACE + "selectCount"); } |
자바의 버그라고 함
출처: https://marobiana.tistory.com/110 [Take Action]