I have the following Camel route definition. Its purpose is to export some records in Informix to CSV.
<route id="out">
<from uri="timer:foo?repeatCount=1" />
<to uri="sql:select nro_service, enviado_sap ,estado_transmision from servicio_cab?dataSource=dataSource" />
<to uri="bean:com.enelint.pangeaenelist.Transformer?method=tocsv(Exchange)" />
<log message="${body}" />
</route>
I'm getting the following error from Informix:
Stacktrace
org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [select nro_servicio, enviado_sap ,estado_transmision from servicio_cab]; SQL state [IX000]; error code [-79782]; Method can be called only once.; nested exception is java.sql.SQLException: Method can be called only once.
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
The inner exception is java.sql.SQLException: Method can be called only once
. How can I fix this?