Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Service referencing(Unable to reference a service exposed by another bundle)
Service referencing [message #753412] Thu, 27 October 2011 02:39 Go to next message
Sergey  is currently offline Sergey
Messages: 4
Registered: October 2011
Junior Member
Hi Guys,

I urgently need your help. I have 2 OSGI bundles which I want to deploy to Virgo, the first one exposes a service and second one is meant to consume it. The problem is that the second bundle can't discover a service exposed by the first bundle. I am getting the following warning:

011-10-27 10:22:26.103] http-bio-8080-exec-10 <DE0004I> Starting bundle 'ru.troika.integration.hornetq-adapter' version '1.0.0'.
011-10-27 10:22:31.572] service-monitor-thread-1 <KE0100W> Reference '&routingChannel' in bundle 'ru.troika.integration.hornetq-adapter' version
1.0.0' is waiting for service with filter '(objectClass=org.springframework.integration.core.SubscribableChannel)'.

And after 5mins the deployment fails.

On the "Service Overview" tab, I can see that there is such service:
Property Value
org.springframework.osgi.bean.name routingChannel
service.id 253
Bundle-SymbolicName ru.troika.integration.router
objectClass org.springframework.integration.core.SubscribableChannel
Bundle-Version 1.0

Do you have any idea where is the problem?

Thank you in advance!
Re: Service referencing [message #753420 is a reply to message #753412] Thu, 27 October 2011 04:05 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
On the face of it, this looks like a bug, but that's fairly unlikely as you don't seem to be doing anything special. Therefore it will be necessary to take a look at your service and service reference definitions, but I'd be surprised if there was anything wrong there. You didn't add a service property on the reference that excludes the service did you?

Anyway, one way to make progress is for you to cut down this example to the absolute bare minimum needed to reproduce the problem and then raise a bug and describe the precise set up so we can take a look. (Often the process of cutting down the code shows up some mistake or other.)

Hope that helps!
Re: Service referencing [message #753436 is a reply to message #753420] Thu, 27 October 2011 05:13 Go to previous messageGo to next message
Sergey  is currently offline Sergey
Messages: 4
Registered: October 2011
Junior Member
Hi Glyn,

Thank you for your response.

No, there is no service property on the reference that excludes the service.

Just for the reference, I have attached two zip files with configuration for my bundles.
  • Attachment: bundle1.zip
    (Size: 1.26KB, Downloaded 64 times)
  • Attachment: bundle2.zip
    (Size: 1.35KB, Downloaded 57 times)
Re: Service referencing [message #753445 is a reply to message #753436] Thu, 27 October 2011 05:49 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
The Spring DM schema definitions are at the wrong version, so Spring DM 1.2.1 embedded in Virgo is probably ignoring them. Compare these.
Re: Service referencing [message #753450 is a reply to message #753445] Thu, 27 October 2011 06:04 Go to previous messageGo to next message
Sergey  is currently offline Sergey
Messages: 4
Registered: October 2011
Junior Member
Unfortunately it did not help Sad
Re: Service referencing [message #753458 is a reply to message #753450] Thu, 27 October 2011 06:55 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
Then I'm afraid you'll need to cut down the bundles to the bare minimum to either discover the source of the problem or enable you to raise a bug we can look at. There are some pretty interesting Spring namespaces (e.g. JEE related) in use which complicate things, so I would strip those out for starters.
Re: Service referencing [message #753463 is a reply to message #753458] Thu, 27 October 2011 07:34 Go to previous message
Sergey  is currently offline Sergey
Messages: 4
Registered: October 2011
Junior Member
Hi Glyn,

I have made a test and got a very interesting result. I have created another spring bean which implements java.util.List and exposed it as a service. In another bundle I have created a reference to this service and it worked!

In my original example the service implements org.springframework.integration.core.SubscribableChannel interface. Both bundles include a jar which contains this class in their classpath. Can it be the problem why I can't reference the service? Maybe this class is loaded with different versions or something?
Previous Topic:virgo logging
Next Topic:Bean's destroy method not invoked when kernel is shut down
Goto Forum:
  


Current Time: Sat Jul 26 07:23:45 EDT 2014

Powered by FUDForum. Page generated in 0.01658 seconds