关于ibatorConfig.xml配置的错误!

关于ibatorConfig.xml配置的错误!

<abatorConfiguration >
  <abatorContext >
    <jdbcConnection driverClass="oracle.jdbc.OracleDriver" connectionURL="jdbc:oracle:thin:@xptest:1520:richlady" userId="aaa" password="123" >
      <classPathEntry location="D:/Project/lib/classes12.jar" />
    </jdbcConnection>

...................

 

这样写在点击“Generate Ibatis Artfacts”时候,出现错误,描述如下:
XML Parser Errors See Details for more Information  XML Parser Error on line 38: The content of element type "abatorContext" must match "(property*,commentGenerator?,jdbcConnection,javaTypeResolver?,javaModelGenerator,sqlMapGenerator,daoGenerator?,table+)".

 

 

其实解决问题很简单,关键是英文稍微好点就行了,而我居然花了很长时间,哎!

解决如下:

<classPathEntry location="D:/Project/lib/classes12.jar" />
这句话应该放在 <abatorContext > 的外面,而且必须得是前面,因为必须按他规定的顺序来放
"(property*,commentGenerator?,jdbcConnection,javaTypeResolver?,javaModelGenerator,sqlMapGenerator,daoGenerator?,table+)".

以上每个字段,位置不能错乱,得按顺序来,这样就不会出现问题了!! 

你可能感兴趣的:(oracle,xml,jdbc,ibatis)