-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Reverse engineering does not work with informix 11.7
PostPosted: Mon Aug 26, 2013 11:19 am 
Newbie

Joined: Mon Aug 26, 2013 11:03 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.