Archive for the “ColdFusion” Category

As daunting as it may seem updating the JVM version or installing a new version of the Java Virtual Machine is a really simple task. To proceed with this I strongly recommend that you view the original JVM.config for the Coldfusion instance and take note of the “java home” that is specified in the file. For example in a default Coldfusion 9 install it will look like this;

“#java.home=/opt/coldfusion9/runtime/jre”

Just to be on the save side I typically copy that file and rename it so in the event that something happens and I didn’t write it down (Of course I’d right it down) that I would be able to roll it back with minimal downtime. Once that is taken care of you can proceed with the actual JVM update or install.

To do this make sure you know what kernel you are running, 32-bit or 64-bit. If you aren’t sure you can always using the “uname” command to figure it out;

“uname -m”

It will return the value that you need. If it returns “i686″ then you are on a 32-bit kernel and if it returns “x86_64″ then you are on a 64-bit kernel.

Now that you know which you have you can proceed to the Java downloads and get the correct version – http://java.com/en/download/manual.jsp#lin. Take note here that you can download either the RPM of the self extracting file, always go with the RPM unless you need to do some manual changes.

Once the file is downloaded you will need to grant permissions to excute it. To do this you will need to run the following;

“chmod a+x file name”

For example; chmod a+x jre-6u29-linux-i586.rpm.bin

Now you can run the file by running;

“./jre-6u29-linux-i586.rpm.bin”

This will install the Java Runtime Engine (JRE) to “/usr/java/JRE version number”

Unpacking…
Checksumming…
Extracting…
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP ([email protected]).
  inflating: jre-6u29-linux-i586.rpm
Preparing…                ########################################### [100%]
   1:jre                    ########################################### [100%]
Unpacking JAR files…
        rt.jar…
        jsse.jar…
        charsets.jar…
        localedata.jar…
        plugin.jar…
        javaws.jar…
        deploy.jar…

Done.

Once this has been completed you can go back to the JVM.config that I mentioned earlier and update the “java.home”.

#java.home=/opt/coldfusion9/runtime/jre
java.home=/usr/java/jre1.6.0_29

As you see I commented out the original JRE and updated the “java.home” with the path to the newly installed JRE.  Save the changes and then restart Coldfusion.

You’ll be able to access the Coldfusion admin once it comes online and you will be able to view the system infomration and see that the JRE path has been updated as well;

 

See that wasn’t so bad was it?

Comments No Comments »

Issue

CFImage and the image functions can leave an image file locked after an initial write to disk in Adobe ColdFusion 8.0.1. This can cause subsequent operations on the image to fail with an error similar to the following:

“An exception occurred while trying to write the image. Ensure that the destination directory exists and that ColdFusion has permission to write to the given path or file. Cause: java.io.FileNotFoundException: /pathToImage/portrait.jpg”

The CFimage function may also write the image to the directory ColdFusion is running from instead of the proper directory.
Solution

Both ColdFusion 8.0.1 cumulative and individual hot fixes are installed in the ColdFusion Administrator. The installation process is the same for all platforms and installation choices.
Install the ColdFusion 8.0.1 hot fix.

1. Download the hot fix, hf801-71557.zip (110k).
2. Extract hf801-71557.jar and metadata-extractor-2.3.1.jar from the hf801-71557.zip file.
3. Open the ColdFusion Administrator and select the System Information page. Next to the Update File field, do one of the following:
* Type in the file path to hf801-71557.jar, and then click Submit.
*
Click Browse, and then browse to the hf801-71557.jar. Select the file, and then click Submit.
4.
Stop the ColdFusion server.
5.
Rename metadata-extractor-2.3.1.jar in cf_root\lib to metadata-extractor-2.3.1.jar.bak. Copy metadata-extractor-2.3.1.jar extracted from the hotfix zip to this location.
6.
Restart the ColdFusion server.

Note: The hot fix, hf801-71557.jar was updated with a file dated August 12, 2008 1:43 AM and size 36,169 bytes. An updated metadata-extractor-2.3.1.jar was added to the zip also (86.6k August 12, 2008 1:51).

The ColdFusion 8.0.1 hot fix JAR file does not need to be retained after installing it with the ColdFusion Administrator. The file has been copied into the correct location. ColdFusion hot fix jars may be uninstalled by deleting the respective hot fix jar from cf_root/lib/updates after stopping the ColdFusion application server.

Tags: , ,

Comments No Comments »

On extremely slow or very heavily loaded Windows systems, the main ColdFusion MX Application Server service might not automatically start on system restart using the default service startup timeout values. Instead, the following error will be seen:

 The ColdFusion MX Application Server service terminated with
 service-specific error 2.

This behavior can occur on slower systems or systems with a large number of services that need to initialize at the same time, causing the ColdFusion MX Application Server service to timeout.

Beginning with ColdFusion MX 6.1, the -starttimeout switch is added to the command line executable, allowing the startup timeout value to be permanently modified.

If the ColdFusion Application Server Service does not start on system reboot, the following workaround can be used to modify the time allowed for service startup:

  1. Shut down the ColdFusion MX Application Server service.
  2. Open a DOS command window.
  3. Run the following command to change directories:
     cd cf_rootruntimebin
  4. Run the following command to change the timeout value:
     jrunsvc.exe -starttimeout 900"ColdFusion MX Application Server"

    where 900 is equal to the number of seconds allowable before the ColdFusion service startup will timeout.

    This value can be adjusted according to the specific needs of the system on which ColdFusion is installed. To change it, simply run the command in step 4 again with a different value. You can replace “ColdFusion MX Application Server” accordingly depaending on the CF instance. For example if it is CF8, you would run jrunsvc.exe -starttimeout 900“ColdFusion 8 Application Server”.

Comments No Comments »

  1. Open the the file neo-security.xml. This is in the lib directory of you ColdFusion MX install, so for Windows C:\CFusionMX\lib\ and on UNIX /opt/coldfusionmx/lib. This also applies for CF7 and CF8 on both windows and linux. The file directory may vary so you will have do do a search for the neo-security.xml file.
  2. Change the admin.security.enabled variable to false.Before:
    <var name='admin.security.enabled'>
    		<boolean value='true'/>
    	</var>

    After:

    <var name='admin.security.enabled'>
    		<boolean value='false'/>
    	</var>
  3. Restart the ColdFusion process.
  4. Change the password immediatly otherwise you will leave the administrator unprotected.

Comments No Comments »

To disable ColdFusion Remote Development Services on ColdFusion MX and higher:

In earlier versions of ColdFusion, RDS ran as a separate service or process. In ColdFusion MX, RDS is seamlessly integrated into the main service or process. To disable it, you must disable the RDSServlet mapping, as described in the following procedure.

To disable the RDSServlet mapping:

  1. Back up the web.xml file.
    This file is in the cf_root\wwwroot\WEB-INF directory on Windows
    and in the cf_root/wwwroot/WEB-INF directory on UNIX. In the J2EE configuration, this file is undercf_root/WEB-INF.
  2. Open the original web.xml file for editing.
  3. Comment out the RDSServlet mapping, as shown in the following example:

<!--
<servlet-mapping id="coldfusion_mapping_9">
<servlet-name>RDSServlet</servlet-name>
<url-pattern>/CFIDE/main/ide.cfm</url-pattern>
</servlet-mapping>
-->

Save the File and restart Coldfusion.

If you want to enable RDS, you simply do the reverse.

  1. Back up the web.xml file.
    This file is in the cf_root\wwwroot\WEB-INF directory on Windows
    and in the cf_root/wwwroot/WEB-INF directory on UNIX. In the J2EE configuration, this file is undercf_root/WEB-INF.
  2. Open the original web.xml file for editing.
  3. Comment out the RDSServlet mapping, as shown in the following example:

<!--
<servlet-mapping id="coldfusion_mapping_9">
<servlet-name>RDSServlet</servlet-name>
<url-pattern>/CFIDE/main/ide.cfm</url-pattern>
</servlet-mapping>
-->
 Save the File and restart ColdFusion.
For both, make sure the RDSServlet definittion is enabled as well;
<servlet id="coldfusion_servlet_8789">
        <servlet-name>RDSServlet</servlet-name>
        <display-name>RDS Servlet</display-name>
        <servlet-class>coldfusion.bootstrap.BootstrapServlet</servlet-class>
        <init-param id="InitParam_103401311065856789">
            <param-name>servlet.class</param-name>
            <param-value>coldfusion.rds.RdsFrontEndServlet</param-value>
        </init-param>
    </servlet>

Comments No Comments »