Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to run CF MX 7 side-by-side with CF9?

Explorer ,
Feb 19, 2010 Feb 19, 2010

We are currently running CF MX 7 enterprise in a multiserver configuration on Windows 2003 with IIS 6. We would like to install CF 9 on the same development box and to be able to run both versions at the same time accessing the same codebase (I created second IIS server called CF9 for this purpose).  In that way, we could test our existing code against CF 9 and also continue coding on CF 7.

I’ve worked at this for several days and I’m not getting anywhere, so I’m looking for some guidance.

The approach I took was modelled on this “CFJD feature – It Is Possible – Simultaneous development with CF7 and CF8” by Jeff Chastain http://coldfusion.sys-con.com/node/397935

The article deals with 7 and 8 but I figured it should still apply to 7 and 9. Jeff did a fresh multiserver install of 8 then created an instance of 8 (I’m not sure why) then an instance of 7. In my case I already had 7 multiserver installed and being used so I didn’t want to reinstall it (plus it was an upgrade from 6 so I don’t have the sw).

In keeping with Jeff’s approach I created an instance of 7 but then found that the administrator link provided by the instance manager referred to flashservices for some reason and didn’t work. Running the original admin location (host/CFIDE/administrator/index.cfm) no longer contained the enterprise manager. I had to stop the CF7 instance to get back to the default administrator.

I then created an instance for CF9. Despite using /cf9root/ as the context root during the install phase there was no CFIDE installed there. When I tried to get it to use a different jvm.config file (pointing to JDK 1.6) using this code: D:\dw\jrun4\bin\jrun.exe -config "D:\DW\JRun4\bin\cfusion9_jvm.config" CF9, I get this:  Error: no known VMs. (check for corrupt jvm.cfg file)

In frustration, I tried installing CF9 in standalone configuration as suggested here, but that didn’t work either – the admin and site were still run under CF7.

What am I doing wrong? Any suggestions appreciated.

Thanks

Bob

1.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 19, 2010 Feb 19, 2010

I haven't tried it, but the version of JRun that ships with CFMX7 should work fine to serve CF9 sources, provided you specify a different JVM for the CF9 instance to use.

I've never used CF's instance deploying thingey in CFAdmin, because doing it the JRun way seems to just work, so I've never needed to do it any other way.  I do this:

1) Crank up JRun Admin, login

2) Create a new server instance (remember which port the JWS is using, needed below)

3) Drop down to the file system and delete the default-ear dir from the new instance's home dir

4) Run the CF9 installer and create an EAR install.  Make sure to also install the other services it asks about, if you're going to be needing them.

5) unzip the ensuing cfusion.ear file (rename it to cfusion-ear.zip... it's just a zip file), and the WAR file within it, calling the dirs cfusion-ear and cfusion-ear/cfusion-war respectively.

6) update the cfusion-ear/meta-inf/application.xml to reflect "cfusion-war" rather than "cfusion.war", and make the context root / if need be.

7) move the cfusion-ear dir to the instance's home dir (from where you deleted default-ear, in step 3)

8) get hold of the latest Java SDK, and install it somewhere.  I don't install it in the default path as that will have spaces in it, and this has caused me problems in the past.  I install it to C:\java\jdks\[version name], or something

9) duplicate JRun's default jvm.config file, calling it jvm_cf9.config, or stick it within the server-specific dir, or something.

10) edit this new jvm.config file, and change the java.home value to point to the JRE dir from the Java SDK you installed in (8)

11) drop down to a command prompt and head to the JRun/bin dir and run this command line:

jrunsvc -install [instance name] [service name] [service label] [service description] -config [path to that second jvm.config file]

eg:

jrunsvc -install cf9 "CF9 Service" "CF9 Service" "CF9 service" -config C:/Jrun4/bin/jvm_cf9.config

12) Start the service.

13) Browse to http://localhost:[port number from step 2]/CFIDE/administrator, finish the CF install.

14) Create your IIS site, pointing the webroot to the instance's cfusion-war dir

15) Run wsconfig to connect the new CF instance to the IIS website.

16) restart IIS & CF

17) browse to CFAdmin via the IIS site's address.  Also stick a hellowWorld.cfm template in the webroot to make sure you can browse to that OK too.

18) Err...

19) ... that's it.

It looks like a lot of steps, but the only time-consuming bit is the CF9 install creating the EAR file.  If I've got one of those lying around already, the whol thing takes about 7min or so.  The deployment via the UI is without a doubt easier, but I've heard people having issues with it when going across versions, as you seem to be.

I've not had this method not work, but have never tried with CFMX7 + CF9.  Have had success with CFMX7 + CF8 (and vice-versa), and CF8 + CF9 (and vice-versa).  I'm not sure I had any luck with CFMX61 + CFMX7, but was able to run CFMX7 multi-server and CFMX61 stand-alone back when I had the requirement to run both simultaneously.

At step 7, I usually edit the jrun-web.xml file to move the webroot to C:\webroots\[instance name], and add mappings back to the existing locations for CFIDE, cfide and WEB-INF, eg:

    <virtual-mapping>
        <resource-path>/</resource-path>
        <system-path>C:/webroots/cf901a1</system-path>
    </virtual-mapping>

    <virtual-mapping>
        <resource-path>/WEB-INF/*</resource-path>
        <system-path>C:/Adobe/JRun4/servers/cf901a1/cfusion-ear/cfusion-war/WEB-INF</system-path>
    </virtual-mapping>
    <virtual-mapping>
        <resource-path>/CFIDE/*</resource-path>
        <system-path>C:/Adobe/JRun4/servers/cf901a1/cfusion-ear/cfusion-war/CFIDE</system-path>
    </virtual-mapping>
    <virtual-mapping>
        <resource-path>/cfide/*</resource-path>
        <system-path>C:/Adobe/JRun4/servers/cf901a1/cfusion-ear/cfusion-war/CFIDE</system-path>
    </virtual-mapping>

I just find it annoying that the CF webroot is buried so far down the file system.  Obviously if you do this, you need to point your IIS site to the same place, and make the CFIDE mapping too (you don't need the WEB-INF one in IIS).

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 22, 2010 Feb 22, 2010

Hi Adam,

Followed your steps precisely but still couldn't get it going (failed to find admin at step 13).

Checking in Jrun Admin I found that the only J2EE component deployed on my "CF9" server is a Flash Remoting EAR located at D:/DW/JRun4/lib/flashgateway.ear  with context root /flashservices. I removed that and tried to add D:/DW/JRun4/servers/cf9/cfusion-ear but got the error mesage 'Deployer Service failed to deploy file:/D:/DW/JRun4/servers/cf9/cfusion-ear/ * A J2EE module with the name file__D__DW_JRun4_servers_cf9_cfusion-ear_#Adobe_ColdFusion_9 has already been deployed. '

I removed "CF9" and tried again using a different server name "ACF_9" but got exactly the same results.

Any idea why it insists on deploying a flash component?

Thanks

Bob

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 22, 2010 Feb 22, 2010

Further to my previous message..

I tried a fresh install of CF9 and found the following entry in the admin-out.log after I started the server:

Starting Macromedia JRun 4.0 (Build 108621), CF9 server
02/22 09:56:36 info JRun Naming Service listening on *:2908
02/22 09:56:37 info No JDBC data sources have been configured for this server (see jrun-resources.xml)
02/22 09:56:37 info JRun Web Server listening on *:8100
02/22 09:56:38 info Deploying enterprise application "Adobe_ColdFusion_9" from: file:/D:/DW/JRun4/servers/CF9/cfusion-ear/
02/22 09:56:39 info Deploying web application "Adobe ColdFusion 9" from: file:/D:/DW/JRun4/servers/CF9/cfusion-ear/
02/22 09:56:40 info Deploying web application "ColdFusion RDS Application" from: file:/D:/DW/JRun4/servers/CF9/cfusion-ear/
02/22 09:56:40 error Deployer Service failed to deploy file:/D:/DW/JRun4/servers/CF9/cfusion-ear/
* coldfusion/bootstrap/HttpFlexSessionBootstrap (Unsupported major.minor version 49.0)
* null
[1]java.lang.UnsupportedClassVersionError: coldfusion/bootstrap/HttpFlexSessionBootstrap (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
...

02/22 09:56:41 info Deploying EJB "JRunSQLInvoker" from: file:/D:/DW/JRun4/lib/jrun-comp.ear
02/22 09:56:41 info Deploying enterprise application "Flash Remoting EAR" from: file:/D:/DW/JRun4/lib/flashgateway.ear
02/22 09:56:41 info Deploying web application "Flash Remoting" from: file:/D:/DW/JRun4/lib/flashgateway.ear
02/22 09:56:41 user JSPServlet: init
02/22 09:56:41 user FlashGatewayServlet: init
Server CF9 ready (startup time: 8 seconds)

Could it be that the JRun4 Admin server is running under JDK1.4.2_11 (as specified in jvm.config?) and that the code being deployed requires a higher version, e.g. JDK1.6? If that's the case, how would I correct it without messing up the cfusion server (cf7) which only works with 1.4.2.?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 22, 2010 Feb 22, 2010

* coldfusion/bootstrap/HttpFlexSessionBootstrap (Unsupported major.minor version 49.0)


Could it be that the JRun4 Admin server is running under JDK1.4.2_11 (as specified in jvm.config?) and that the code being deployed requires a higher version, e.g. JDK1.6? If that's the case, how would I correct it without messing up the cfusion server (cf7) which only works with 1.4.2.?

Are you dead sure you've done steps 8-11, esp. step 8?

Can you confirm the following:

* the location of the JDK you installed for CF9

* the java.home value in CF9's jvm.config

* the location of CF9's jvm.config

* the exact command line you used with jrunsvc

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 23, 2010 Feb 23, 2010

Hi Adam,

Can you confirm the following:

* the location of the JDK you installed for CF9     

          installed at D:\DW\Java\jdk1.6.0_18

* the java.home value in CF9's jvm.config              

          java.home=D:/DW/Java/jdk1.6.0_18/jre

* the location of CF9's jvm.config                          

          D:\DW\JRun4\bin\jvm_cf9.config

* the exact command line you used with jrunsvc    

          jrunsvc -install CF9 "CF9 Service" "CF9 Service" "CF9 Service" -config "D:\dw\JRun4\bin\jvm_cf9.config"

          Result: Service "CF9 Service" installed with display name "CF9 Service"

          Also checked registry which showed this service with Parameter -config "D:\dw\JRun4\bin\jvm_cf9.config"

I tried this several times and always got the same result:when I tried to start the server in jrun admin i get the error "Unsupported major.minor version 49.0" I found out that this error "comes when a class compiled on a newer version is being tried to run on an older JVM " http://techtracer.com/2007/10/10/resolving-the-unsupported-majorminor-version-490-error/

I tried changing jvm.config to use jdk1.6.0_18 but that lead to other sorts of errors.

----

I am considering uninstalling CF7 multiserver (first making an archive file) then installing CF9 multiserver and then adding CF7 as an instance per your instructions - but I'm a bit uneasy about it given my luck so far...

Bob

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 23, 2010 Feb 23, 2010

Try redoing the JRUNSVC thing using fwd slashes instead of backslashes.  You'll need to remove the existing one (jrunsvc -remove [service name]) first.

Other than that... yeah, I'd try reversing your approach (CFMX7 instance on a CF9 install).  Although I'd do it on a spare machine first so as to know what you're getting yourself into before applying it to a machine you actually need to work.

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 23, 2010 Feb 23, 2010
LATEST

Tried that. No joy. Same error

.

Now to find a spare box.

Thanks for your help Adam

Bob

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources