本帖最后由 wang_xiaoxin 于 2010-05-21 14:28:30 编辑

解决方案 »

  1.   

    映射文件User1.hbm.xml有问题Caused by: org.dom4j.DocumentException: Error on line 1 of document : White space is required between the processing instruction target and data. Nested exception: White space is required between the processing instruction target and data.
    好好查查。
      

  2.   

    DDL语句如下CREATE TABLE `user1` (
      `ID` bigint(20) NOT NULL AUTO_INCREMENT,
      `name` varchar(20) NOT NULL,
      `age` int(11) DEFAULT NULL,
      PRIMARY KEY (`ID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;看不出User1.hbm.xml哪里出错了