Skip to main content
Inspiring
June 4, 2008
Question

Deploying CF App as WAR on Tomcat

  • June 4, 2008
  • 3 replies
  • 1555 views
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)?

    3 replies

    12Robots
    Participating Frequently
    February 21, 2025

    2025, this problem still exists. 

    Charlie Arehart
    Community Expert
    Community Expert
    February 21, 2025

    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)
    12Robots
    Participating Frequently
    February 21, 2025

    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. 

    Participant
    September 6, 2011

    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!

    July 9, 2008
    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.