[Looking for Charlie's main web site?]

CF911: CF pages get "no web application configured", but CF's "running"

Note: This blog post is from 2009. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
If you find you can't run CF pages (they get "There is no web application configured to service your request") but CF seems to be "running", here's one possible explanation and how to diagnose/resolve the problem.

The problem outlined here has to do with being careful when you're modifying CF to enable/disable RDS (or doing any edits in the [cf]/wwwroot/WEB-INF/web.xml file that controls it.) This applies to CF 6, 7, or 8.

Of course, you may have a different cause for this kind of error. The focus here is this one cause and solution, but I hope that the information shared here on diagnosing the problem may help you if you've got a different problem.

The problem and solution

As many know, enabling/disabling RDS involves removing or adding comments around some XML entries, as explained in this technote.

After making the edits, though, you may find that you get this error when trying to run any CFML pages:

"500

There is no web application configured to service your request"

What happened is you made a mistake I did. I had RDS enabled, so I wanted to disable it, which meant adding comments.

Don't do this

So I modified the XML entry from this:

<!-- begin RDS -->
<servlet-mapping id="coldfusion_mapping_9">
<servlet-name>RDSServlet</servlet-name>
<url-pattern>/CFIDE/main/ide.cfm</url-pattern>
</servlet-mapping>
<!-- end RDS -->

to look like this:

<!-- <!-- begin RDS -->
<servlet-mapping id="coldfusion_mapping_9">
<servlet-name>RDSServlet</servlet-name>
<url-pattern>/CFIDE/main/ide.cfm</url-pattern>
</servlet-mapping>
<!-- end RDS --> -->

That won't work. The problem is that my comment surrounds the section of XML which also includes an existing commented line.

Do this

So the solution is to do something like this instead:

<!-- begin RDS -->
<!--
<servlet-mapping id="coldfusion_mapping_9">
<servlet-name>RDSServlet</servlet-name>
<url-pattern>/CFIDE/main/ide.cfm</url-pattern>
</servlet-mapping>
-->
<!-- end RDS -->

I've only commented out the significant XML entries, not the comment that preceded it. There's a second entry that needs to be commented out as well, as discussed in the technote.

Also, note that you'd get the same error if you mistakenly use CFML comments (three dashes) rather than HTML comments (2 dashes). It's easy to do if you happen to edit the XML file in a CFML editor. I've confirmed it gets the same error indications above.

Diagnosing and resolving this and similar errors

That's the problem and solution. But how did I know that was the cause of the problem. It wasn't as obvious as it may seem.

It seems that CF *is* running--but no, JRun is

As the title of this entry (and the error message above) indicates, the problem was that CF was reporting that there was "no web application configured". Well, it's not really CF reporting that. It's JRun.

Indeed, in this situation one would notice that the jrun.exe process is running, but no CF pages would run.

There's no error reported in the CF/logs

So you may be tempted to look in the CF logs (such as C:\ColdFusion8\logs) but you'll find nothing. In fact, you may note that the logs are not even updated with the time that you had started CF.

The thing is, CF never really started. JRun did, yes, but the CF web application itself (within JRun) did not.

The real diagnostic info is in the Runtime logs

You can see this more clearly if you look instead in the "runtime" logs, which if you run the Server version of CF are in [cf]\runtime\logs\. (If you're running the Multiserver mode or what some call multiple instances, they're in jrun4\logs.)

In the coldfusion-out.log file (or the corresponding -out.log file for whatever instance is failing, if you're running multiple instances), you may see something like this error:

error Error on line 333 of document file:/C:/ColdFusion8/wwwroot/WEB-INF/web.xml: Next character must be ">" terminating comment .
[1]org.xml.sax.SAXParseException: Next character must be ">" terminating comment .

Sure enough, line 333 was where I had made my edit to the first of the XML entries discussed above.

This was followed by other messages (along with lots of stack tracing info to wade through):

info Unregistering enterprise application: file__C__ColdFusion8_#Adobe_ColdFusion_8

error Deployer Service failed to deploy file:/C:/ColdFusion8/
   * Could not deploy web application at file:/C:/ColdFusion8/wwwroot/.
   * Failed to parse XML: file:/C:/ColdFusion8/wwwroot/
   * null

finally showing (after still more stack tracing info):

Server coldfusion ready (startup time: 7 seconds)

Again, we can be mislead by that, thinking, "ok, CF is up". But no, it's just saying that the JRun server named "coldfusion" (or whatever instance you may be running) had started, but the web app for CF itself did not deploy, as the previous error message above showed.

So the moral of the story is to be careful when editing these (and any) XML files.

Side note on RDS

I'll add a note that one other reason people don't use RDS is because it relies on a single password to be shared by all who would use it. Yes, I realize there's still more to the security concerns. Anyway, if that's the most significant issue for you, there's a new feature in CF 8 Enterprise to address that, in the new option to enable multiple different user accounts for both the Administrator and RDS.

And in fact, I just did an Adobe DevCenter article introducing this feature at length (and I point to more about the other security concerns to consider before enabling RDS.) It's supposed to be coming out later today (at 4pm eastern), and I would assume it will be at the CF dev center.

For more content like this from Charlie Arehart: Need more help with problems?
  • If you may prefer direct help, rather than digging around here/elsewhere or via comments, he can help via his online consulting services
  • See that page for more on how he can help a) over the web, safely and securely, b) usually very quickly, c) teaching you along the way, and d) with satisfaction guaranteed
Comments
Thanks for posting this, Charlie! It gave some good leads. For us, though, what it turned out to be was a Windows permission issue. The log entries were exactly the same as you describe, /but/ our web.xml was the default and compared exactly to other web.xml files. Apparently, the account that starts ColdFusion was missing from the cfusion.war directory. Once we added that account in and propagated it to all children, ColdFusion started just fine and Cf is happy again.

best regards,
bill
Thanks for the extra info, Bill. But I'm curious: you say that your "log entries were exactly the same as [I] describe", but that the error was caused by the fact that "the account that starts ColdFusion was missing from the cfusion.war directory".

I wonder if by "log entries being the same" you may have been referring to the error message shown to the user, because the message I pointed to (in the runtime/logs) clearly pointed to an XML problem.

You're not saying that you got THAT error in the runtime logs, are you? I just don't see how that would be solved by an account permission correction.

Indeed, the real point of the blog entry was to point people to the runtime logs to find the root cause. I'd be curious what yours reported, as much to help others who may then find that and search for a solution, in which case they may find this and your helpful observation. To that point, can you clarify what permission you defined for the user, in case it's significant?

I'll say also that did say at the outset that I was offering *one possible explanation* for the general problem of the "no web application configured" error. I don't mind if others may share more observations of other reasons and solutions. But along the lines of the above, I'd say it would be helpful to provide what the key runtime error log message was so people can really connect the dots.

Looking forward to your update, Bill, if you still have the info at hand.
thanks so much
# Posted By Kelvin | 10/10/09 6:03 AM
Copyright ©2024 Charlie Arehart
Carehart Logo
BlogCFC was created by Raymond Camden. This blog is running version 5.005.
(Want to validate the html in this page?)

Managed Hosting Services provided by
Managed Dedicated Hosting