Accessibility

TechNote

ColdFusion MX 6.1: Hot fix for cfinsert/cfupdate

A hot fix has been created to address several issues with cfinsert and cfupdate in ColdFusion MX 6.1. The hot fix in this TechNote resolves all three issues documented here and supercedes the previous hot fixes released for these issues.

Issue 52972:

With ColdFusion MX 6.1, when cfinsert or cfupdate is used with a table with certain column names, some form fields are not correctly mapped to the table column names. This happens intermittently.

The problem occurs when one column name is a portion of another, longer column name. ColdFusion tries to prevent duplicate field names by searching the SQL generated so far for the current field name. This does not work if the current field name is a portion of a longer previous field name.

For example, consider the following three column names: JOB, FIRSTJOB, JOBTYPE. Since the column names are retrieved from the database without specifying any order, they may be placed into the generated SQL in any order. The problem happens when a shorter column name (JOB) happens to be placed after a longer column name (JOBTYPE) which includes it.

When retrieved in the order of JOB, FIRSTJOB, JOBTYPE, the SQL statement would be generated in this way:

insert into TABLE_NAME (JOB, FIRSTJOB, JOBTYPE) values (value, value, value)

When retrieved in the order of FIRSTJOB, JOB, JOBTYPE, the SQL statement would be generated in this way:

insert into TABLE_NAME (FIRSTJOB, JOBTYPE) values (value, value)

Issue 53257:

Inserts and updates against ColdFusion MX 6.1 password-protected data sources fail in some situations if no username and password is specified for the data source within the ColdFusion Administrator. Instead, the following error will be seen:

Error Executing Database Query. [Macromedia][SequeLink JDBC Driver][SequeLink Server]Required user name is missing.

Inserts and updates initiated through the use of cfinsert, cfupdate, cfgridupdate or cfstoredproc attempt to get a connection to the database without passing the username and password specified within the tag. If this information has not been defined for the data source within the ColdFusion Administrator, the connection attempt will fail.

Issue 53653:

This issue is similar to issue 52972 described above. In this case, however, the problem only occurs with fields having empty ("") string values.

ColdFusion MX 6.1 - Server Configuration

Follow the instructions below to install the hot fix for ColdFusion MX 6.1 in the server configuration. For J2EE servers including JRun, use the instructions under the J2EE Configuration section.

Windows

  1. Remove hot fix hf52972.jar, if previously installed.
  2. Download the hot fix (25K).
  3. Stop ColdFusion.
  4. Create the directory cf_root\runtime\servers\lib if it does not exist.
  5. Extract hf53257_61.jar from the downloaded ZIP file, into the following directory:
    cf_root\runtime\servers\lib\
  6. Restart ColdFusion.
  7. Examine the ColdFusion MX Administrator System Information page and confirm that hot fix hf53257_61.jar shows in the Java Class Path list.

Unix

  1. Remove hot fix hf52972.jar, if previously installed.
  2. Download the hot fix (25K).
  3. Stop ColdFusion.
  4. Create the directory cf_root/runtime/servers/lib if it does not exist.
  5. Extract hf53257_61.jar from the downloaded ZIP file, into the following directory :
    cf_root/runtime/servers/lib/
  6. Edit the filecf_root/runtime/bin/jvm.config:
    1. Locate the JVM classpath section.
    2. Add {application.home}/runtime/servers/lib as the first entry in the java.class.path list.

      For example:
      # JVM classpath java.class.path={application.home}/runtime/servers/lib, {application.home}/runtime/../../src, {application.home}/lib/cfusion.jar, {application.home}/runtime/lib/webservices.jar
  7. Restart ColdFusion.
  8. Examine the ColdFusion MX Administrator System Information page and confirm that hot fix hf53257_61.jar shows in the Java Class Path list.
ColdFusion MX 6.1 - J2EE Configuration
ColdFusion MX 6.1 - J2EE Configuration with JRun

Follow the instructions below to install the hot fix for ColdFusion MX 6.1 in the J2EE configuration with a J2EE server including JRun:

  1. Remove hot fix hf52972.jar, if previously installed.
  2. Download the hot fix (25K).
  3. Extract hf53257_61.jar from the downloaded ZIP file, into the cf_root/WEB-INF/lib directory.
  4. Change the Context Parameter cf.class.path
    in the Deployment Descriptor (cf_root/WEB-INF/web.xml)
    for the Web Application "Macromedia ColdFusion MX" (cfusion.war)

    from:
    ./WEB-INF/cfusion/lib/cfusion.jar

    to:
    ./WEB-INF/lib/hf53257_61.jar,./WEB-INF/cfusion/lib/cfusion.jar

    • Note that the two paths in cf.class.path each start with a period and are separated by a comma.
    • Do not confuse ./WEB-INF/lib (which contains the hot fix jar file) with ./WEB-INF/cfusion/lib (which contains cfusion.jar).
  5. Stop and restart the J2EE server for changes to take effect.
  6. Examine the ColdFusion MX Administrator System Information page and confirm that hot fix hf53257_61.jar shows up in the Version section like 6,1,0 hf53257_61. Note: You will not see this jar in the Java Class Path because the hot fix JAR is being loaded in the ColdFusion Class Path.
  7. Repeat steps for each deployed instance of ColdFusion.
About changing the Deployment Descriptor
  • Deployment Descriptor Context Parameters can be changed using the J2EE Administrator Control Panel (WebLogic and JRun) or by using the Application Assembly Tool (Websphere). If your J2EE server does not have such a tool, you must make sure that the Context Parameter change is made for all deployed instances of ColdFusion. It may be necessary to un-deploy CFMX, make the change, then re-deploy CFMX. See your J2EE documentation for other methods.
  • Be sure to Persist (WebLogic) or Save (Websphere) your changes after you change the value for cf.class.path.
  • You will usually need to stop and restart your J2EE server to make these changes effective.

Additional Information


AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_18952
Browser:Chrome
Internet Explorer
Netscape
Opera
Safari
Firefox
Database:DB2
Informix
MySQL
Oracle
SQL Server
Sybase
MS Access

Products Affected:

coldfusion