Can't start greenpages.web-solution:2.4.0 in virgo-tomcat.3.0.2 [message #771887] |
Wed, 28 December 2011 13:11 |
Mariano Eloy Fernández Osca Messages: 16 Registered: July 2009 |
Junior Member |
|
|
Hi everybody,
I downloaded greenpages-2.4.0 to take it for a sping in Eclipse Indigo + Virgo 3.0.2.
I imported the "solution" directory as a Maven project and then added it to the Virgo thanks to its server adapter.
No luck. The error log file says this:
[2011-12-28 13:44:37.973] ERROR Thread-88 o.a.c.c.C.[Catalina].[localhost].[/greenpages.web-solution] Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
at org.eclipse.gemini.web.tomcat.internal.loading.BundleWebappClassLoader.loadClass(BundleWebappClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:415)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:397)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4660)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
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)
I know this issue with the <listener> element calling Spring's ContextLoaderListener has been widely discussed in this forum. I tried some solutions like changing WABHeaders to "defaulted", but it didn't work.
I'm a bit dissapointed since Greenpages is the official starting point to dive into Virgo and OSGi. I expected it to just work "as is".
Since this classloading issue is such a hot topic, I guess we're all needing some specific FAQ entry about this.
Thanks.
[Updated on: Wed, 28 December 2011 13:16] Report message to a moderator
|
|
|
|
Re: Can't start greenpages.web-solution:2.4.0 in virgo-tomcat.3.0.2 [message #771969 is a reply to message #771918] |
Wed, 28 December 2011 17:10 |
Mariano Eloy Fernández Osca Messages: 16 Registered: July 2009 |
Junior Member |
|
|
FINALLY!
I had to dive deeper in order to understand what the problem was. I think this could be due to a bug in m2e-wtp integration plugin, since all projects in the workspace have Maven Nature and Dynamic Web Module Facet enabled.
m2e-wtp plugin was generating an almost empty MANIFEST.MF in /target/m2e-wtp/web-resources/META-INF folder, no matter
where I placed the real MANIFEST.MF (I tried src/main/webapp/META-INF and /src/main/resources/META-INF). So Virgo was
not importing any package at all, including that missing ContextLoaderListener class.
I found a clue to this by having a look at Virgo's admin console. Just browse the "bundles" category the bundle. You'll
see what packages are being imported and exported FOR REAL.
So what I did is to copy the MANIFEST.MF to the /$VIRGO_BASE/stage/$BUNDLE_WEBAPP/META-INF directory and hit "redeploy" in
Eclipse's Server View. Quite cumbersome.
I created an issue to see if this is indeed an m2e-wtp bug.
https://issues.sonatype.org/browse/MECLIPSEWTP-208
[Updated on: Wed, 28 December 2011 17:12] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03699 seconds