Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Web Application Failed to start
Web Application Failed to start [message #551623] Sun, 08 August 2010 12:35 Go to next message
Anthony is currently offline Anthony
Messages: 38
Registered: July 2010
Member
Hi,

I'm getting the following error, whenever I add any type of listener to my web.xml file. I was under the impression from all the documentation that I've read that listeners were just meant to work. Can anyone shed some light on this for me?

Start failed for bundle 'SimpleJSFBundle2' version '1.0.0'. org.eclipse.virgo.kernel.deployer.core.DeploymentException: Web application failed to start
	at org.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:129)
	at org.eclipse.virgo.kernel.install.artifact.internal.ArtifactStateMonitor.onStarted(ArtifactStateMonitor.java:205)
	at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.asyncStartSucceeded(AbstractInstallArtifact.java:272)
	at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.access$0(AbstractInstallArtifact.java:269)
	at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact$StateMonitorSignal.signalSuccessfulCompletion(AbstractInstallArtifact.java:222)
	at org.eclipse.virgo.kernel.core.internal.BundleStartTracker$1.run(BundleStartTracker.java:140)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: org.eclipse.gemini.web.core.WebApplicationStartFailedException: org.eclipse.gemini.web.core.spi.ServletContainerException: Web application at '/simpleJSF' failed to start. Check the logs for more details.
	at org.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:107)
	at org.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:120)
	... 8 common frames omitted
Caused by: org.eclipse.gemini.web.core.spi.ServletContainerException: Web application at '/simpleJSF' failed to start. Check the logs for more details.
	at org.eclipse.gemini.web.tomcat.internal.TomcatServletContainer.startWebApplication(TomcatServletContainer.java:123)
	at org.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:90)
	... 9 common frames omitted


Also it says check logs for more details. I've cheked all the logs in the servicability logs and I they all have the same error message. Am I supposed to be looking somewhere else or to have configured logging somewhere?
Re: Web Application Failed to start [message #551811 is a reply to message #551623] Mon, 09 August 2010 16:01 Go to previous messageGo to next message
Steve Powell
Messages: 23
Registered: January 2010
Location: Southampton
Junior Member
Hi Anthony,

The logs it is referring to are probably Catalina (Tomcat) logs. Have you looked for these?
The connection to 'listeners' is not clear from what you say. Can you be more specific?


Steve Powell :-/
Re: Web Application Failed to start [message #551840 is a reply to message #551811] Mon, 09 August 2010 17:45 Go to previous messageGo to next message
Anthony is currently offline Anthony
Messages: 38
Registered: July 2010
Member
Hi Steve,

Many thanks for your reply. I've looked in the documentation which has a mention of the Catalina logs but I can't find them in my servicability folder. I couldn't find anywhere that mentioned I would have to configure these in any special way. The access log files are created but I was expecting maybe a file catalina.log or something that would indicate tomcat specific errors but i can't find anything relating to this.

The issue that I'm having with the listener is trying to add the configure listener, which is required to setup JSF. The code is as follows

<listener>
		<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
	</listener>


I've also tried adding a Custom ServletContextListener that I have in my app but this also breaks the startup in the same way. Hope you can help.
Re: Web Application Failed to start [message #552252 is a reply to message #551840] Wed, 11 August 2010 12:57 Go to previous messageGo to next message
Chris Frost is currently offline Chris Frost
Messages: 230
Registered: January 2010
Location: Southampton, England
Senior Member

Hi,

Where do you define this configure listener, is it in the servlet context or the bundles context file under META-INF. I'm assuming it is in the servlet context?

The Stack trace you have below is a symptom of something else having gone wrong, there should be a stack trace or at lease an error previously in the trace.

The logging output from Tomcat will be mixed in with all the other logging. My normal approach is to shut the server down, set the master logging level up to INFO or DEBUG in the serviceability file and then do a clean start to make sure all the old output is wiped. Then recreate the problem and shut down.

Once I've found the first sign of error I try to understand what is going on. I normally stick to the master log file so it's got everything in it. If your not sure or the cause looks like it's coming from the server then send me a copy and I'll have a look.

Chris.


------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.
Re: Web Application Failed to start [message #552270 is a reply to message #552252] Wed, 11 August 2010 14:11 Go to previous messageGo to next message
Anthony is currently offline Anthony
Messages: 38
Registered: July 2010
Member
Thanks Chris, I'll take a look at this debugging method as soon as I get five minutes peace from the current project.
Re: Web Application Failed to start [message #559564 is a reply to message #552270] Fri, 17 September 2010 08:32 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
I made a little progress with JSF 2.0 which may be of interest. The attached sample works (to some extent) - see the README inside it for instructions.

Note that I reworked the JSF RI bundle in the Enterprise Bundle Repository to be a fragment of the JSF API (both at version 2.0.0.PR). It was then possible to get the above trivial JSF sample to work.

I feel that this has cracked the basic class loading issues, although there is a smaller issue remaining about resource loading which is described in the README.

Some more background is available in the issue we used to track the work in this week's sprint.
  • Attachment: jsf-hello.zip
    (Size: 10.26MB, Downloaded 327 times)
Re: Web Application Failed to start [message #559577 is a reply to message #559564] Fri, 17 September 2010 09:16 Go to previous messageGo to next message
Anthony is currently offline Anthony
Messages: 38
Registered: July 2010
Member
Hi Glynn,

Thank you for taking a look at this and getting a working copy, it's very much appreciated. I mentioned to Chris that I'm in a bit of a spot at the moment with too much work on and not enough employees! But I'm going to get back onto the OSGI migration as soon as my time is cleared up (approx 4 weeks), thanks again for setting a working project,

All the best,

Anthony.
Re: Web Application Failed to start [message #559592 is a reply to message #559577] Fri, 17 September 2010 10:24 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
Hi Anthony

You're welcome. Keep in touch.

Glyn
Re: Web Application Failed to start [message #606829 is a reply to message #551840] Wed, 11 August 2010 12:57 Go to previous messageGo to next message
Chris Frost is currently offline Chris Frost
Messages: 230
Registered: January 2010
Location: Southampton, England
Senior Member

Hi,

Where do you define this configure listener, is it in the servlet context or the bundles context file under META-INF. I'm assuming it is in the servlet context?

The Stack trace you have below is a symptom of something else having gone wrong, there should be a stack trace or at lease an error previously in the trace.

The logging output from Tomcat will be mixed in with all the other logging. My normal approach is to shut the server down, set the master logging level up to INFO or DEBUG in the serviceability file and then do a clean start to make sure all the old output is wiped. Then recreate the problem and shut down.

Once I've found the first sign of error I try to understand what is going on. I normally stick to the master log file so it's got everything in it. If your not sure or the cause looks like it's coming from the server then send me a copy and I'll have a look.

Chris.
--
------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.


------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.
Re: Web Application Failed to start [message #606832 is a reply to message #606829] Wed, 11 August 2010 14:11 Go to previous messageGo to next message
Anthony is currently offline Anthony
Messages: 38
Registered: July 2010
Member
Thanks Chris, I'll take a look at this debugging method as soon as I get five minutes peace from the current project.
Re: Web Application Failed to start [message #657293 is a reply to message #606832] Wed, 02 March 2011 10:58 Go to previous messageGo to next message
Matt Fellows is currently offline Matt Fellows
Messages: 28
Registered: February 2011
Junior Member
Just an FYI, to get the JSF sample working as mentioned in https://issuetracker.springsource.com/browse/DMS-2874 I also needed to download the latest juli, embed that into the sample JAR and update the Manifest.

EDIT: I've attached the working sample.war

Steps:

1. Install a clean Virgo server (virgo-web-server-2.1.0.RELEASE)
2. Follow the steps Glyn outlines in DMS-2874
3. Download the juli JAR file, I used the following Maven dependency to download it locally, and then copied that into the WAR.

<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>juli</artifactId>
    <version>6.0.26</version>
</dependency>


4. Add the JAR file

 cd ~ 
 mkdir sample
 cd sample
 cp ~/Downloads/org.eclipse.virgo.sample.jsf.web.war 
 unzip org.eclipse.virgo.sample.jsf.web.war 
 mkdir WEB-INF/lib
 cp ~/.m2/repository/org/apache/tomcat/juli/6.0.26/juli-6.0.26.jar WEB-INF/lib
 vim META-INF/MANIFEST.MF


5. Update the Manifest as per below, I simply removed the import-package statement for the juli JAR, and added

Manifest-Version: 1.0 
Import-Bundle: com.springsource.org.apache.taglibs.standard;version="[
 1.1.2,1.3)",org.springframework.js;version="[2.0.8.RELEASE,3.0.0)",co
 m.springsource.javax.faces;version="[2.0.0.PR2,2.0.0.PR2]",com.spring
 source.com.sun.faces;version="[2.0.0.PR2,2.0.0.PR2]"
Bundle-ClassPath: .,/WEB-INF/lib/juli-6.0.26.jar
Bundle-Version: 1.0.0
Tool: Bundlor 1.0.0.RELEASE
Bundle-Name: Dynamism Sample Web Bundle
Bundle-ManifestVersion: 2
Created-By: 1.6.0_20 (Apple Inc.)
Bundle-SymbolicName: org.eclipse.virgo.sample.jsf.web
Web-ContextPath: jsf-demo
Import-Package: javax.faces.webapp;version="1.2.0.09",javax.servlet.js
 p.jstl.core;version="[1.2.0,1.3.0)",org.eclipse.virgo.sample.dynamic.
 core;version="[1.0,2.0)",org.eclipse.virgo.web.dm;version="[2.0.0,3.0
 .0)",org.springframework.beans.factory.annotation;version="[3.0,4.0)"
 ,org.springframework.beans.factory.xml;version="[3.0,3.1)",org.spring
 framework.context.config;version="[3.0, 3.1)",org.springframework.con
 text.support;version="[3.0,3.1)",org.springframework.js.resource;vers
 ion="[2.0.7.RELEASE,3.0.0)",org.springframework.stereotype;version="[
 3.0,4.0)",org.springframework.web.bind.annotation;version="[3.0,4.0)"
 ,org.springframework.web.context;version="[3.0,3.1)",org.springframew
 ork.web.context.support;version="[3.0,3.1)",org.springframework.web.s
 ervlet;version="[3.0,4.0)",org.springframework.web.servlet.handler;ve
 rsion="[3.0,3.1)",org.springframework.web.servlet.mvc;version="[3.0,3
 .1)",org.springframework.web.servlet.mvc.annotation;version="[3.0,3.1
 )",org.springframework.web.servlet.support;version="[3.0,3.1)",org.sp
 ringframework.web.servlet.view;version="[3.0,3.1)"


Note the Bundle-ClassPath header now has the new .jar added, and the juli import has been removed.

6. Re-package the WAR, and add the new Manifest:

 rm org.eclipse.virgo.sample.jsf.web.war
 jar cvfm  sample.war META-INF/MANIFEST.MF .


7. Deploy the WAR to the pickup dir

8. Start Virgo clean (./startup.sh -clean)

8. Navigate to http://localhost:8080/jsf-demo/web/properties/overview to view the working application!

Hope that helps anybody having the same issue.

Cheers,
Matt
  • Attachment: sample.war
    (Size: 154.24KB, Downloaded 132 times)

[Updated on: Fri, 04 March 2011 10:32]

Report message to a moderator

Re: Web Application Failed to start [message #657814 is a reply to message #657293] Fri, 04 March 2011 08:14 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
Thanks for describing those steps carefully Matt.
Re: Web Application Failed to start [message #689629 is a reply to message #551623] Tue, 28 June 2011 02:50 Go to previous messageGo to next message
duanqi  is currently offline duanqi
Messages: 11
Registered: June 2011
Junior Member
Hi Anthony,
I come across a problem just like you.

Caused by: org.eclipse.gemini.web.core.WebApplicationStartFailedException: org.eclipse.gemini.web.core.spi.ServletContainerException: Web application at '/Struts2.example' failed to start. Check the logs for more details.
at org.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:107)
at org.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:120)

Caused by: org.eclipse.gemini.web.core.spi.ServletContainerException: Web application at '/Struts2.example' failed to start. Check the logs for more details.
at org.eclipse.gemini.web.tomcat.internal.TomcatServletContainer.startWebApplication(TomcatServletContainer.java:123)
at org.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:90)
... 9 common frames omitted


Have you resolved that problem?Could you give me some advices about that?Very thanks.
duanqi
Re: Web Application Failed to start [message #689691 is a reply to message #689629] Tue, 28 June 2011 07:44 Go to previous messageGo to next message
Steve Powell
Messages: 23
Registered: January 2010
Location: Southampton
Junior Member
Hi,

If you read the rest of this thread you will see a message from Chris Frost indicating how you can further diagnose your problem.

It is extremely unlikely that you face the same problem as Anthony did, so you should look for Catalina/Tomcat error messages (when adjusting the reporting level as Chris outlines) to see what the Web Application is doing that Tomcat doesn't like.

When you have some more information, please come back to us.


Steve Powell :-/
Re: Web Application Failed to start [message #691218 is a reply to message #689691] Fri, 01 July 2011 00:51 Go to previous messageGo to next message
duanqi  is currently offline duanqi
Messages: 11
Registered: June 2011
Junior Member
Hi,
I had checked log.log in serviceability file.The most part of errors were java.lang.NoClassDefFoundError,which just like
java.lang.NoClassDefFoundError: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter not found from bundle [null (Struts2.example)]
But actually I had imported the package org.apache.struts2.dispatcher.ng.filter in manifest file of Struts2.example.Why did Virgo can't resolve this relationship
between bundles?
duanqi
Re: Web Application Failed to start [message #691224 is a reply to message #691218] Fri, 01 July 2011 01:30 Go to previous message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
Please see this FAQ.
Previous Topic:Virgo Admin Console Bundle List Retrieval
Next Topic:Weird fragment deployment behaviour
Goto Forum:
  


Current Time: Tue Sep 16 03:17:57 GMT 2014

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

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