Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » virgo + springDM + custom Application Context Listener
virgo + springDM + custom Application Context Listener [message #813421] Mon, 05 March 2012 08:43 Go to next message
eugene rabii is currently offline eugene rabiiFriend
Messages: 13
Registered: February 2012
Junior Member
Suppose I want to register a custom application context listener. SpringDM books says I must do something like this:

<beans:bean id="osgiApplicationContextListener" class="org.springframework.osgi.extender.internal.activator.ListListenerAdapter">
<beans:bean class=""/>
<beans:bean id="myTest" class="com.eugene.ApplicationContextListener"/>

This is created in META-INF/spring/app-config.xml

Create, deploy the bundle, then I get this Exception:

at org.eclipse.virgo.kernel.install.artifact.internal.bundle.StandardBundleInstallArtifact.doStart(
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.driveDoStart(
at org.eclipse.virgo.kernel.install.artifact.internal.bundle.StandardBundleInstallArtifact.start(
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.start(
... 7 common frames omitted
Caused by: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: org.springframework.osgi.extender.internal.activator.ListListenerAdapter in KernelBundleClassLoader: [bundle=com.eugene.sample-service.osgi-runner_1.0.0.SNAPSHOT]
at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(
at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(
... 66 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.osgi.extender.internal.activator.ListListenerAdapter
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(
at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(
... 71 common frames omitted

Is there a setting that i am missing about or why can't it find the class. Bundle :

30|Active | 1|spring-osgi-extender (1.2.1)

is active.

Sounds to me this is a bug, but may be I am missing something.

Thank You,

[Updated on: Mon, 05 March 2012 08:45]

Report message to a moderator

Re: virgo + springDM + custom Application Context Listener [message #813435 is a reply to message #813421] Mon, 05 March 2012 09:04 Go to previous message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Please see the Virgo FAQ for how to diagnose class loading errors. I notice that the package containing the class appears to be internal, so perhaps it is not exported?
Previous Topic:Class not found, export only problem
Next Topic:Is Virgo Tooling snapshot compatible with VTS 3.0.*?
Goto Forum:

Current Time: Sun Nov 29 19:46:53 GMT 2015

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

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