I recently setup a new development box running multiple instances of ColdFusion MX 6.1. I posted a question to the CFGURU mailing list asking about the best place to put my 3rd party JDBC driver. Sean Corfield and Simon Horwith both chimed in that they recommended placing it in:
{jrun.home}/servers/lib/
In my previous non J2EE installations of ColdFusion, I always placed my driver in c:\jt400\jtopen\bin. Whenever I setup a new server, I also had to add this location to the JAva CLASSPATH in the ColdFusion Administrator. What's my point? Well, using Sean/Simon's location, I no longer have to add the CLASSPATH to my ColdFusion server as the location is already known to the JRun/ColdFusion server. Very convenient!
Also for you iSeries fans out there, a new article by Jeremy Lyon is in this month's ColdFusion Developer Journal. The article, "MX to iSeries Demystified - A world-class database platform paired up with a world-class Web application server" gives some decent information on using CFMX to query data from DB2 on that platform.
If anyone is interested I've got tips on how to use the com.ibm.as400.access.ProgramCall and CommandCall toolbox classes.
The ProgramCall uses IBM's Program Call Markup Language (PCML).
Jeremy
And what could be the reason of sporadic and unreproducible exceptions when calling queries or stored procedures (see stack trace below)?
java.lang.NumberFormatException: 266
at com.ibm.as400.access.AS400ZonedDecimal.toObject(AS400ZonedDecimal.java:421)
at com.ibm.as400.access.SQLNumeric.convertFromRawBytes(SQLNumeric.java:89)
at com.ibm.as400.access.JDServerRow.getSQLData(JDServerRow.java:400)
at com.ibm.as400.access.AS400JDBCResultSet.getValue(AS400JDBCResultSet.java:3612)
at com.ibm.as400.access.AS400JDBCResultSet.getObject(AS400JDBCResultSet.java:3023)
at coldfusion.sql.QueryTable.populate(QueryTable.java:272)
at coldfusion.sql.Executive.getRowSets(Executive.java:559)
at coldfusion.sql.Executive.executeCall(Executive.java:814)
at coldfusion.sql.Executive.executeCall(Executive.java:749)
at coldfusion.sql.SqlImpl.executeCall(SqlImpl.java:313)
at coldfusion.tagext.sql.StoredProcTag.doEndTag(StoredProcTag.java:192)
Thanx for help.
I'd trim it at the SQL level. OR create a db2 view of the file i.e.,
SELECT trim(fieldname) as field
OR
Create view qgpl.table_view as Select Trim(charfield) trimed_char From qgpl.table
Jeremy
The J2EE version of BlueDragon seems to work ok on the AS/400. I installed the BlueDragon 6.1 beta on Websphere Express 5.0. There are some glitches with CFX's that might be due to my AS/400 configuration, I don't know yet. The data source setup is actually easier than the Coldfusion J2EE way. You don’t have to configure the data source in Websphere first.
Jeremy
I am using the JTOpen 4.1 JDBC driver to access an iSeries server. Sometimes it happens, a stored procedure call hangs in reason of problems during execution on the database server. The JDBC driver does not throw an exception, so the page request will not be answered.
I set the "Timeout Requests after ..." setting to 60 seconds but this only works for pure ColdFusion tags such as <cfloop condition="1 gt 0"></cfloop>. It does not work for stored procedure calls. Also there's no timeout parameter for the JDBC driver. :(
So these non-responding requests accumulate up to the number defined in the "Maximum number of simultaneous requests" setting in ColdFusion Administrator. Further requests will be queued - finally no request will be answered until ColdFusion server will be restarted.
It's a dissatisfying situation. ;) Any suggestions to find a solution?
Bye.