Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Occasional server start-up error
Occasional server start-up error [message #531392] Tue, 04 May 2010 17:10 Go to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3196
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

[Moving from newcomers' to here...]

Once or twice per day, I'm wont to get an error

Error configuring application listener of class
org.apache.myfaces.webapp.StartupServletContextListener

at the console when I start the Tomcat server associated with my (JSF,
Dynamic Web) project. It takes me rattling around, refreshing the
project, stopping, cleaning the server, bouncing Eclipse and usually
bouncing Eclipse once or even twice with the -clean option to clear it
so I can get back to work.

On rare occasion, after -clean[ing] my workspace, I later find it causes
Eclipse to refuse to start up on it until I bounce my development host
(presumably because Eclipse files are still "locked").

If anyone has encountered this "instability," I should be grateful for a
pointer. It's a given it's something I've done wrong, but I've combed
through my entire project at the smallest detail to figure out why it's
happening.

Window 7 64-bit Professional
Eclipse Galileo 32-bit
JSF 1.2 (Apache MyFaces)
JSTL 1.2 (from GlassFish)
Apache Tomcat 6.0
jdk1.6.0_20

Please see the Eclipse console error excerpt at
http://www.javahotchocolate.com/trouble/server-start-error.h tml

Please see my Build Path particulars at
http://www.javahotchocolate.com/trouble/build-path-particula rs.png

And, if useful, my project web.xml and faces-config.xml at
http://www.javahotchocolate.com/trouble/web.xml
http://www.javahotchocolate.com/trouble/faces-config.xml

Thanks for any help or suggestions you can offer.

Russ Bateman
Re: Occasional server start-up error [message #531644 is a reply to message #531392] Wed, 05 May 2010 16:35 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
Russ Bateman wrote:
> [Moving from newcomers' to here...]
>
> Once or twice per day, I'm wont to get an error
>
> Error configuring application listener of class
> org.apache.myfaces.webapp.StartupServletContextListener
>
> at the console when I start the Tomcat server associated with my (JSF,
> Dynamic Web) project. It takes me rattling around, refreshing the
> project, stopping, cleaning the server, bouncing Eclipse and usually
> bouncing Eclipse once or even twice with the -clean option to clear it
> so I can get back to work.
>
> On rare occasion, after -clean[ing] my workspace, I later find it causes
> Eclipse to refuse to start up on it until I bounce my development host
> (presumably because Eclipse files are still "locked").
>
> If anyone has encountered this "instability," I should be grateful for a
> pointer. It's a given it's something I've done wrong, but I've combed
> through my entire project at the smallest detail to figure out why it's
> happening.
>
> Window 7 64-bit Professional
> Eclipse Galileo 32-bit
> JSF 1.2 (Apache MyFaces)
> JSTL 1.2 (from GlassFish)
> Apache Tomcat 6.0
> jdk1.6.0_20
>
> Please see the Eclipse console error excerpt at
> http://www.javahotchocolate.com/trouble/server-start-error.h tml
>
> Please see my Build Path particulars at
> http://www.javahotchocolate.com/trouble/build-path-particula rs.png
>
> And, if useful, my project web.xml and faces-config.xml at
> http://www.javahotchocolate.com/trouble/web.xml
> http://www.javahotchocolate.com/trouble/faces-config.xml
>
> Thanks for any help or suggestions you can offer.
>
> Russ Bateman

Have you verified that the myfaces jar that contains the
StartupServletContextListener (I assume myfaces-impl-1.2.8.jar) is
present in the published webapp? If so, the problem would seem to be
local to Tomcat and enabling some logging might be the best next step to
diagnose. If the jar is missing, then we would need to try to determine
why WTP server publishing is causing it to go missing.

Cheers,
Larry
Re: Occasional server start-up error [message #531667 is a reply to message #531644] Wed, 05 May 2010 17:55 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3196
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 5/5/2010 10:35 AM, Larry Isaacs wrote:
> Russ Bateman wrote:
>> [snip]
>
> Have you verified that the myfaces jar that contains the
> StartupServletContextListener (I assume myfaces-impl-1.2.8.jar) is
> present in the published webapp? If so, the problem would seem to be
> local to Tomcat and enabling some logging might be the best next step to
> diagnose. If the jar is missing, then we would need to try to determine
> why WTP server publishing is causing it to go missing.
>
> Cheers,
> Larry

Yes, that's the first thing I did. It's myfaces-impl-1.2.8.jar that
contains the listener. I think that's why it's intermittent: it
occasionally works when planetary and stellar alignment appears propitious.
Re: Occasional server start-up error [message #531934 is a reply to message #531667] Thu, 06 May 2010 14:35 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
Russ Bateman wrote:
> On 5/5/2010 10:35 AM, Larry Isaacs wrote:
>> Russ Bateman wrote:
>>> [snip]
>>
>> Have you verified that the myfaces jar that contains the
>> StartupServletContextListener (I assume myfaces-impl-1.2.8.jar) is
>> present in the published webapp? If so, the problem would seem to be
>> local to Tomcat and enabling some logging might be the best next step to
>> diagnose. If the jar is missing, then we would need to try to determine
>> why WTP server publishing is causing it to go missing.
>>
>> Cheers,
>> Larry
>
> Yes, that's the first thing I did. It's myfaces-impl-1.2.8.jar that
> contains the listener. I think that's why it's intermittent: it
> occasionally works when planetary and stellar alignment appears propitious.

Russ,

You can try the following logging.properties file. Add it to the
appropriate folder under the Servers project in your workspace and
publish the server.

----- logging.properties -----
handlers = java.util.logging.ConsoleHandler,
1loaderlog.java.util.logging.FileHandler

..handlers = java.util.logging.ConsoleHandler

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter =
java.util.logging.SimpleFormatter

# Use java.util.logging.FileHandler to avoid appending. Create log of
just current session.
1loaderlog.java.util.logging.FileHandler.level = FINEST
1loaderlog.java.util.logging.FileHandler.pattern =
${catalina.base}/logs/loader.log
1loaderlog.java.util.logging.FileHandler.formatter =
java.util.logging.SimpleFormatter

org.apache.catalina.loader.WebappClassLoader.level = FINEST
org.apache.catalina.loader.WebappClassLoader.handlers =
1loaderlog.java.util.logging.FileHandler

org.apache.catalina.loader.WebappLoader.level = FINEST
org.apache.catalina.loader.WebappLoader.handlers =
1loaderlog.java.util.logging.FileHandler
----------

Repair all lines that got wrapped lines. This should write a
"logs/loader.log" in the catalina.base directory of your server. Only
the log from the current session is kept, so save a copy of a good
startup and compare to a copy from a startup that exhibits the problem.
Maybe it will provide a clue as to what is going wrong, or what to
check next.

Cheers,
Larry
Re: Occasional server start-up error [message #531986 is a reply to message #531934] Thu, 06 May 2010 16:54 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3196
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 5/6/2010 8:35 AM, Larry Isaacs wrote:
> Russ Bateman wrote:
>> On 5/5/2010 10:35 AM, Larry Isaacs wrote:
>>> Russ Bateman wrote:
>>>> [snip]
>
> ... This should write a
> "logs/loader.log" in the catalina.base directory of your server. Only
> the log from the current session is kept, so save a copy of a good
> startup and compare to a copy from a startup that exhibits the problem.
> Maybe it will provide a clue as to what is going wrong, or what to check
> next.

Okay, I added this logging.properties to Servers -> Tomcat v6.0 Server
at localhost-config in my workspace alongside existing files
catalina.policy, catalina.properties, context.xml, server.xml,
tomcat-users.xml, web.xml. Based on your instructions, there really
wasn't anywhere else to put it, I think.

Re-running (it worked this time, i.e.: didn't get the error about the
missing listener, possibly because I bounced Eclipse wtih the -clean
option), I found no loader.log anywhere in my filesystem and I saw no
files whatsoever under the Tomcat logs subdirectory.

Installation note: I have exactly only Apache Tomcat v6.0 associated
with any of my Eclipse workspaces and exactly only one download of it at:

C:\Users\russ\dev\download\apache-tomcat-6.0.26

I assume I'm supposed to find what I'm looking for under the logs
subdirectory on the above path.

On that path, under conf, there is, of course, a whole different
logging.properties file, the one that came with Tomcat. I also tried
replacing that one, but no loader.log was deposited on my system.

Of course, I know this will happen again because I was able to work
yesterday without it only to encounter it again this morning. I'm eager
to track down the cause for this as I'd like to be able to tell others
how to eliminate it.

Advice?

Russ
Re: Occasional server start-up error [message #531997 is a reply to message #531986] Thu, 06 May 2010 17:43 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
Russ Bateman wrote:
> On 5/6/2010 8:35 AM, Larry Isaacs wrote:
>> Russ Bateman wrote:
>>> On 5/5/2010 10:35 AM, Larry Isaacs wrote:
>>>> Russ Bateman wrote:
>>>>> [snip]
>>
>> ... This should write a
>> "logs/loader.log" in the catalina.base directory of your server. Only
>> the log from the current session is kept, so save a copy of a good
>> startup and compare to a copy from a startup that exhibits the problem.
>> Maybe it will provide a clue as to what is going wrong, or what to check
>> next.
>
> Okay, I added this logging.properties to Servers -> Tomcat v6.0 Server
> at localhost-config in my workspace alongside existing files
> catalina.policy, catalina.properties, context.xml, server.xml,
> tomcat-users.xml, web.xml. Based on your instructions, there really
> wasn't anywhere else to put it, I think.
>
> Re-running (it worked this time, i.e.: didn't get the error about the
> missing listener, possibly because I bounced Eclipse wtih the -clean
> option), I found no loader.log anywhere in my filesystem and I saw no
> files whatsoever under the Tomcat logs subdirectory.
>
> Installation note: I have exactly only Apache Tomcat v6.0 associated
> with any of my Eclipse workspaces and exactly only one download of it at:
>
> C:\Users\russ\dev\download\apache-tomcat-6.0.26
>
> I assume I'm supposed to find what I'm looking for under the logs
> subdirectory on the above path.
>
> On that path, under conf, there is, of course, a whole different
> logging.properties file, the one that came with Tomcat. I also tried
> replacing that one, but no loader.log was deposited on my system.
>
> Of course, I know this will happen again because I was able to work
> yesterday without it only to encounter it again this morning. I'm eager
> to track down the cause for this as I'd like to be able to tell others
> how to eliminate it.
>
> Advice?
>
> Russ
>
>

By default, new Tomcat servers create a separate instance of Tomcat.
See the Tomcat FAQ [1] for details. The result is that your
"catalina.base" is at likely at
"<workspace>/.metadata/.plugins/org.eclipse.wst.server.core/tmp0 ". That
is where the "logs" folder will be found. The path you cite above is
your "catalina.home".

Cheers,
Larry

[1] http://wiki.eclipse.org/WTP_Tomcat_FAQ
Re: Occasional server start-up error [message #533009 is a reply to message #531392] Tue, 11 May 2010 19:53 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3196
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 5/4/2010 11:10 AM, Russ Bateman wrote:
> [Moving from newcomers' to here...]
>
> Once or twice per day, I'm wont to get an error
>
> Error configuring application listener of class
> org.apache.myfaces.webapp.StartupServletContextListener
>
> at the console when I start the Tomcat server associated with my (JSF,
> Dynamic Web) project. It takes me rattling around, refreshing the
> project, stopping, cleaning the server, bouncing Eclipse and usually
> bouncing Eclipse once or even twice with the -clean option to clear it
> so I can get back to work.
>
> [snip]

In the end, there's no hard solution and I don't know if this is
Tomcat's or Eclipse's fault (or somehow mine). I have had to:

1) Stop and restart the server (usually doesn't work)
2) Bounce Eclipse (usually doesn't help)
3) Bounce Eclipse with -clean option (sometimes helps)
4) Delete the server in the Server view (pane) and from the Project
Explorer view (pane) including subdirectories, then re-create a Tomcat
6.0 server (usually works)
5) Both #3 and #4 (almost always works)

Once it works at all, it usually keeps on working for the duration of my
productive morning or afternoon, though not always. However, when I come
in in the morning or go home at night (I use this both at work and at
home), I almost always have to perform this work-around.

This is sad, but as we're dealing with 5+ year-old technology no one
uses anymore but me, it's no big deal.

Onward and upward...

Russ
Re: Occasional server start-up error [message #533014 is a reply to message #533009] Tue, 11 May 2010 20:34 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
Russ Bateman wrote:
> On 5/4/2010 11:10 AM, Russ Bateman wrote:
>> [Moving from newcomers' to here...]
>>
>> Once or twice per day, I'm wont to get an error
>>
>> Error configuring application listener of class
>> org.apache.myfaces.webapp.StartupServletContextListener
>>
>> at the console when I start the Tomcat server associated with my (JSF,
>> Dynamic Web) project. It takes me rattling around, refreshing the
>> project, stopping, cleaning the server, bouncing Eclipse and usually
>> bouncing Eclipse once or even twice with the -clean option to clear it
>> so I can get back to work.
>>
>> [snip]
>
> In the end, there's no hard solution and I don't know if this is
> Tomcat's or Eclipse's fault (or somehow mine). I have had to:
>
> 1) Stop and restart the server (usually doesn't work)
> 2) Bounce Eclipse (usually doesn't help)
> 3) Bounce Eclipse with -clean option (sometimes helps)
> 4) Delete the server in the Server view (pane) and from the Project
> Explorer view (pane) including subdirectories, then re-create a Tomcat
> 6.0 server (usually works)
> 5) Both #3 and #4 (almost always works)
>
> Once it works at all, it usually keeps on working for the duration of my
> productive morning or afternoon, though not always. However, when I come
> in in the morning or go home at night (I use this both at work and at
> home), I almost always have to perform this work-around.
>
> This is sad, but as we're dealing with 5+ year-old technology no one
> uses anymore but me, it's no big deal.
>
> Onward and upward...
>
> Russ

What happens with:

6) Right-click on server in Servers view and select "Clean...", which
forces a "full" publish.

Using 4, definitely results in a "full" publish. Using 3, I don't know
about. If 6 works about as well as 4, then it may suggest that the jar
is somehow getting corrupted after it has been successfully published.
Normal publishing won't copying it again unless WTP thinks the original
jar referenced by the project has changed.

Cheers,
Larry
Re: Occasional server start-up error [message #533016 is a reply to message #533014] Tue, 11 May 2010 21:08 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3196
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 5/11/2010 2:34 PM, Larry Isaacs wrote:
> Russ Bateman wrote:
>> On 5/4/2010 11:10 AM, Russ Bateman wrote:
>>> [Moving from newcomers' to here...]
>>>
>>> Once or twice per day, I'm wont to get an error
>>>
>>> Error configuring application listener of class
>>> org.apache.myfaces.webapp.StartupServletContextListener
>>>
>>> at the console when I start the Tomcat server associated with my (JSF,
>>> Dynamic Web) project. It takes me rattling around, refreshing the
>>> project, stopping, cleaning the server, bouncing Eclipse and usually
>>> bouncing Eclipse once or even twice with the -clean option to clear it
>>> so I can get back to work.
>>>
>>> [snip]
>
> What happens with:
>
> 6) Right-click on server in Servers view and select "Clean...", which
> forces a "full" publish.
>
> Using 4, definitely results in a "full" publish. Using 3, I don't know
> about. If 6 works about as well as 4, then it may suggest that the jar
> is somehow getting corrupted after it has been successfully published.
> Normal publishing won't copying it again unless WTP thinks the original
> jar referenced by the project has changed.
>
> Cheers,
> Larry

Yes, my fault. I'd been doing that since the very beginning and forgot
to list it as part of #1. I never stop, but what I also clean--out of
superstition. I've even tried removing and re-adding the project to the
list of projects the server knows about.

#2 and #3 were, admittedly, more based on frustration and superstition
than empirical evidence.

When you say "JAR" here, I assume you mean a sort of "hidden JAR" that
is my project that only Eclipse knows about until I ask it to build me a
deployable object (a WAR, I assume, I haven't got that far yet).

Russ
Re: Occasional server start-up error [message #533180 is a reply to message #533016] Wed, 12 May 2010 13:52 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
Russ Bateman wrote:
> On 5/11/2010 2:34 PM, Larry Isaacs wrote:
>> Russ Bateman wrote:
>>> On 5/4/2010 11:10 AM, Russ Bateman wrote:
>>>> [Moving from newcomers' to here...]
>>>>
>>>> Once or twice per day, I'm wont to get an error
>>>>
>>>> Error configuring application listener of class
>>>> org.apache.myfaces.webapp.StartupServletContextListener
>>>>
>>>> at the console when I start the Tomcat server associated with my (JSF,
>>>> Dynamic Web) project. It takes me rattling around, refreshing the
>>>> project, stopping, cleaning the server, bouncing Eclipse and usually
>>>> bouncing Eclipse once or even twice with the -clean option to clear it
>>>> so I can get back to work.
>>>>
>>>> [snip]
>>
>> What happens with:
>>
>> 6) Right-click on server in Servers view and select "Clean...", which
>> forces a "full" publish.
>>
>> Using 4, definitely results in a "full" publish. Using 3, I don't know
>> about. If 6 works about as well as 4, then it may suggest that the jar
>> is somehow getting corrupted after it has been successfully published.
>> Normal publishing won't copying it again unless WTP thinks the original
>> jar referenced by the project has changed.
>>
>> Cheers,
>> Larry
>
> Yes, my fault. I'd been doing that since the very beginning and forgot
> to list it as part of #1. I never stop, but what I also clean--out of
> superstition. I've even tried removing and re-adding the project to the
> list of projects the server knows about.

You would have to publish after the removal, for add/remove to have an
effect.

>
> #2 and #3 were, admittedly, more based on frustration and superstition
> than empirical evidence.
>
> When you say "JAR" here, I assume you mean a sort of "hidden JAR" that
> is my project that only Eclipse knows about until I ask it to build me a
> deployable object (a WAR, I assume, I haven't got that far yet).
>
> Russ

The "JAR" would be the one in the WEB-INF/lib of your webapp down under
" .metadata\.plugins\org.eclipse.wst.server.core\tmp?\wtpwebap ps ".
This one would be the one being used by Tomcat at runtime and in which
it would expect to find the class. Normal publishing would copy it once
and not re-copy it unless a "full" publish occurred. Corruption of this
jar is the only simple explanation I can think of as to why the problem
"sticks" once it occurs. If the jar is still intact, I would think the
problem would be hit or miss.

If jar corruption isn't it, then I don't have any good guesses as to
what the cause is, especially since it sounds like this is happening on
multiple machines. Have you had any issues with any poltergeists lately? :)

Note that this ClassNotFoundException thrown from line 1516 of
WebappClassLoader of Tomcat 6.0.26 is the "I give up"
ClassNotFoundException. It's conceivable that the internal attempt to
load the class which should have succeeded, fails due to some problem
other than the class not being found. The "search" to load the class
could continue and the "real" problem goes unreported. The purpose of
the logging.properties file is to hopefully log that internal load failure.

Cheers,
Larry
Re: Occasional server start-up error [message #533185 is a reply to message #533180] Wed, 12 May 2010 14:01 Go to previous message
Russell Bateman is currently offline Russell Bateman
Messages: 3196
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

Alas. Over the years, colleagues have indeed accused me of being
inordinately and too frequently subject to gremlins!

;)

Thanks for your attentiveness, Larry.

Russ

On 5/12/2010 7:52 AM, Larry Isaacs wrote:
> Russ Bateman wrote:
>> On 5/11/2010 2:34 PM, Larry Isaacs wrote:
>>> Russ Bateman wrote:
>>>> On 5/4/2010 11:10 AM, Russ Bateman wrote:
>>>>> [snip]
>
> If jar corruption isn't it, then I don't have any good guesses as to
> what the cause is, especially since it sounds like this is happening on
> multiple machines. Have you had any issues with any poltergeists lately? :)
>
> [snip]
>
> Cheers,
> Larry
>
Previous Topic:Extending JSDT
Next Topic:Cant find my service listed in Axis2
Goto Forum:
  


Current Time: Mon Sep 22 10:12:47 GMT 2014

Powered by FUDForum. Page generated in 0.03003 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software