Generator automatic generation of MyBatis configuration and Class Information report table configuration with catalog null error

Source: Internet
Author: User
Tags generator numeric

Generator automatic generation of MyBatis configuration and class information


I use the command at the time of the test. The following error occurred


C:\users\xa>java-jar E:\mybatis-generator-core-1.3.1.jar-configfile D:\Workspaces\MyEclipse10\risenetba\src\ Generator.xml-overwrite
Table configuration with catalog null, schema Orclba, and table Zwdt_zidian didn't resolve to any tables

MyBatis Generator finshed successfully, there were warninigs.


The following is a Generator.xml file

<?xml version= "1.0" encoding= "UTF-8"?> <! DOCTYPE generatorconfiguration Public "-//mybatis.org//dtd mybatis Generator Configuration 1.0//en" "Http://mybatis. Org/dtd/mybatis-generator-config_1_0.dtd "> <generatorConfiguration> <!--classpathentry: Database JDBC-driven jar package address--<classpathentry location= "D:\Workspaces\MyEclipse10\risenetba\defaultroot\WEB-INF\lib \ojdbc14.jar "/> <context id=" db2tables "targetruntime=" MyBatis3 "> <commentGenerator> <!--removal of automatic Note true: Yes: false: No--<property name= "suppressallcomments" value= "true"/> <!--database connection information: Driver class, connection address, user name , password--</commentGenerator> <jdbcconnection driverclass= "Oracle.jdbc.driver.OracleDriver" Connectionurl  = "Jdbc:oracle:thin: @xx. Xx.x.xxx:1521:xx" userid= "xx" password= "1" > </jdbcConnection> <!--default false, the JDBC The decimal and NUMERIC types resolve to Integer true to resolve the JDBC decimal and NUMERIC types to Java.math.BigDecimal and <javatyperesolver> <property name= "forcebigdecimals" value= "false"/> </javaTypeResolver> <!--targetproject: Auto Generation generation Code Location--<javamodelgenerator targetpackage= "Xgw.model" targetproject= "D:\Workspaces\MyEclipse10\risenetba\
			src "> <!--enablesubpackages: Do you want the schema to be the suffix of the package--<property name=" Enablesubpackages "value=" false "/>

		<!--the value returned from the database is cleared before and after the space-<property name= "Trimstrings" value= "true"/> </javaModelGenerator> <sqlmapgenerator targetpackage= "Xgw.sqlmap" targetproject= "D:\WORKSPACES\MYECLIPSE10\RISENETBA\SRC" > < Property Name= "Enablesubpackages" value= "false"/> </sqlMapGenerator> <javaclientgenerator type= "Xmlmapp ER "targetpackage=" xgw.mapping "targetproject=" D:\Workspaces\MyEclipse10\risenetba\src "> <property name=" Enablesubpackages "value=" false "/> </javaClientGenerator> <!--tableName: database table for automatic code generation ; Domainobjectname: JavaBean class name corresponding to database table---<table SchEma= "xx" tablename= "Zwdt_zidian" domainobjectname= "Zidian" enablecountbyexample= "true" enableupdatebyexample= "true "Enabledeletebyexample=" true "enableselectbyexample=" true "selectbyexamplequeryid=" true "> </table> </ Context> </generatorConfiguration>


Later, it is possible to remove the schema attribute from table.

After testing, if the database uses Oracle,sqlserver need to remove the schema attribute, MySQL does not need to remove



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.