2012-08-31 7 views
2

실패 내 XML 코드 :Liquibase 업데이트 내가</p> <p><a href="http://www.liquibase.org/quickstart" rel="nofollow">liquibase</a>에 빠른 다음 사용하고

내가 사용 명령 줄을 통해 Liquibase 실행할
<?xml version="1.0" encoding="UTF-8"?> 
<databaseChangeLog 
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog 
     http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd"> 

    <changeSet id="1" author="bob"> 
     <createTable tableName="department"> 
      <column name="id" type="int"> 
       <constraints primaryKey="true" nullable="false"/> 
      </column> 
      <column name="name" type="varchar(50)"> 
       <constraints nullable="false"/> 
      </column> 
      <column name="active" type="boolean" defaultValueBoolean="true"/> 
     </createTable> 
    </changeSet> 

</databaseChangeLog> 

"갱신"명령 .Liquibase 나에게이

를 알려줍니다
INFO 8/31/12 9:17 AM:liquibase: Successfully released change log lock 
Liquibase Update Failed: Content is not allowed in prolog. 
SEVERE 8/31/12 9:17 AM:liquibase: Content is not allowed in prolog. 
liquibase.exception.ChangeLogParseException: Error parsing line 1 column 1 of dat 
abase.xml: Content is not allowed in prolog. 
     at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXP 
arser.java:106) 
     at liquibase.Liquibase.update(Liquibase.java:107) 

내 업데이트 명령은

liquibase --driver=com.mysql.jdbc.Driver --classpath=mysql-connector-java-5.1.6.jar --changeLogFile=database.xml --url="jdbc:mysql://localhost:3306/sample" --username=root --password=password update 
입니다

어떻게해야합니까?

답변

2

XML 파일의 시작 부분에 여러 가지 숨겨진 문자 (예 : BOM, 자세한 내용은 google XML BOM)가 있기 때문일 수 있습니다.

This link은 BOM을 제거하는 방법을 보여줍니다.

Windows를 사용하는 경우 XVI32 (무료 16 진수 편집기)이 효과적입니다.

0

Liquibase JIRA issue

이 문제는 스키마 정의와 관련된를 참조하십시오 ... 주어진 링크의 첨부 파일의 예에서 스키마 정의를 시도

관련 문제