[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [virgo-dev] class loaders in context.xml


Thanks for trying Virgo out.

I believe that the classloader you are trying to use there would constitute a custom classloader. Before trying to 'fix' this it would be best to confirm this is the problem. I would look in the config/serviceability.xml file and up the level of logging, maybe to 'DEBUG'. Then restart with the '-clean' option and deploy your app again. Now go and look in the log.log file and see what the first error to occur is. Now you will see the real cause.

If it is indeed classloading related from the application 'war' bundle then you could trying setting delegate="true". This might work, by falling back to the original classloader that is OSGi friendly, depending on how the custom classloader is initialised. 


On 14/11/2010 21:31, Saadat Dowlati wrote:
       We have become very interested in VWS and are trying to migrate our application from Tomcat. As the first step, following the documentation, I dropped our application WAR (which works on Tomcat 6) in the pickup directory. According to the log, VWS installs the WAR, but fails to start it.
The error messages don't provide any hint as to the root cause: 
[2010-11-14 16:12:05.472] fs-watcher                   <HD0001I> Hot deployer processing 'CREATED' event for file 'EMA-Server.war'.
[2010-11-14 16:12:06.122] fs-watcher                   <DE0000I> Installing bundle 'EMA-Server' version '0.0.0'.
[2010-11-14 16:12:09.285] fs-watcher                   <DE0001I> Installed bundle 'EMA-Server' version '0.0.0'.
[2010-11-14 16:12:09.311] fs-watcher                   <DE0004I> Starting bundle 'EMA-Server' version '0.0.0'.
[2010-11-14 16:12:09.316] Thread-3                     <WE0000I> Starting web bundle 'EMA-Server' version '0.0.0' with context path '/EMA-Server'.
[2010-11-14 16:12:14.696] Thread-3                     <WE0005E> Failed to start web bundle 'EMA-Server' version '0.0.0': consult the serviceability log for further details.
[2010-11-14 16:12:14.701] start-signalling-4           <DE0006E> Start failed for bundle 'EMA-Server' version '0.0.0'. org.eclipse.virgo.kernel.deployer.core.DeploymentException: W
eb 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:273)
        at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.access$0(AbstractInstallArtifact.java:270)
        at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact$StateMonitorSignal.signalSuccessfulCompletion(AbstractInstallArtifact.java:223)
        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 '/EMA-Server' failed to sta
rt. 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 '/EMA-Server' 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 
While searching in the documentation, I came across the following note. It got my attention, as we use the TomcatInstrumentableClassLoader in the Tomcat's context.xml packaged in our WAR file.
Note that the following context configuration features are not supported in Virgo Web Server:
  • Custom class loaders

 Is TomcatInstrumentableClassLoader  considered a "Custom class loader" in VWS? If yes, is there any workaround for it? Here's the line from our context.xml file:
  useSystemClassLoaderAsParent="false" />
Thanks in advance,

Chris Frost
SpringSource, a division of VMware

Virgo Website, Wiki and Forum