在eclipse3.4里面装了个Ibator1.2插件生成代码,结果发现一直报“Unexpected error while running Abator
. / by zero
” 这个错误, google了一把,发现官方解释是没有能找到<table>元素指定的表。
苦于插件形式看不到真正的日志,去官方下了ibator.jar ,采用命令行格式调试,并输出日志:
java -jar ibator.jar -configfile ibatorConfig.xml -overwrite >>log.log
仔细观察log日志后发现, 在talbe里面指定Mysql5的schema
<table schema="b2cdb" tableName="t_comm_guestbook">
则无论如何都会报错
Table configuration with catalog null, schema null, and table t_comm_guestbook did not resolve to any tables
好像schema元素有bug,于是修改:
1.将connectionURL="jdbc:mysql://172.25.34.85:3306"改成
connectionURL="jdbc:mysql://172.25.34.85:3306/b2cdb"
直接在url指定schema
2.table元素跳过使用shema,直接配置成<table tableName="t_comm_guestbook">
3.运行通过ibator finshed successfully。
下面再来说Nullpoint错误
配置了<sqlMapGenerator>和
<javaModelGenerator>属性之后,如果不配置
<daoGenerator>就会抛一个奇怪的Nullpoint
异常,无法定位。也不知道为什么会这样。。
总之,ibator1.2远远不够稳定,真不知道为什么官方那么强烈推荐升级到1.2
分享到:
相关推荐
iBATOR is a code generator for iBATIS.
Ibator is a code generator for iBATIS. Ibator will introspect a database table (or many tables) and will generate iBATIS artifacts that can be used to access the table(s). This abates some of the ...
ibator插件优化的jar包,安装完ibator后,将eclipse\plugins\org.apache.ibatis.ibator.core_1.2.1下的jar包替换即可。
ibator1.2.2多了点功能,具体可以百度,重新编译了下,生成注释去掉了
eclipse的集成插件,ibator.jar,可以直接mybatis导表,图形化展示,简单易用,直接放到eclipse的plugin文件夹下即可
使用数据库的注释,不用自带的注释 http://blog.csdn.net/tiantangpw/article/details/43489817 运行命令 java -jar ibator.jar -configfile ibatorConfig.xml -overwrite >>ibator.log
ibator教学视频,手把手教你使用ibator
在myelipse7.5中安装ibator插件的方法与安装一般插件的方法是一致的,有以下2种方式(个人推荐使用手动安装方式,避免网络等原因造成安装不成功): 1. 手动安装方式 将邮件中附件的Ibator插件压缩文件IbatorForEclipse...
eclipse的ibatis代码生成器,最新版ibator 1.2.1
ibator相对于hibernate框架能完全自主编写sql代码,同时又有hibernate便于管理的优点,是非常理想的持久层技术
做SSI项目时,Ibator映射出来的内容实在太多了,有很多内容都用不上,参考Ibator的结构,实现对基本字段和方法的映射!
ibator-config_1_1.dtd ibator用
自动生成dto\dao\xml 自带批处理自动生成程序
此项目通过对ibator的改造,通过执行cmd命令自动生成sql与Dao,大大提高开发效率
Ibatis 生成器 Ibator 的 API 文档
ibator插件+ibatorConfig文件,加入到eclipse中,按照配置文件修改一下就ok了
ibatis 配置文件自动生成工具
去除了注释、去除Example方法及去除生成的id前面的“ibatorgenerated_”
用户ibatis自动成才代码的一种工具,减少开发人员的工作量。
直接丢到eclipse的plugins目录下就可以了,在一些公司下载不了的地方,方便使用