오류내용

Caused by: org.springframework.data.mapping.PropertyReferenceException: No property

 

해결

JpaRe, Custom, Jpa Imple 파일명이 달라서 생긴 문제였다.

 

오류내용

mybatis에서 문자열 비교를 할때 같음을 아래와 같이 작성했을때 다다음과 같은 오류가 발생하였다.

<choose>

   <when test="salesType == 'B'">

     AND b.country = 'KR'

   </when>

   <when test="salesType == 'C'">

AND b.country &lt;&gt; 'KR'

   </when>

   <otherwise> AND 1=1 </otherwise>

/choose>

### Error querying database.  Cause: java.lang.NumberFormatException: For input string: "A"

### Cause: java.lang.NumberFormatException: For input string: "A"] with root cause

java.lang.NumberFormatException: For input string: "A"


해결

<choose>

<when test="salesType.equalsIgnoreCase('B')">

      AND b.country = 'KR'

</when>

<when test="salesType.equalsIgnoreCase('C')">

 AND b.country &lt;&gt; 'KR'

</when>

<otherwise> AND 1=1 </otherwise>

</choose>

ms-sql이라 equalsIgnoreCase를 사용했고 oracle이었으면 equals를 썼을듯.


오류내용

STS에서 Server를 실행하려고 하니 아래와 같은 에러가 발생하며 시작하지 않았다.

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0


해결

메이븐이 시스템변수에 등록되어 있다면 cmd창에서 아래와 같이 입력한다.

# Java 7

set MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=128m


# Java 8

set MAVEN_OPTS=-Xmx512m

메이븐이 시스템변수에 등록되어있지 않다면 아래와 같이 환경변수를 저장한다.

# Java 7

MAVEN_OPTS -Xmx512m -XX:MaxPermSize=128m


# Java 8

MAVEN_OPTS -Xmx512m


출처1: http://stackoverflow.com/questions/22634644/java-hotspottm-64-bit-server-vm-warning-ignoring-option-maxpermsize

출처2: http://freeism.web-bi.net/tc/665

오류내용

net.sf.json.JSONObject 를 사용하는데, 콘솔에서는 한글이 깨지지 않지만 한글이 ? 로 나오는 상황이 발생



해결

json 출력 상단에 아래의 문장을 추가했다.

response.setCharacterEncoding("UTF-8");





+ Recent posts