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.

Related Blog Entries

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Jeremy Lyon's Gravatar I have two instances running on websphere on the 400 now. They use the native com.ibm.db2.jdbc.app.DB2Driver. The url format is jdbc:db2:systemname

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


# Posted By Jeremy Lyon | 12/10/03 9:20 PM
Uwe Raddatz's Gravatar Can anyone tell me how to prevent that query result fields will be filled up with blanks up to the maximum length of the column?

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.
# Posted By Uwe Raddatz | 12/11/03 4:22 AM
Rob Brooks-Bilson's Gravatar This issue with blanks is due to char datatypes. If your fields are char (as opposed to varchar), DB2 allocates the specified field length, regardless of the length of the data contained in the field. The trick here is to trim the data on the db side before returning it to CF.
# Posted By Rob Brooks-Bilson | 12/11/03 7:23 AM
Rob Brooks-Bilson's Gravatar Jeremy, any tips you have would be greatly appreciated. I haven't tried using any of the toolbox classes, but I'm interested in what you can use them for, and how they are called.
# Posted By Rob Brooks-Bilson | 12/11/03 7:24 AM
Jeremy's Gravatar Hi,
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
# Posted By Jeremy | 12/11/03 12:13 PM
Jeremy's Gravatar I just switched to JTOpen 4.2 and it seems to be working fine. Incremental tweaks... The biggest news of the release might be it's new compatibility with IBM's Enterprise Identity Management stuff...

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
# Posted By Jeremy | 1/9/04 2:22 PM
Uwe Raddatz's Gravatar Hi,

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.
# Posted By Uwe Raddatz | 1/15/04 7:43 AM



Copyright 1995-2010 Rob Brooks-Bilson. All rights reserved.
Aura skin for Raymond Camden's BlogCFC inspired by Joe Rinehart & Steven Erat. This blog is running version 5.9.004.