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

Deploying CF App as WAR on Tomcat

Participant ,
Jun 04, 2008 Jun 04, 2008

Copy link to clipboard

Copied

I'm trying to deploy a simple CF8 application on Tomcat 5.5 as a WAR file. I've done the export of the app from the CF Admin as a WAR file and copied it over to my Tomcat webapps directory. When I first tried to start Tomcat, I got an error related to the "*.cfml/*" servlet-mappings in web.xml, so I commented those out based on a post I found elsewhere. But now I'm getting this error, and I can't figure out why:

javax.servlet.ServletException: Invalid configuration at line 2 in file /usr/local/apache-tomcat-5.5.23/webapps/wishlist/WEB-INF/flex/flex-config.xml - cvc-elt.1: Cannot find the declaration of element 'flex-config'.
at flex.server.j2ee.cache.CacheFilter.setupFlexService(CacheFilter.java:93)

The flex/flex-config.xml file is there, and line 2 reads:
<flex-config xmlns=" http://www.adobe.com/2006/flex-config">

Are there other manual edits I need to make in order to get this to work? If Flex is the problem, can I disable it from being included in the WAR? Has anyone done this (putting a ColdFusion WAR file on Tomcat)?

Views

1.3K
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
community guidelines
Guest
Jul 09, 2008 Jul 09, 2008

Copy link to clipboard

Copied

Dear,

I encountered the same problem on Tomcat when starting a deployed coldfusion as war.

Did you find out the problem, I'm having similar problems on weblogic.

Any help would be great.

Thanks.

Votes

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
community guidelines
New Here ,
Sep 06, 2011 Sep 06, 2011

Copy link to clipboard

Copied

Dear jarviswabi,

Could you believe I just ran into the same problem you had in 2008, and STILL there are no documented solution to this issue.

I am trying to deploy a simple CF code using Tomcat 7.0.20, and it just does not work!

How did you ever resolve this error in Tomcat?  It is supposed to be pretty staright forward, but it just does not work.

Any ideas?  been looking for days...

Appeciate any  insight yo may have into this problem.

Thanks!

Votes

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
community guidelines
Advocate ,
Feb 21, 2025 Feb 21, 2025

Copy link to clipboard

Copied

2025, this problem still exists. 

Votes

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
community guidelines
Community Expert ,
Feb 21, 2025 Feb 21, 2025

Copy link to clipboard

Copied

Jason, what's not working? I'd not expect you're getting the exact same error reported above in this post from 17 years ago. 🙂

 

Also, there are a few ways to obtain a cf war. Which are you using? Creating one from the cf installer, by downloading the war from Adobe, or by creating it from within the cf admin?

 

I can confirm I've done it successfully all 3 ways, in that order of the least effort needed (post deployment of the war): none with the first, one step with the second, and some tweaks needed in the web.xml of the 3rd.

 

I suspect the latter is the trouble you're hitting. So first, you may want to consider the other ways, especially the first. But as for that third, I had to carefully remove all the references to flex and flash. I'm sure I could narrow it down to the least needing to be removed. I might also be able to find what is missing to make it work. I've not been compelled and no one has yet offered to cover that in consulting. 🙂

 

Once you clarify your issue, and if it remains after this help, perhaps Adobe may even step in here. 


/Charlie (troubleshooter, carehart.org)

Votes

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
community guidelines
Advocate ,
Feb 21, 2025 Feb 21, 2025

Copy link to clipboard

Copied

java.lang.ClassNotFoundException: flex.server.j2ee.cache.CacheFilter

 

You are correct, I am trying to use the method of creating it from the CF admin, which, I don't know, should work without having to unpack the WAR, diddle with the web.xml and then have to repack the war, don't you think?

I did get it to work by using the installer WAR, unpacking it, adding my app, then repacking it, but that is dumb. Is that how people need to go about automating their deployments with ColdFusion? It seems like whatever method you go with you need to unpack the WAR, add your code, and repack it.  What's the point of the CFadmin tool if it doesn't work? THis garbage is frustrating. 

Votes

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
community guidelines
Community Expert ,
Feb 21, 2025 Feb 21, 2025

Copy link to clipboard

Copied

Jason, I appreciate this frustrates you. Don't shoot the messenger, though: you know I don't work for Adobe. 🙂

 

And of course I agree, on your first question. I shared how I got it to work, upon seeing your question.

 

Do others do such diddling? Not if they use the war built via the installer. And I'd not seen anyone else ask about this in years, which suggests others either diddle or move on--without sharing news here.

 

And now that you confirm getting that same flex error, we have something you can report to Adobe at tracker.adobe.com. Again, sadly many never bother (in their frustration), so problems linger.

 

And that's why I offered the suggestion I did, not only to help you (sincerely) but also to help future readers, in case it's another 10+ years before the thread gets new responses. 🙂

 

But all this has motivated me to want to do a post on the various ways to get and package a cf war--including identifying any needed steps to get it working. (It's an approach probably used in a tiny percent of cf deployments, but I do like filling in such gaps in the community knowledge of a topic.)

 

One other piece of potential good news: cf2025 is removing all the flex and flash support finally. So it may be that this problem doesn't happen with that version. I'm on a phone so can't try it. In any case,  I hope you'll file that bug report--since cf2023 still has 3+ years of life remaining. 

 


/Charlie (troubleshooter, carehart.org)

Votes

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
community guidelines
Advocate ,
Feb 24, 2025 Feb 24, 2025

Copy link to clipboard

Copied

LATEST

I apologize, Charlie. I did not mean to come off as, in any way, upset with you. I know you do not work for Adobe, and I know the value you bring to the community.  I appreciate your response. 

 

My frustration is purely with Adobe. The fact that they still have Flex/Flash settings enabled in the web.xml in CF 2023 is ridiculous. 

I did manage to get a successful deployment by diddling with the web.xml.  I deployed my .war from the cfadmin, unpacked it, replaced the web.xml with the one that was created by installer, repacked the .war and deployed. That worked. It's is ridiculous that one needs to go through all of those steps to deploy a war. Now I will need to script something to perform all of those steps for me, when it should just deploy a war that will work on any servlet container or at least give options to remove things like the Flash/Flex garbage. 

I am already in contact with Adobe support.  So far, they have just given me the run around and have yet to offer any real help.  We'll see if that changes.  So far I have gotten back to reponses. 

Their first response was "RTFM". The second response was "Please send the logs", which I sent in the first email.  So far, so good.  😞

Votes

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
community guidelines
Resources