Hello Everyone:
I have a problem running JPA reverse engineering (Hibernate code generation) with hibernate tools 4.0.0-CR1.jar distribution bundled with jboss developer studio and Informix.database (no problems with my tables in MySql) also I'm not able to create ddl script when table is selected.
I've tried with JDBC drivers: 3.5 3.7 and 4.10. Using 3.5 version I can't even display JPA reverse engineering options on the table.
my setup: JBoss Developer Studio
Version: 7.0.0.GA Build id: GA-v20130720-0044-B364 Build date: 20130720-0044 informix driver version: 3.7
jdbc string: jdbc:informix-sqli://host:port/prueba:informixserver=PRUEBA
stack trace:
org.hibernate.exception.GenericJDBCException: Error while reading primary key meta data for pruebaema.informix.prueba at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91) at org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect$4.handleSQLException(JDBCMetaDataDialect.java:171) at org.hibernate.cfg.reveng.dialect.ResultSetIterator.next(ResultSetIterator.java:62) at org.hibernate.cfg.reveng.JDBCReader.processPrimaryKey(JDBCReader.java:350) at org.hibernate.cfg.reveng.JDBCReader.readDatabaseSchema(JDBCReader.java:86)
my table script:
CREATE TABLE informix.prueba( id SERIAL NOT NULL, campolargo LVARCHAR, countrycode VARCHAR(3) NOT NULL, district VARCHAR(20) NOT NULL, nombre VARCHAR(35) NOT NULL, population INTEGER NOT NULL, fecha DATE NOT NULL, fechadatetime DATETIME HOUR to MINUTE NOT NULL, airport SMALLINT, university CHAR(2) NOT NULL, democracy BOOLEAN(1) NOT NULL, archivo BLOB, datoflotante FLOAT NOT NULL, PRIMARY KEY (id) )
I've tried with a lower case sql script, test results are same as before.
Problem is PRIMARY KEY (ID)
If primary key is omitted all code generation process seems to be ok
CREATE TABLE informix.prueba( id SERIAL NOT NULL, campolargo LVARCHAR, countrycode VARCHAR(3) NOT NULL, district VARCHAR(20) NOT NULL, nombre VARCHAR(35) NOT NULL, population INTEGER NOT NULL, fecha DATE NOT NULL, fechadatetime DATETIME HOUR to MINUTE NOT NULL, airport SMALLINT, university CHAR(2) NOT NULL, democracy BOOLEAN(1) NOT NULL, archivo BLOB, datoflotante FLOAT NOT NULL )
If anyone can help with this I would really appreciate it
Eric
|