ant -> SchemaExportTask error: Schema text failed: No Dialect mapping for JDBC type: 2004
1. Environment:
DBMS: Informix-OnLine Version 7.22.UC2
JDBC: Informix JDBC Driver 2.21.JC3
2. hibernate.properties:
Code:
hibernate.dialect net.sf.hibernate.dialect.InformixDialect
hibernate.connection.url jdbc:informix-sqli://192.168.0.202:8899/testDB:informixserver=testDB
hibernate.connection.username testUser
hibernate.connection.password testUser
......
3. build.xml:
Code:
<target name="build-db" description="build database">
<taskdef name="schemaexport"
classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="runtime.classpath"/>
<schemaexport
properties="src/hibernate.properties"
quiet="yes"
text="yes"
drop="no"
delimiter=";"
output="${basedir}/DB/testDB.sql">
<fileset dir="${build.home}/WEB-INF/classes">
<include name="**/*.hbm.xml"/>
</fileset>
</schemaexport>
</target>
Question:
Run ant build-db, error occurs: Schema text failed: No Dialect mapping for JDBC type: 2004
I try it in this way:
1) in User.hbm.xml:
Code:
<property name="portrait" type="blob" update="true" insert="true" column="portrait"/>,
<id name="pid" column="pid" type="java.lang.Long" unsaved-value="null">
<generator class="hilo"></generator>
</id>
......
when I delete the property of portrait, then run the task "ant build-db" success, and can make testDB.sql, but not create any table in Database. when i execute the sql of testDB.sql in Informix 7, syntax error occured, I check testDB.sql, found: java.lang.Long is mapped to
type: INT8, if I change INT8 to int, the sql can't work, other syntax occured.
please give directions to me,
thanks in advance.