티스토리 뷰

* 환경

Spring 3

Hibernate 3

MariaDB 10.2



*

 SQL Error: 0, SQLState: S1000

 Unknown initial character set index '255' received from server. Initial client character 

set can be forced via the 'characterEncoding' property.


또는

...


Cause: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown initial character set index '255' received from server. Initial client character set can be forced via the 'characterEncoding' property.)






* 해결안1] JDBC 오류


https://confluence.atlassian.com/confkb/unknown-character-set-index-error-thrown-when-upgrading-697139826.html



mysql-connector-java 5.1.15  에서 5.1.46 으로 변경 후 해결됨..



- 8.0.11 로 바꾸면 오히려 오류 발생. 

java.lang.ClassNotFoundException: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException


- 5.1.6 에서도 동일 문제에서 5.1.46 (또는 5.1.48) 로 낮춰서 해결

https://stackoverflow.com/questions/50855622/unknown-initial-character-set-index-255-received-from-server



* 해결2] properties 사용중 & 문자치환 문제

- 190419 추가

properties 에 DB URL 표현시

& 는 XML 에 쓸때 사용되는 것이므로  

& 가 아닌 & 사용해야 함


참고 : 

https://dogcowking.tistory.com/242


이걸 잘 못 쓸때에도 상기 오류 발생함.

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2024/05   »
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 29 30 31
글 보관함