Highlighted

Attempting the Impossible? Deploy CF11 Enterprise WAR on Azure Tomcat 7?

New Here ,
Oct 22, 2015

Copy link to clipboard

Copied

I'm working on proof of concept of making my app more scaleable and reducing the support footprint on OS patching.

I'm trying to take a CF11 Enterprise generated WAR file, and deploy it onto an Azure Tomcat 7 web app. I've never deployed CF apps on J2EE before, so I'm not sure if my problems are user error, or attempting the impossible.

I can fire up Azure, deploy a Tomcat 7 server, and put a (non CF) war up in the webapp folder, and watch it deploy and become usable.  But when put the CF war up, it explodes the directory out properly, but then refuses to run the web app.

So I installed a local x64 copy of Tomcat 7.0.50 (same version as Azure) and tried the same thing. Locally, the sample WAR files worked fine (non CF), but when I tried a war produced by the Administrator on CF11 - the one page index.cfm (with only a cfdump in it) fails.

Near as I can tell, it has to do with the web.xml generated by CF 11 Package and Deploy wizard. This is the most relevant error in my stderr log. It appears both in the Azure error log and my local one:

rg.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/world]]

  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)

  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634)

  at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1074)

  at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858)

  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

  at java.util.concurrent.FutureTask.run(Unknown Source)

  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

  at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> *.htm/* in filter mapping

My suspicion is that there is something in the url-pattern mappings that isn't compatible with Tomcat. Perhaps something in the SES (search engine safe) part?

I had always naively believed that deploying CF as a WAR was really easy. Just generate the package and copy it up. Obviously I'm missing something.

Anybody have any tips? Hints? Places to go to look?

I'm hoping to get to the point where I can have an Azure auto-scaling cluster of CF11 applications that share j2ee sessions across the cluster. But I can't even get past the first step...

For anyone following, I did a lot of tweaking and adjusting of settings and web.xml files, and was making progress. (slowly)

Ultimately, though, I ended up with success by building the following web app on azure:

- JVM - 1.8 update 25

- Tomcat 7.0.62

- CF 11 fully updated

And once I had that combination, the war files generated by CF11 Enterprise deployed exactly as easily as I had thought they should. I needed to use the "new preview" portal on azure to specify these versions. They were not available on the "normal" azure provisioning portal.

I also discovered that there seems to be very few places where people are talking about j2ee deployment of CF.

Views

415

Likes

Translate

Translate

Report

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

Attempting the Impossible? Deploy CF11 Enterprise WAR on Azure Tomcat 7?

New Here ,
Oct 22, 2015

Copy link to clipboard

Copied

I'm working on proof of concept of making my app more scaleable and reducing the support footprint on OS patching.

I'm trying to take a CF11 Enterprise generated WAR file, and deploy it onto an Azure Tomcat 7 web app. I've never deployed CF apps on J2EE before, so I'm not sure if my problems are user error, or attempting the impossible.

I can fire up Azure, deploy a Tomcat 7 server, and put a (non CF) war up in the webapp folder, and watch it deploy and become usable.  But when put the CF war up, it explodes the directory out properly, but then refuses to run the web app.

So I installed a local x64 copy of Tomcat 7.0.50 (same version as Azure) and tried the same thing. Locally, the sample WAR files worked fine (non CF), but when I tried a war produced by the Administrator on CF11 - the one page index.cfm (with only a cfdump in it) fails.

Near as I can tell, it has to do with the web.xml generated by CF 11 Package and Deploy wizard. This is the most relevant error in my stderr log. It appears both in the Azure error log and my local one:

rg.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/world]]

  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)

  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)

  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634)

  at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1074)

  at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858)

  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

  at java.util.concurrent.FutureTask.run(Unknown Source)

  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

  at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> *.htm/* in filter mapping

My suspicion is that there is something in the url-pattern mappings that isn't compatible with Tomcat. Perhaps something in the SES (search engine safe) part?

I had always naively believed that deploying CF as a WAR was really easy. Just generate the package and copy it up. Obviously I'm missing something.

Anybody have any tips? Hints? Places to go to look?

I'm hoping to get to the point where I can have an Azure auto-scaling cluster of CF11 applications that share j2ee sessions across the cluster. But I can't even get past the first step...

For anyone following, I did a lot of tweaking and adjusting of settings and web.xml files, and was making progress. (slowly)

Ultimately, though, I ended up with success by building the following web app on azure:

- JVM - 1.8 update 25

- Tomcat 7.0.62

- CF 11 fully updated

And once I had that combination, the war files generated by CF11 Enterprise deployed exactly as easily as I had thought they should. I needed to use the "new preview" portal on azure to specify these versions. They were not available on the "normal" azure provisioning portal.

I also discovered that there seems to be very few places where people are talking about j2ee deployment of CF.

Views

416

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 22, 2015 0
New Here ,
Oct 23, 2015

Copy link to clipboard

Copied

For anyone following, I did a lot of tweaking and adjusting of settings and web.xml files, and was making progress. (slowly)

Ultimately, though, I ended up with success by building the following web app on azure:

- JVM - 1.8 update 25

- Tomcat 7.0.62

- CF 11 fully updated

And once I had that combination, the war files generated by CF11 Enterprise deployed exactly as easily as I had thought they should. I needed to use the "new preview" portal on azure to specify these versions. They were not available on the "normal" azure provisioning portal.

I also discovered that there seems to be very few places where people are talking about j2ee deployment of CF.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 23, 2015 0
TNDev LATEST
New Here ,
May 16, 2016

Copy link to clipboard

Copied

could you please share more details on the different steps to make it work ? I'm really interested in knowing how you did it

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 16, 2016 0