2013-08-17 58 views
0

我使用這個XML文檔到一個特定的表加載到PostgreSQL數據庫:org.jumpmind.db.model.ModelException:未知的JDBC類型DATETIME

create_table.xml:

<?xml version="1.0"?> 
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database.dtd"> 
<database name="sample"> 
    <table name="Location"> 
     <column name="LocationID" type="INTEGER" primaryKey="true" /> 
     <column name="LocationModifyDate" type="DATETIME" required="true" /> 
    </table> 
</database> 

但是,當我加載它,我得到一個異常:

An exception occurred. Please see the following for details: 
------------------------------------------------------------------------------- 
org.jumpmind.db.model.ModelException: Unknown JDBC type DATETIME 
    at org.jumpmind.db.model.Column.setMappedType(Column.java:283) 
    at org.jumpmind.db.io.DatabaseXmlUtil.nextTable(DatabaseXmlUtil.java:202) 
    at org.jumpmind.symmetric.io.data.reader.XmlDataReader.readNext(XmlDataReader.java:139) 
    at org.jumpmind.symmetric.io.data.reader.XmlDataReader.open(XmlDataReader.java:75) 
    at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:84) 
    at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:78) 
    at org.jumpmind.symmetric.io.data.DbImport.importTablesFromXml(DbImport.java:208) 
    at org.jumpmind.symmetric.io.data.DbImport.importTables(DbImport.java:154) 
    at org.jumpmind.symmetric.DbImportCommand.executeWithOptions(DbImportCommand.java:188) 
    at org.jumpmind.symmetric.AbstractCommandLauncher.execute(AbstractCommandLauncher.java:130) 
    at org.jumpmind.symmetric.DbImportCommand.main(DbImportCommand.java:72) 

我使用加載XML文件的命令是這樣的:

../bin/dbimport --engine corp-000 -format XML create_table.xml 

如果我使用INTEGER而不是DATETIME,XML文件被正確處理並創建表。

這個例外是什麼意思?也許我必須使用JDBC標準數據類型?

回答