Table configuration with catalog null, schema orcl, and table ORDERS did not resolve to any tables
来源:互联网 发布:电脑录音软件下载 编辑:程序博客网 时间:2024/05/19 12:18
问题:
Tableconfiguration with catalog null, schema orcl, and table ORDERS did not resolveto any tables
MyBatisGenerator finished successfully, there were warnings.
原因:
1. jdbc:oracle:thin:@11.22.22.22:1521:orcl
oracle配置的是":"
2. <jdbcConnectiondriverClass="com.mysql.jdbc.Driver"connectionURL="jdbc:Mysql://localhost:3306/DB?characterEncoding=utf8" />
3. <tabletableName="orders"domainObjectName="Orders"
enableInsert="true"
enableCountByExample="false"enableUpdateByExample="false"enableDeleteByExample="false"
enableSelectByExample="false"selectByExampleQueryId="false">
</table>
表名配置错误
问题: 去掉Example,没用看着也乱
<!-- tableName:用于自动生成代码的数据库表;domainObjectName:对应于数据库表的javaBean类名 --><table tableName="orders" domainObjectName="Orders"enableInsert="true" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"> </table>
正常配置
<?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 location="C:\DingSai\Work\lib_source\ojdbc14.jar" /><context id="DB2Tables" targetRuntime="MyBatis3"><commentGenerator><property name="suppressAllComments" value="true" /><!--数据库连接的信息:驱动类、连接地址、用户名、密码 --></commentGenerator><jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"connectionURL="jdbc:oracle:thin:@10.199.xx.xx:1521:orcl" userId="xx"password="xx"></jdbcConnection><!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer true,把JDBC DECIMAL 和 NUMERIC 类型解析为java.math.BigDecimal --><javaTypeResolver><property name="forceBigDecimals" value="false" /></javaTypeResolver><!-- targetProject:自动生成代码的位置 --><javaModelGenerator targetPackage="com.soft.model"targetProject="c:\src"><!-- enableSubPackages:是否让schema作为包的后缀 --><property name="enableSubPackages" value="true" /><!-- 从数据库返回的值被清理前后的空格 --><property name="trimStrings" value="true" /></javaModelGenerator><!--生成SQLMAP文件 --><sqlMapGenerator targetPackage="com.soft.model"targetProject="c:\src"><property name="enableSubPackages" value="false" /></sqlMapGenerator><!--生成Dao文件 可以配置 type="XMLMAPPER"生成xml的dao实现 ANNOTATEDMAPPER生成的对象是 MyBatis 3.x 映射器基础结构的 Java接口。 这些接口将会基于注解和 MyBatis 3.x SqlProviders。不会有XML文件生成。(注:就是纯接口使用注解的形式,不会有XML文件)ANNOTATEDMAPPER 依赖 MyBatis 3.0.4 或更高版本。;MIXEDMAPPER生成的对象是 MyBatis 3.x 映射器基础结构的 Java接口。 这些接口将基于注解和XML的混合形式。 注解将会用在简单注解可以实现的地方。 此客户端不会生成SqlProvider,所有复杂的动态SQL都会生成在XML中。The MIXEDMAPPER 依赖 MyBatis 3.0.4 或更高版本。;XMLMAPPER生成的对象是 MyBatis 3.x 映射器基础结构的 Java接口。 这些接口将会依赖于生成的XML文件。; --><javaClientGenerator type="XMLMAPPER"targetPackage="com.soft.model" targetProject="c:\src"><property name="enableSubPackages" value="false" /></javaClientGenerator><!-- tableName:用于自动生成代码的数据库表;domainObjectName:对应于数据库表的javaBean类名 --><table tableName="orders" domainObjectName="Orders"enableInsert="true" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"> </table></context></generatorConfiguration>
I.执行命令
java -jar C:\DingSai\Work\workspace8.5\apiportal\lib\mybatis-generator-core-1.3.2.jar -configfile C:\DingSai\Work\study\dubbo_project\edu-service-user\src\main\java\generatorConfig.xml -overwrite
全部资源下载地址:http://download.csdn.net/detail/dingsai88/9503305
- Table configuration with catalog null, schema orcl, and table ORDERS did not resolve to any tables
- Mybatis generator,Table configuration with catalog null, schema null
- Table configuration with catalog null, schema null错误的一个原因
- oracle 生成对应文件时报错 Table configuration with catalog null, schema null...
- generator自动生成mybatis配置和类信息报Table configuration with catalog null错误
- [解决方法]org.dbunit.dataset.NoSuchTableException: Did not find table 'tab1' in schema 'null'
- ORA-31603: object "orders" of type TABLE not found in schema "SYSTEM"
- Yii: MySql - Table 'card' was not locked with LOCK TABLES
- 错误代码: 1100 Table 't_depart_info' was not locked with LOCK TABLES
- one method to resolve table cell can not be selected
- Temporary Tables and Table Variable
- Commit failed with error: did not match any file(s) known to git. 解决办法
- 34.You created an ORDERS table with the following description:
- 165.You have an ORDERS table with the following structure:
- ERROR 1100 (HY000): Table 't1' was not locked with LOCK TABLES
- 2 Tables and Table Clusters读书笔记
- Database catalog and schema
- (OK) Problem With Android Configuration - routing table
- 微信第三方登录
- java事物隔离性和传播
- 关于content=”IE=edge,chrome=1″介绍-让网页优先采用Chrome渲染
- 如何在activity中隐藏导航栏
- java.io.File.deleteOnExit()-生成临时文件,删除临时文件
- Table configuration with catalog null, schema orcl, and table ORDERS did not resolve to any tables
- iOS 开发谨慎使用成员变量
- 关于IOS获取本地通讯录信息(包含iOS9.0前后)
- 使用Nexus2.x为Maven3.x搭建私服构件仓库-----学习笔记
- org.apache.catalina.startup.Catalina stopServer 的解决办法
- nginx添加ip访问频率限制
- 设计模式学习笔记
- 闪屏界面的实现分析
- cf665e.cpp 01 trie树求抑或