IS_AUTOINCREMENT and IS_GENERATEDCOLUMN Not Supported by Older JDBC Drivers #136

dai19470 opened this Issue Aug 20, 2016 · 3 comments


None yet

2 participants


1.when i user tool to generator entity,dao,then throw a exception:
G:\java\mybatis>java -jar mybatis-generator-core-1.3.4.jar -configfile generator
Config.xml -overwrite
java.sql.SQLException: 列名无效
at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.jav
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl
at oracle.jdbc.driver.OracleResultSet.getString(
at org.mybatis.generator.internal.db.DatabaseIntrospector.getColumns(Dat
at org.mybatis.generator.internal.db.DatabaseIntrospector.introspectTabl
at org.mybatis.generator.config.Context.introspectTables(
at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.
at org.mybatis.generator.api.MyBatisGenerator.generate(MyBatisGenerator.
at org.mybatis.generator.api.ShellRunner.main(
2.the config file is:

        <property name="suppressAllComments" value="false"/>

    <jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver" connectionURL="jdbc:oracle:thin:@" userId="platform" password="platform">
        <property name="forceBigDecimals" value="false"/>

    <javaModelGenerator targetPackage="com.joyintech.debt.dto" targetProject="src">
        <property name="enableSubPackages" value="true"/>
        <property name="trimStrings" value="true"/>

    <sqlMapGenerator targetPackage="" targetProject="src">
        <property name="enableSubPackages" value="true"/>

    <javaClientGenerator type="XMLMAPPER" targetPackage="com.joyintech.debt.mapper" targetProject="src">
        <property name="enableSubPackages" value="true"/>

    <table tableName="intd_project_approval" domainObjectName="IntdProjectApproval">


Can you post the SQL CREATE TABLE statement for intd_project_approval? This error seems to be related to delimited column names so I'd like to see how the columns are defined.

dai19470 commented Aug 20, 2016 edited

i also have a table named intd_project_approval,this is table :
id VARCHAR2(32) not null,
project_no VARCHAR2(50),
project_name VARCHAR2(100),
parent_id VARCHAR2(36),
issue_num VARCHAR2(36),
agency VARCHAR2(36),
dcr_name VARCHAR2(50),
releas_eperson VARCHAR2(200),
bond_type VARCHAR2(10),
first_consignee VARCHAR2(100),
second_consignee VARCHAR2(100),
publish_way VARCHAR2(5),
is_start VARCHAR2(2),
year VARCHAR2(4),
periods VARCHAR2(2),
reg_amount NUMBER(20,2),
benci_amount NUMBER(20,2),
bencibank_amount NUMBER(20,2),
bank_share NUMBER(20,2),
dead_line NUMBER(20),
units VARCHAR2(1),
nianhua_rate NUMBER(20,4),
follow_bank VARCHAR2(10),
rating_org VARCHAR2(32),
rating VARCHAR2(4),
bond_rate VARCHAR2(10),
assure_condition VARCHAR2(2000),
remark VARCHAR2(2000),
eftflag VARCHAR2(1),
stage_code VARCHAR2(15),
create_time TIMESTAMP(6),
create_user VARCHAR2(32),
update_time TIMESTAMP(6),
update_user VARCHAR2(32)


I see the issue. The generator is looking for some JSE 1.6 and JSE 1.7 features and the older Oracle drivers don't support that. If you can upgrade your Oracle driver it might fix it. I will also code around this issue for older drivers.

@jeffgbutler jeffgbutler changed the title from find a error to IS_AUTOINCREMENT and IS_GENERATEDCOLUMN Not Supported by Older JDBC Drivers Aug 20, 2016
@jeffgbutler jeffgbutler added the bug label Aug 20, 2016
@jeffgbutler jeffgbutler added this to the 1.3.5 milestone Aug 20, 2016
@jeffgbutler jeffgbutler closed this in #137 Aug 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment