Caucho Forums

Caucho Forums (
-   Resin (
-   -   How to disable WelcomeFile exception (

jalberto 04-24-2012 03:07 PM

How to disable WelcomeFile exception

We are getting continuously the following exception in the logs:

java.lang.ClassNotFoundException: file in EnvironmentClassLoader[web-app:production/webapp/default/ROOT-2.0.15]
at com.caucho.loader.DynamicClassLoader.loadClass(Dyn
at com.caucho.loader.DynamicClassLoader.loadClass(Dyn
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at com.caucho.server.dispatch.ServletMapping.initRege xpClass(
at com.caucho.server.dispatch.ServletMapping.getServl etClass(
at com.caucho.server.dispatch.ServletMapper.getServle tClassByUri(
at com.caucho.rewrite.WelcomeFile.matchWelcomeUri(Wel
at com.caucho.rewrite.WelcomeFile.matchWelcomeFileRes ource(
at a:125)
at com.caucho.server.webapp.WebApp.applyWelcomeFile(W
at com.caucho.server.webapp.WebApp.buildInvocation(We
at com.caucho.server.webapp.WebAppContainer.buildInvo cation(
at ava:752)
at on(
at com.caucho.server.cluster.ServletService.buildInvo cation(
at com.caucho.server.dispatch.InvocationServer.buildI nvocation(
at com.caucho.server.dispatch.InvocationServer.buildI nvocation(
at com.caucho.server.http.AbstractHttpRequest.buildIn vocation(
at com.caucho.server.http.AbstractHttpRequest.getInvo cation(
at com.caucho.server.hmux.HmuxRequest.handleInvocatio n(
at com.caucho.server.hmux.HmuxRequest.handleRequestIm pl(
at com.caucho.server.hmux.HmuxRequest.handleRequest(H
at quest(
at est(
at estsImpl(
at ests(
at aliveTask(
at ask(
at (
at .handleTasks(
at n(
at com.caucho.env.thread2.ResinThread2.runTasks(Resin
We do not have nor want a WelcomePage on ROOT, the rewrite of "/" into the correct URL is managed outside Resin. Either watchdog or mod_caucho or Health subsystems are calling this URL every minute.

We have setup the following rules in web.xml:

<resin:Redirect regexp="^/?$" target=""/>
If one accesses directly one of the servers on port 8080 on "/" no exception is thrown and one is correctly redirected as specified. However something is triggering the exception every 60s.

How can I change this behaviour or tell whatever component it is that it must look at some other URL. There are no access entries for "/" on the access logs.

alex 04-24-2012 06:29 PM

You should be able to see what url is being accessed with logging level set to finer. This can be set in conf/ file.

What http_ping_urls is set to?


jalberto 04-26-2012 11:34 AM

We have not set any at the moment, is "/" the default URL?
We were planning to add the ping URLs separate for each one of our webapps, in their own resin-web.xml.

What I do not understand is why this checking is bypassing the <welcome-file-list/> and the <resin:Redirect> settings. As I mentioned, if I go on the browser to "/" the exception is not triggered.


Jose Alberto

alex 04-26-2012 06:25 PM

I am checking against the trunk (since it would be fixed on the trunk).

If the ping url isn't specified (empty) it will be omitted.

Can you check servlet-class mapping in your web.xml. The ones that have ${ as part of the value are the suspects.

There is that mapping & request uri pair that cause Resin to evaluate that servlet-class as a 'file' which is obviously wrong.

You might want to change that mapping to be more strict.


jalberto 04-27-2012 01:15 PM

Hi Alex,

I do not have any ${ at all in the servlet definitions or servlet mappings. If not the watchdog, could it be something like mod_caucho trying to check on the servers?

Jose Alberto

alex 04-27-2012 09:59 PM

Well, it looks like the request is coming in on a HmuxPort, so it could be mod_caucho. I would start with matching the exception to a record in access.log of Resin ( by timestamp).

chrispaul3 04-29-2012 11:16 AM

You might have to change that mapping to be more strict.

jalberto 04-30-2012 11:06 AM


there is nothing funny in the logs that I can see anywhere near the time of the exception. All the records I can see are returning 200 or 304 responses.

This is what is puzzling, we cannot see what could be causing the a request for a welcome-page in particular since we have specified that there is NO welcome-page at all on this application.

Jose Alberto

alex 04-30-2012 05:43 PM

Jose, you might want to turn up logging then on the Resin side, and check if you can see a request. Please also post your Resin version as well, so I can check the stack trace against specific code revision.

amahe 05-02-2012 09:05 PM

Got me thinking
I am trying to find out more on the WelcomeFile exception so this is really helpful.

All times are GMT. The time now is 11:07 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.