Caucho Forums

Caucho Forums (http://forum.caucho.com//index.php)
-   Resin (http://forum.caucho.com//forumdisplay.php?f=4)
-   -   How to disable WelcomeFile exception (http://forum.caucho.com//showthread.php?t=28871)

jalberto 04-24-2012 04:07 PM

How to disable WelcomeFile exception
 
Hi,

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 amicClassLoader.java:1467)
at com.caucho.loader.DynamicClassLoader.loadClass(Dyn amicClassLoader.java:1444)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.caucho.server.dispatch.ServletMapping.initRege xpClass(ServletMapping.java:229)
at com.caucho.server.dispatch.ServletMapping.getServl etClass(ServletMapping.java:169)
at com.caucho.server.dispatch.ServletMapper.getServle tClassByUri(ServletMapper.java:473)
at com.caucho.rewrite.WelcomeFile.matchWelcomeUri(Wel comeFile.java:219)
at com.caucho.rewrite.WelcomeFile.matchWelcomeFileRes ource(WelcomeFile.java:150)
at com.caucho.rewrite.WelcomeFile.map(WelcomeFile.jav a:125)
at com.caucho.server.webapp.WebApp.applyWelcomeFile(W ebApp.java:3902)
at com.caucho.server.webapp.WebApp.buildInvocation(We bApp.java:3828)
at com.caucho.server.webapp.WebAppContainer.buildInvo cation(WebAppContainer.java:781)
at com.caucho.server.host.Host.buildInvocation(Host.j ava:752)
at com.caucho.server.host.HostContainer.buildInvocati on(HostContainer.java:319)
at com.caucho.server.cluster.ServletService.buildInvo cation(ServletService.java:961)
at com.caucho.server.dispatch.InvocationServer.buildI nvocation(InvocationServer.java:247)
at com.caucho.server.dispatch.InvocationServer.buildI nvocation(InvocationServer.java:220)
at com.caucho.server.http.AbstractHttpRequest.buildIn vocation(AbstractHttpRequest.java:1565)
at com.caucho.server.http.AbstractHttpRequest.getInvo cation(AbstractHttpRequest.java:1538)
at com.caucho.server.hmux.HmuxRequest.handleInvocatio n(HmuxRequest.java:457)
at com.caucho.server.hmux.HmuxRequest.handleRequestIm pl(HmuxRequest.java:369)
at com.caucho.server.hmux.HmuxRequest.handleRequest(H muxRequest.java:336)
at com.caucho.network.listen.TcpSocketLink.dispatchRe quest(TcpSocketLink.java:1301)
at com.caucho.network.listen.TcpSocketLink.handleRequ est(TcpSocketLink.java:1257)
at com.caucho.network.listen.TcpSocketLink.handleRequ estsImpl(TcpSocketLink.java:1241)
at com.caucho.network.listen.TcpSocketLink.handleRequ ests(TcpSocketLink.java:1149)
at com.caucho.network.listen.TcpSocketLink.handleKeep aliveTask(TcpSocketLink.java:985)
at com.caucho.network.listen.KeepaliveRequestTask.doT ask(KeepaliveRequestTask.java:55)
at com.caucho.network.listen.ConnectionTask.runThread (ConnectionTask.java:110)
at com.caucho.network.listen.ConnectionTask.run(Conne ctionTask.java:93)
at com.caucho.network.listen.SocketLinkThreadLauncher .handleTasks(SocketLinkThreadLauncher.java:169)
at com.caucho.network.listen.TcpSocketResumeThread.ru n(TcpSocketResumeThread.java:62)
at com.caucho.env.thread2.ResinThread2.runTasks(Resin Thread2.java:173)
at com.caucho.env.thread2.ResinThread2.run(ResinThrea d2.java:118)
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:

<welcome-file-list/>
<resin:Redirect regexp="^/?$" target="http://www.cellectivity.com"/>
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 07: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/resin.properties file.

What http_ping_urls is set to?

Thanks,
Alex

jalberto 04-26-2012 12:34 PM

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.

Regards,

Jose Alberto

alex 04-26-2012 07: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.

Thanks,
Alex

jalberto 04-27-2012 02: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 10: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 12:16 PM

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

jalberto 04-30-2012 12:06 PM

Alex,

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 06: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.
Thanks,
Alex

amahe 05-02-2012 10: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 01:10 PM.

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