Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » spring osgi web bundle deployment exception
spring osgi web bundle deployment exception [message #727973] Thu, 22 September 2011 06:18 Go to next message
Sumit  is currently offline Sumit
Messages: 1
Registered: September 2011
Junior Member
I am developing a spring osgi web bundle over virgo.

I have configured the web.xml as following:

<display-name>osgi.dmserver.web</display-name>

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextClass</param-name>
<param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
</context-param>

<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/dispatcher-context.xml
/WEB-INF/osgi-context.xml
</param-value>
</init-param>
</servlet>

<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/web/*</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>


The bundle is built successfully but on deploying it I am getting some deployment exception as following:


[2011-09-22 15:10:32.087] ERROR start-signalling-5 org.eclipse.virgo.medic.eventlog.default WE0005E Failed to start web bundle 'com.stpl.kvantum.osgi.dmserver.web' version '0.1.0': consult serviceability/logs/log.log for further details.
[2011-09-22 15:10:32.087] INFO start-signalling-5 o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager Thread context class loader 'KernelBundleClassLoader: [bundle=com.stpl.kvantum.osgi.dmserver.web_0.1.0]' popped and set to 'KernelBundleClassLoader: [bundle=com.stpl.kvantum.osgi.dmserver.web_0.1.0]'
[2011-09-22 15:10:32.088] INFO start-signalling-5 o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager Thread context class loader 'KernelBundleClassLoader: [bundle=com.stpl.kvantum.osgi.dmserver.web_0.1.0]' pushed and set to 'KernelBundleClassLoader: [bundle=com.stpl.kvantum.osgi.dmserver.web_0.1.0]'
[2011-09-22 15:10:32.088] INFO start-signalling-5 o.e.v.k.i.a.internal.AtomicInstallArtifactLifecycleListener No atomic parent of bundle 'com.stpl.kvantum.osgi.dmserver.web' version '0.1.0' in scope 'null' to propagate start failed (stop) event to
[2011-09-22 15:10:32.096] ERROR start-signalling-5 org.eclipse.virgo.medic.eventlog.default DE0006E Start failed for bundle 'com.stpl.kvantum.osgi.dmserver.web' version '0.1.0'. org.eclipse.virgo.kernel.deployer.core.DeploymentException: Web application failed to start
at org.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:132)
at org.eclipse.virgo.kernel.install.artifact.internal.StandardArtifactStateMonitor.onStarted(StandardArtifactStateMonitor.java:247)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.asyncStartSucceeded(AbstractInstallArtifact.java:294)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.access$0(AbstractInstallArtifact.java:291)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact$StateMonitorSignal.signalSuccessfulCompletion(AbstractInstallArtifact.java:229)
at org.eclipse.virgo.kernel.core.internal.BundleStartTracker$1.run(BundleStartTracker.java:143)
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 '/osgi.dmserver.web' failed to start. Check the logs for more details.
at org.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:108)
at org.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:122)
... 8 common frames omitted
Caused by: org.eclipse.gemini.web.core.spi.ServletContainerException: Web application at '/osgi.dmserver.web' failed to start. Check the logs for more details.
at org.eclipse.gemini.web.tomcat.internal.TomcatServletContainer.startWebApplication(TomcatServletContainer.java:125)
at org.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:91)
... 9 common frames omitted

[2011-09-22 15:10:32.096] INFO start-signalling-5 o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager Thread context class loader 'KernelBundleClassLoader: [bundle=com.stpl.kvantum.osgi.dmserver.web_0.1.0]' popped and set to 'KernelBundleClassLoader: [bundle=com.stpl.kvantum.osgi.dmserver.web_0.1.0]'
[2011-09-22 15:10:32.097] INFO start-signalling-5 o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager Thread context class loader 'KernelBundleClassLoader: [bundle=com.stpl.kvantum.osgi.dmserver.web_0.1.0]' pushed and set to 'KernelBundleClassLoader: [bundle=com.stpl.kvantum.osgi.dmserver.web_0.1.0]'
[2011-09-22 15:10:32.097] INFO start-signalling-5 o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager Thread context class loader 'KernelBundleClassLoader: [bundle=com.stpl.kvantum.osgi.dmserver.web_0.1.0]' pushed and set to 'KernelBundleClassLoader: [bundle=com.stpl.kvantum.osgi.dmserver.web_0.1.0]'
[2011-09-22 15:10:32.099] INFO start-signalling-5 org.eclipse.virgo.medic.eventlog.default DE0010I Stopping bundle 'com.stpl.kvantum.osgi.dmserver.web' version '0.1.0'.
[2011-09-22 15:10:32.099] INFO start-signalling-5 org.eclipse.virgo.kernel.core.internal.BundleStartTracker Bundle 'com.stpl.kvantum.osgi.dmserver.web_0.1.0 [118]' has stopped. Removing its related tracking state.
[2011-09-22 15:10:32.099] INFO start-signalling-5 o.e.v.k.i.a.internal.AtomicInstallArtifactLifecycleListener No atomic parent of bundle 'com.stpl.kvantum.osgi.dmserver.web' version '0.1.0' in scope 'null' to propagate stopped event to
[2011-09-22 15:10:32.100] INFO start-signalling-5 org.eclipse.virgo.medic.eventlog.default DE0011I Stopped bundle 'com.stpl.kvantum.osgi.dmserver.web' version '0.1.0'.
[2011-09-22 15:10:32.101] INFO start-signalling-5 o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager Thread context class loader 'KernelBundleClassLoader: [bundle=com.stpl.kvantum.osgi.dmserver.web_0.1.0]' popped and set to 'KernelBundleClassLoader: [bundle=com.stpl.kvantum.osgi.dmserver.web_0.1.0]'
[2011-09-22 15:10:32.101] INFO start-signalling-5 o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager Thread context class loader 'KernelBundleClassLoader: [bundle=com.stpl.kvantum.osgi.dmserver.web_0.1.0]' popped and set to 'KernelBundleClassLoader: [bundle=com.stpl.kvantum.osgi.dmserver.web_0.1.0]'
[2011-09-22 15:10:32.101] INFO SGiLogServiceListener@32060c org.osgi.service.log.LogService Bundle com.stpl.kvantum.osgi.dmserver.web_0.1.0, BundleEvent STOPPED


Plz let me know why this is coming so.
Re: spring osgi web bundle deployment exception [message #728251 is a reply to message #727973] Thu, 22 September 2011 15:36 Go to previous message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 272
Registered: January 2010
Senior Member
Try to change your servlet configuration to use ServerOsgiBundleXmlWebApplicationContext


<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextClass</param-name>
<param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
</init-param>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/dispatcher-context.xml
/WEB-INF/osgi-context.xml
</param-value>
</init-param>
</servlet>


Previous Topic:OSGi Package Hell
Next Topic:Searching help: Virgo as maven dependencies
Goto Forum:
  


Current Time: Thu Aug 28 23:32:45 EDT 2014

Powered by FUDForum. Page generated in 0.02239 seconds