RE: Make MySQL syntax work in Informix
Posted in 2007
Finally: Success (there may still be pitfalls as we exercise the
underlying code), but I have the 'JasperServer' product up and running
in Tomcat.
The addition of the Informix hibernate template to the
WEB-INF/hibernate.properties file pretty much fixed the remaining
problems.
Baring any problems in my mapping of tinyblob/longblob, etc., I should
have a fully functional product (at least I can log into the
Administrative console....)
Thanks again.
Sky
-----Original Message-----
From: David McPaul [mailto:dmcpaul@lumley.com.au]
Sent: Thursday, July 05, 2007 5:17 PM
To: Southwell Schuyler
Subject: FW: Make MySQL syntax work in Informix
Not sure if this will help but if the package is using hibernate then it
should just be a matter of configuring hibernate to use informix syntax.
(unless the package uses some direct sql as well).
There should be a hibernate properties file somewhere and you can add
the following template
# Informix
hibernate.connection.driver_class=com.informix.jdbc.IfxDriver
hibernate.dialect=org.hibernate.dialect.InformixDialect
hibernate.connection.url=jdbc:informix-sqli://<machine>:<port>/java:INFO
RMIXSERVER=<server>
hibernate.connection.username=xxxxxx
hibernate.connection.password=xxxxxx
The hibernate support for informix is not complete. I had problems with
a text datatype but being able to switch databases is one of hibernates
features. If the problem occurs even when using the InformixDialect you
should report it as a bug to the hibernate team.
Cheers
David
-----Original Message-----
From: informix-list-bounces@iiug.org
[mailto:informix-list-bounces@iiug.org] On Behalf Of Southwell Schuyler
Sent: Friday, 6 July 2007 12:59 AM
To: informix-list@iiug.org
Subject: Make MySQL syntax work in Informix
I have a semi-canned package (JasperSoft JasperReports / JasperServer)
that I am attempting to make use Informix as it's report repository, in
lieu of installing an Oracle / MySQL instance.
I have the schema (successfully ?) converted (I won't know for certain
until I can get the JasperServer product (installed in Tomcat) to come
up.
It is failing on the following MySQL/Oracle syntax:
-----
SELECT hibernate_sequence.nextval FROM dual;
14:45:20,272 WARN JDBCExceptionReporter,main:77 - SQL Error: -217,
SQLState: IX000
14:45:20,300 ERROR JDBCExceptionReporter,main:78 - Column (nextval) not
found in any table in the query (or SLV is undefined).
-----
I have implemented several variants of the 'dual' table (everything from
Jonathan Leffler's 'dual' view to an actual table), and have also
created the hibernate_sequence table. Both tables have a 'nextval'
column.
If I do this without the nextval column in the table, then I get an
error that states column hibernate_sequence not in any table...
---
Is there ANY way to write a VIEW / SYNONYM / SELECT TRIGGER (this is
relatively low volume) to FAKE this query into executing? I really
would like to avoid implementing the Oracle / MySQL instance if at all
possible.
Thanks,
Schuyler L. Southwell
Software Engineer, Consulting
Maricopa County Attorney's Office
tel: 602 506 8107
southwel@mcao.maricopa.gov
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list
This e-mail is intended for the use of the individual or entity it is
addressed to and may contain information that is confidential, legally
privileged, commercially sensitive or copyright.
If you are not the intended recipient you must not disclose,
disseminate, distribute or copy information contained in it.
If you have received this e-mail in error, please notify the sender
immediately and destroy the original message.
While this mail and any attachments have been scanned for common
computer viruses and found to be virus free, we recommend you perform
your own virus checks before opening any attachments.