View comments | RSS feed
Contents > Installing and Using ColdFusion MX > Installing the J2EE Configuration > ColdFusion MX J2EE deployment and configuration > Deployment PreviousNext

Deployment

The instructions at www.macromedia.com/go/cfmxj2ee-cert provide detailed, application-server-specific ColdFusion MX deployment instructions. Depending on your application server, the instructions describe deployment of an EAR file or WAR files in either a compressed archive or an expanded directory structure. When deploying ColdFusion MX on an existing version of JRun 4, you must expand the EAR file or WAR files manually before deployment.

The following procedures describe EAR and WAR deployment on an existing version of JRun 4.

Tip: The instructions for expanding cfusion.ear also apply when deploying ColdFusion MX on BEA WebLogic.

Expanding and deploying an EAR file on JRun 4

When deploying ColdFusion MX as an enterprise application on an existing JRun server, you must expand the EAR and the WARs it contains before deployment.

Note: If you are already using the default-ear application and can't delete it, you must use a context root other than / for cfusion-ear. If you specified / when installing ColdFusion MX 6.1, you can change it by opening the cfusion-ear/META-INF/application.xml file in a text editor and modifying the context-root element. After deploying cfusion-ear, you access ColdFusion pages by specifying http://hostname:portnumber/contextroot/pagename.cfm.

To deploy ColdFusion MX as an enterprise application on JRun 4:

  1. Run the installation wizard for your platform, as described in Installing an EAR file or WAR files. Select the EAR option. When you get to the deployment step, return to these instructions.

    If you are updating an existing deployment of ColdFusion MX for J2EE, you must undeploy ColdFusion MX for J2EE before deploying ColdFusion MX 6.1, as described in Updating from ColdFusion MX for J2EE.

  2. Expand the EAR file by performing the following steps:
    1. Open a console windows, navigate to the directory that contains the EAR file, and make a new directory named cfusion-ear.
          md cfusion-ear (mkdir cfusion-ear on UNIX)
      
    2. Change to the cfusion-ear directory and expand cfusion.ear with the jar command:
          cd cfusion-ear
          java_home/bin/jar -xvf ../cfusion.ear
      

      This expands cfusion.ear into cfusion.war and rds.war (rds.war is not included if you specified a context root of / when running the installation wizard).

    3. In cfusion-ear, make a new directory named cfusion-war.
          md cfusion-war (mkdir cfusion-war on UNIX)
      
    4. Change to the cfusion-war directory and expand cfusion.war with the jar command:
          cd cfusion-war
          java_root/bin/jar -xvf ../cfusion.war
      

      This expands cfusion.war.

    5. (If rds.war exists) Go up one level to cfusion-ear, make a new directory named rds-war.
          cd ..
          md rds-war (mkdir rds-war on UNIX)
      
    6. (If rds.war exists) Change to the rds-war directory and expand rds.war with the jar command:
          cd rds-war
          java_root/bin/jar -xvf ../rds.war
      

      This expands rds.war.

    7. Go up one level to cfusion-ear, and delete the cfusion.war and rds.war files:
          cd ..
          del cfusion.war (rm cfusion.war on UNIX)
          del rds.war (rm rds.war on UNIX)
      
    8. Open cfusion-ear/META-INF/application.xml in a text editor.
    9. Change the web-uri element from cfusion.war to cfusion-war (or the name of the directory that contains the expanded cfusion.war file). Change the web-uri element for rds.war to rds-war. A directory name in the web-uri element cannot contain a dot.
    10. Save the application.xml file.
  3. Deploy ColdFusion MX by copying the cfusion-ear directory structure to the jrun_root/servers/servername directory. If auto-deploy is enabled, JRun 4 either deploys the application immediately (if the JRun server is running) or when you start the JRun server.
  4. Review the server log (jrun_root/logs/servername-event.log) to ensure that ColdFusion MX deployed successfully.
  5. Continue with the procedure from the Configuration Wizard step, as described in Installing an EAR file or WAR files.

Expanding and deploying WAR files on JRun 4

Although it is best to deploy ColdFusion MX as an enterprise application, you can also deploy ColdFusion MX as a web application. When deploying ColdFusion MX as a web application on an existing JRun server, you expand the cfusion.war file, deploy it, and optionally modify the context root. For complete information on deploying ColdFusion MX on JRun 4 as a WAR file, see www.macromedia.com/go/cfmxj2ee-cert.


Contents > Installing and Using ColdFusion MX > Installing the J2EE Configuration > ColdFusion MX J2EE deployment and configuration > Deployment PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

Comments


anuragmehta said on Aug 19, 2003 at 5:36 AM :
The directions need details on the commands used.
e.g. the command "java_home/bin/jar -xvf ../cfusion.ear " does not work on W2K for me.
When I run following:
C:/JRun4/runtime/jre/bin/jar -xvf ../cfusion.ear
I get:
'C:/JRun4/runtime/jre/bin/jar' is not recognized as an internal or external command
When I run:
java -jar -xvf ../cfusion.ear
I get:
Unrecognized option: -xvf
When someone new to J2EE tries CFMX 6.1 instllation on JRun, directions obivously does not explain enough if something fails.
anuragmehta said on Aug 19, 2003 at 7:08 AM :
However, to extract ear/rar files I could use the WINRAR utility. Still, tips to make it work from command prompt are still apprecited.
No screen name said on Oct 20, 2003 at 6:03 AM :
Hello AnuragMehta,
Thanks. Winrar is cool to expand the ear and war file rather than the jar comand on the command line screen.
drew_falkman said on Nov 10, 2003 at 10:53 AM :
If your classpaths are all setup correctly, you can just type >jar -xvf ../cfusion.ear (or whatever)
ke4pym said on Dec 11, 2003 at 11:10 AM :
In step 2h it says "Open cfusion-ear/META-INF/application.xml in a text editor."

I do not have a cfusion-ear/META-INF/application.xml. There is a cfusion-ear/application.xml.

Using the CFMX 6.1 CD to set all of this up. CFMX 6.1 was installed with JRUN4 option. Trying to build a second instance.
digitalparser said on Mar 14, 2004 at 8:30 AM :
I have a question regarding instruction #3
"Deploy ColdFusion MX by copying the cfusion-ear directory structure to the jrun_root/servers/servername"

Does this mean I paste the cfusion-ear directory into every "servername" folder I want to use with ColdFusion? i.e. default or admin,
and do I do this with each sub-folder under the samples directory?
digitalparser said on Mar 14, 2004 at 8:49 AM :
Further: when I pasted the folder into the server>default and I looked at the Jrun log for default, I get this:
"03/14 11:32:05 error Deployer Service failed to deploy C:\JRun4\servers\default\cfusion-ear
[1]java.lang.IllegalArgumentException: cfusion-war tried to override the existing context path of set by default-war. Please change the context-path of one of these applications."
and
"[0]jrun.deployment.DeploymentException: Deployer Service failed to deploy file:/C:/JRun4/servers/default/cfusion-ear/
* cfusion-war tried to override the existing context path of set by default-war. Please change the context-path of one of these applications."

What do I do? or have done wrong :)?
digitalparser said on Mar 14, 2004 at 8:53 AM :
This all reminds be of a quote (modified) from the movie Treasure of the Sierra Madre:
"Installation? We don't need no stinking installation."
jrunrandy said on Mar 15, 2004 at 6:00 AM :
Responses to digitalparser:
If you want to deploy ColdFusion to the default and samples servers (I don't recommend deploying CF into the JRun admin server), copy the cfusion-ear directory under jrun_root/servers/default and jrun_root/servers/sample.

You probably specified a context path of / when installing CF. The default-ear/default-war web application also uses this context path. You have to change one of them and you do this through the default-ear/META-INF/application.xml or cfusion-ear/META-INF/application.xml. Change the context-root element. If you're not using the default-war web application, another way around this problem is to delete the default-ear directory.
jsm said on Oct 4, 2004 at 6:55 AM :
it's still not clear to me how to expand a EAR file on a Win2003 server? I get the same results as the very first comment. Sure I could download a 3rd party tool, but then whats the point of these instructions (rhetorical question)?
jrunrandy said on Oct 4, 2004 at 7:52 AM :
I think the problem is that runtime/jre directory contains just the Java JRE, which doesn't include the jar utility. To run the jar utility, you need the entire Java SDK. So to get this to work, you need to ensure you have downloaded a Java SDK (1.3.x or 1.4.x) and added that directory to your system path.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/instal16.htm