Hi Cristiano, Your Blueprint xml is fine. I'm not sure what the problem is. I downloaded a similar set of bundles to yours and built up the following environment:
id State Bundle
0 ACTIVE org.eclipse.osgi_3.6.2.R36x_v20110210
1 ACTIVE org.apache.aries.blueprint.api_0.3.0
2 ACTIVE org.apache.aries.blueprint.core_0.3.0
3 ACTIVE org.apache.aries.proxy.api_0.3.0
4 ACTIVE org.apache.aries.proxy.impl_0.3.0
5 ACTIVE org.apache.aries.util_0.3.0
6 ACTIVE org.ops4j.pax.logging.pax-logging-api_1.6.2
7 ACTIVE org.ops4j.pax.logging.pax-logging-service_1.6.
8 ACTIVE org.eclipse.equinox.cm_1.0.200.v20100520
9 ACTIVE org.eclipse.osgi.services_3.2.100.v20100503
I then recreated your Blueprint bundle, using your Blueprint xml
as-is. When I installed and started it, all was fine.
10 ACTIVE test.blueprint.cristiano_1.0.0
{org.eclipse.osgi.framework.console.CommandProvider}={osgi.service.blueprint.compname=commandProvide
rImpl, service.id=38}
Registered by bundle: test.blueprint.cristiano_1.0.0 [10]
Bundles using service:
org.eclipse.osgi_3.6.2.R36x_v20110210 [0]
BTW, I do see quite a bit of diagnostics output, so I'm not sure why
you are not. I've attached the bundle that I created. Note, there's
no implementation inside the CommandProvider class in the attached
bundle.
Sorry I've not found the problem, but I hope the info and bundle help.
Regards, Graham.
On 30 May 2011 14:48, Cristiano Gavião <[email protected]> wrote:
> On 28/05/11 17:18, Graham Charters wrote:
>>
>> Hi Cristiano,
>
> Hi again Graham,
>
>> What you have defined in Blueprint is a service so Blueprint will be
>> responsible for registering it in the Service Registry, but does not
>> do any injection. You should be able to use the equinox console to
>> see if Blueprint has registered the service. The command should be
>> (apologies of you already know all this):
>>
>> services(objectClass=org.eclipse.osgi.framework.console.CommandProvider)
>>
>> If the service isn't there, do you see your bundle being processed by
>> Blueprint?
>
> Sorry, I've used the wrong word. I mean my services is not being
> "Registered"...
>
> So, I've downloaded the project example that you suggest me and updated it
> to use equinox 3.6 and aries blueprint 0.3.1.
>
> I've started it using this:
>>
>> java -jar org.eclipse.osgi-3.6.2.R36x_v20110210.jar -console
>
> There is any error in log, and typing the "ss" command I see this:
>
>> osgi> ss
>>
>> Framework is launched.
>>
>> id State Bundle
>> 0 ACTIVE org.eclipse.osgi_3.6.2.R36x_v20110210
>> 1 ACTIVE org.apache.felix.configadmin_1.2.4
>> 2 ACTIVE org.ops4j.pax.logging.pax-logging-api_1.4.0
>> 3 ACTIVE org.ops4j.pax.logging.pax-logging-service_1.4.0
>> 4 ACTIVE org.apache.aries.blueprint_0.3.1
>> 5 ACTIVE org.apache.aries.proxy.api_0.3.0
>> 6 RESOLVED org.apache.aries.util_0.3.0
>> 7 RESOLVED org.apache.aries.sample_1.0.0.SNAPSHOT
>
> When I start the sample using "start 7" nothing is logged and no messages of
> execution appears as expected :-(
>
> there is no messages about aries being started either (some messages appears
> only when running inside eclipse)...
>
> Could you please take a look ?
>
>> Quiesce is a Blueprint extension that that allow Blueprint to take
>> bundles away gracefully. It notifies Blueprint when a bundle is about
>> to be taken away and Blueprint then unregisters the bundle's services
>> and trying to let existing work run to completion.
>
> I've installed using org.apache.aries.quiesce.manager_0.3.0. It is the right
> one?
>>
>> I hope this helps.
>>
>> Regards,
>>
>> Graham.
>
> Thanks again
>
> Cristiano
>
>> On 27 May 2011 23:28, Cristiano Gavião<[email protected]> wrote:
>>>
>>> Hi Graham, thanks...
>>>
>>> I've used the single blueprint bundle for while to test... I'm running
>>> from
>>> eclipse workspace (as a OSGI Framework)
>>>
>>> It seems that aries is being started ok, but there are something wrong
>>> with
>>> my example that I could figure out...
>>>
>>>> osgi> 19:04:39.340 [Start Level Event Dispatcher] DEBUG
>>>> o.a.a.b.container.BlueprintExtender - Starting blueprint extender...
>>>> 19:04:39.359 [Start Level Event Dispatcher] INFO
>>>> o.a.a.b.container.BlueprintExtender - No quiesce support is available,
>>>> so
>>>> blueprint components will not participate in quiesce operations
>>>> 19:04:39.359 [Start Level Event Dispatcher] DEBUG
>>>> o.a.a.b.container.BlueprintExtender - Blueprint extender started
>>>
>>> I would appreciate your help...
>>>
>>> I've created a single osgi project to provide a command service to
>>> org.eclipse.osgi.framework.console.CommandProvider interface.
>>>
>>> I use this blueprint xml:
>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>
>>>> xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
>>>>
>>>>
>>>> xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
>>>>
>>>>
>>>> <bean id="commandProviderImpl"
>>>> class="org.jbehave.osgi.equinox.commands.CommandProvider">
>>>> </bean>
>>>>
>>>> <service id="commandService" ref="commandProviderImpl"
>>>> interface="org.eclipse.osgi.framework.console.CommandProvider">
>>>> </service>
>>>> </blueprint>
>>>
>>> This is the impl class..
>>>>
>>>> public class CommandProvider implements
>>>> org.eclipse.osgi.framework.console.CommandProvider {
>>>>
>>>> @Override
>>>> public String getHelp() {
>>>> StringBuffer help = new StringBuffer();
>>>> help.append("--- Jbehave Equinox Commands ---\r\n");
>>>> help.append("\tstatus - JBehave OSGi EmbedderService status.");
>>>> help.append("\trunAnnotaddedEmbedder - Run Stories via Annotated
>>>> Embedder on Karaf.");
>>>> help.append("\r\n\r\n");
>>>> return help.toString();
>>>> }
>>>
>>> But I can't see any result when I type 'help'. It seems that it is not
>>> being
>>> injected...
>>>
>>> any tip to help trace this?
>>>
>>> btw, what is quiesce ?
>>>
>>> thanks a lot
>>>
>>> Cristiano
>>>
>>>
>>>
>>> On 27/05/11 18:23, Graham Charters wrote:
>>>>
>>>> Hi Cristiano,
>>>>
>>>> The single blueprint bundle is a roll-up of the other blueprint
>>>> bundles. As such, it contains more than you need. For basic blueprint
>>>> you just need blueprint.api and blueprint.core, I believe. Install
>>>> and start them in equinox and then install and start your bundle that
>>>> uses blueprint and it should be processed (the install/start order of
>>>> these bundles is not important).
>>>>
>>>> The following article gives a good overview of Blueprint, but is a
>>>> little out of date in terms of the build it uses. The blueprint
>>>> specification hasn't changed since then, though.
>>>>
>>>> http://www.ibm.com/developerworks/opensource/library/os-osgiblueprint/
>>>>
>>>> You typically don't have to import any packages for blueprint because
>>>> you don't use it's APIs directly (you write blueprint XMLs).
>>>>
>>>> Let us know if you have any problems.
>>>>
>>>> Regards, Graham.
>>>>
>>>> On 27 May 2011 22:02, Cristiano Gavião<[email protected]> wrote:
>>>>>
>>>>> Hi people,
>>>>>
>>>>> I'm trying to use aries blueprint on equinox to able to consume some
>>>>> service
>>>>> bundles. Those services I've built using org.osgi.compendium-4.2.0.jar
>>>>> and
>>>>> bnd.
>>>>>
>>>>> So, which jar should I use on my client bundle? Which package should I
>>>>> import ?
>>>>>
>>>>> blueprint.api
>>>>> blueprint
>>>>> blueprint.core
>>>>>
>>>>> Is there any config that I need to do ?
>>>>>
>>>>> thanks a lot
>>>>>
>>>>> Cristiano
>>>>>
>>>
>
>
test.blueprint.cristiano_1.0.0.jar
Description: application/java-archive
