■■■ Develop ■■■/[ Server ]

[ Eclipse ] - 1은(는) 1바이트 UTF-8 시퀀스에 대해 부적합한 바이트입니다.

시드라엘 2015. 8. 11. 09:16

제목 : [ Eclipse ] - 1은(는) 1바이트 UTF-8 시퀀스에 대해 부적합한 바이트입니다.



설명 : 

콘솔에 *.xml 에대하여 1은(는) 1바이트 UTF-8 시퀀스에 대해 부적합한 바이트입니다. 오류가 발생하는데. 

해당 파일을 열어서 ( 소스말고 컴파일된것 ) 확인해보면 한글이 깨져있고. 에디터플러스로 열어보면 ansi로 열릴것이다.



[10:30:06.406] [localhost-startStop-1] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.initialize 165 | Initializing ExecutorService 'taskExecutor' [10:30:06.407] [localhost-startStop-1] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker.postProcessAfterInitialization 309 | Bean 'taskExecutor' of type [class org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) [10:30:06.849] [localhost-startStop-1] INFO org.springframework.ws.soap.saaj.SaajSoapMessageFactory.afterPropertiesSet 139 | Creating SAAJ 1.3 MessageFactory with SOAP 1.1 Protocol [10:30:06.972] [localhost-startStop-1] INFO org.springframework.beans.factory.config.PropertiesFactoryBean.loadProperties 172 | Loading properties file from class path resource [ -- 안알려줌 -- /config.xml] [10:30:07.380] [localhost-startStop-1] WARN org.springframework.web.context.support.XmlWebApplicationContext.refresh 487 | Exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cmnClientInterceptor' defined in file [D:\ -- 안알려줌 -- \app-client.xml]: Cannot resolve reference to bean 'keyMngService' while setting bean property 'keyMngService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'keyMngService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'logSqlSession' defined in file [D:\ -- 안알려줌 -- \app-datasource.xml]: Cannot resolve reference to bean 'logSqlSessionFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'logSqlSessionFactory' defined in file [D:\ -- 안알려줌 -- \app-datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\ -- 안알려줌 -- \CodeMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 1은(는) 1바이트 UTF-8 시퀀스에 대해 부적합한 바이트입니다. at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359) ~[spring-beans-4.1.2.RELEASE.jar:4.1.2.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108) ~[spring-beans-4.1.2.RELEASE.jar:4.1.2.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1471) 




사용법 및 예제 : 


적용법

이클립스 바로가기 -> 마우스 우클릭 -> 속성 -> 파일위치열기 -> eclipse.ini -> -Dfile.encoding=UTF-8  추가

톰켓 클린 -> 프로젝트 클린 -> 재구동 -> -Dfile.encoding=UTF-8  제거


-Dfile.encoding=UTF-8  를 제거하는 이유는 이클립스에 프로젝트가 여러개일경우 강제로 인코딩이 변경되므로 다른 인코딩을 사용하기위해






경험 : 

가끔 세팅을 바꾸거나 첫 세팅을 했을경우. 혹은 A 프로젝트에 페어런트 프로젝트가 있을경우 혹은 컴파일상태가 메롱하다고 느껴졌을경우.


분명 프로젝트랑 모든 세팅은 UTF-8로 되어있지만 이클립스 -> 톰켓 , 톰켓 -> 컴파일 구간중 어디가 문제인지 모르겠지만

UTF-8 -> ANSI 로 변경이 일어나면서 한글이 깨지는것.

 



검색단어 : 1은(는) 1바이트 UTF-8 시퀀스에 대해 부적합한 바이트입니다.