Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Communications Framework (ECF) » ECF container does not get activated with Gemini Blueprint
ECF container does not get activated with Gemini Blueprint [message #1005456] Fri, 25 January 2013 14:15 Go to next message
Joerg Saini is currently offline Joerg SainiFriend
Messages: 8
Registered: January 2013
Junior Member
We have been evaluating the Eclipse Communication Framework (ECF) with Declarative Services and Blueprint. While with DS works ok, when using Blueprint the ECF container does not work. All the required bundles for Blueprint have been installed:

- org.aopalliance
- org.apache.commons.logging
- org.eclipse.gemini.blueprint.core
- org.eclipse.gemini.blueprint.extender
- org.eclipse.gemini.blueprint.io
- org.springframework.aop
- org.springframework.asm
- org.springframework.beans
- org.springframework.context
- org.springframework.core
- org.springframework.expression

The blueprint appears as active but nothing gets published. Switching to DS (with the respective changes in the bean configuration under OSGI-INF and the manifest file) makes the ECF remote service available again. Is there something else we should do? We are seeing this even when modifying the examples found at http://git.eclipse.org (org.eclipse.ecf.examples.remoteservices.hello.ds.host and org.eclipse.ecf.examples.remoteservices.hello.ds.consumer) which work perfectly fine with DS.
Re: ECF container does not get activated with Gemini Blueprint [message #1005500 is a reply to message #1005456] Fri, 25 January 2013 17:14 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Hi Joerg,

Simply put, I don't immediately know what's going wrong here. It clearly has something to do with Blueprint's behavior...probably WRT the ECF remote services impl...but I do not know how Blueprint works.

If you are game, I'll help figure this out if you can gather information (through testing your code + Blueprint). But first, have you asked this question on any Blueprint forum? Any insight from that?

Next, it would be helpful if you could paste in a listing of all bundles in your runtime...and their states (e.g. resolved, active, etc)...e.g. by using the OSGi console 'ss' command. What I'm looking for is what the status is of the ECF remote services implementation both before and after Blueprint is supposed to register the remote service. I also want to make sure that you have all the necessary ECF bundles in your running framework.

We can use this forum for interaction, but if you wish it might be useful to have this discussion on the ecf-dev mailing list (see here to sign up):

https://dev.eclipse.org/mailman/listinfo/ecf-dev

That is a more technical list, and it is monitored by more ECF committers (and their help might be useful...as they may have more familiarity with Blueprint than I do).

Thanks,

Scott


Re: ECF container does not get activated with Gemini Blueprint [message #1005695 is a reply to message #1005500] Mon, 28 January 2013 10:17 Go to previous messageGo to next message
Joerg Saini is currently offline Joerg SainiFriend
Messages: 8
Registered: January 2013
Junior Member
Hi Scott,

I appreciate your reply and effort to seek a solution.

The simplest way to analyze this would be to get the hello example to work with blueprint. I think the DS example is the most appropriate given that, from my experience, DS is quite similar to Blueprint in structure. Got it from the git repository org.eclipse.ecf under examples/bundles. This way, once we get it working it could also be submitted as an additional example on the repository.

First the host bundle (org.eclipse.ecf.examples.remoteservices.hello.ds.host) which I can start using the included product file. Once it is started, I can also view the endpoint in the Service Discovery tab within Eclipse (listed as ecf.osgirsvc). The consumer is not started yet. In this DS invocation the bundle list is as follows:

Bundle list after starting org.eclipse.ecf.examples.remoteservices.hello.ds.host using Declarative Services

0	ACTIVE      org.eclipse.osgi_3.8.1.v20120830-144521
1	ACTIVE      org.eclipse.ecf.osgi.services.remoteserviceadmin_2.1.0.v20120610-1946
2	ACTIVE      org.eclipse.equinox.registry_3.5.200.v20120522-1841
3	ACTIVE      org.apache.felix.gogo.runtime_0.8.0.v201108120515
4	ACTIVE      org.eclipse.core.runtime_3.8.0.v20120521-2346
5	ACTIVE      org.eclipse.equinox.common_3.6.100.v20120522-1841
6	RESOLVED    org.eclipse.osgi.services.remoteserviceadmin_1.5.0.v20120610-1946
7	ACTIVE      org.eclipse.ecf.provider.jmdns_4.1.0.v20120610-1946
8	ACTIVE      org.eclipse.equinox.concurrent_1.0.300.v20120522-2049
9	ACTIVE      org.eclipse.equinox.preferences_3.5.0.v20120522-1841
10	ACTIVE      org.eclipse.ecf.examples.remoteservices.hello.ds.host_3.0.0.qualifier
11	ACTIVE      org.apache.felix.gogo.command_0.8.0.v201108120515
12	ACTIVE      org.eclipse.ecf.discovery_4.0.0.v20120610-1946
13	ACTIVE      org.eclipse.equinox.app_1.3.100.v20120522-1841
14	ACTIVE      org.eclipse.core.contenttype_3.4.200.v20120523-2004
15	ACTIVE      org.eclipse.ecf.examples.remoteservices.hello_3.0.100.qualifier
16	ACTIVE      org.eclipse.ecf.identity_3.1.200.v20120610-1946
17	ACTIVE      org.eclipse.core.jobs_3.5.200.v20120521-2346
18	ACTIVE      org.eclipse.equinox.console_1.0.0.v20120522-1841
19	ACTIVE      org.apache.felix.gogo.shell_0.8.0.v201110170705
20	ACTIVE      org.eclipse.ecf.sharedobject_2.2.100.v20120610-1946
21	ACTIVE      org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy_1.0.0.v20120610-1946
22	ACTIVE      org.eclipse.equinox.ds_1.4.0.v20120522-1841
23	RESOLVED    org.eclipse.osgi.services_3.3.100.v20120522-1822
24	ACTIVE      org.eclipse.ecf.osgi.services.distribution_2.0.100.v20120610-1946
25	ACTIVE      org.eclipse.ecf.provider.remoteservice_4.0.0.v20120610-1946
26	ACTIVE      org.eclipse.equinox.util_1.0.400.v20120522-2049
27	ACTIVE      org.eclipse.ecf.provider_4.2.100.v20120610-1946
28	ACTIVE      org.eclipse.ecf_3.1.300.v20120610-1946
29	ACTIVE      org.eclipse.ecf.remoteservice_6.0.200.v20120610-1946


Then org.eclipse.ecf.examples.remoteservices.hello.ds.consumer is started and proceeds to succesfully perform the remote calls. Its bundle list is as follows:
Bundle list after starting org.eclipse.ecf.examples.remoteservices.hello.ds.consumer using Declarative Services

0	ACTIVE      org.eclipse.osgi_3.8.1.v20120830-144521
1	ACTIVE      org.eclipse.ecf.osgi.services.remoteserviceadmin_2.1.0.v20120610-1946
2	ACTIVE      org.eclipse.equinox.registry_3.5.200.v20120522-1841
3	ACTIVE      org.apache.felix.gogo.runtime_0.8.0.v201108120515
4	ACTIVE      org.eclipse.core.runtime_3.8.0.v20120521-2346
5	ACTIVE      org.eclipse.equinox.common_3.6.100.v20120522-1841
6	RESOLVED    org.eclipse.osgi.services.remoteserviceadmin_1.5.0.v20120610-1946
7	ACTIVE      org.eclipse.ecf.provider.jmdns_4.1.0.v20120610-1946
8	ACTIVE      org.eclipse.equinox.concurrent_1.0.300.v20120522-2049
9	ACTIVE      org.eclipse.equinox.preferences_3.5.0.v20120522-1841
10	ACTIVE      org.apache.felix.gogo.command_0.8.0.v201108120515
11	ACTIVE      org.eclipse.ecf.discovery_4.0.0.v20120610-1946
12	ACTIVE      org.eclipse.equinox.app_1.3.100.v20120522-1841
13	ACTIVE      org.eclipse.core.contenttype_3.4.200.v20120523-2004
14	ACTIVE      org.eclipse.ecf.examples.remoteservices.hello_3.0.100.qualifier
15	ACTIVE      org.eclipse.ecf.identity_3.1.200.v20120610-1946
16	ACTIVE      org.eclipse.ecf.examples.remoteservices.hello.ds.consumer_2.0.0.qualifier
17	ACTIVE      org.eclipse.core.jobs_3.5.200.v20120521-2346
18	ACTIVE      org.eclipse.equinox.console_1.0.0.v20120522-1841
19	ACTIVE      org.apache.felix.gogo.shell_0.8.0.v201110170705
20	ACTIVE      org.eclipse.ecf.sharedobject_2.2.100.v20120610-1946
21	ACTIVE      org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy_1.0.0.v20120610-1946
22	ACTIVE      org.eclipse.equinox.ds_1.4.0.v20120522-1841
23	RESOLVED    org.eclipse.osgi.services_3.3.100.v20120522-1822
24	ACTIVE      org.eclipse.ecf.osgi.services.distribution_2.0.100.v20120610-1946
25	ACTIVE      org.eclipse.ecf.provider.remoteservice_4.0.0.v20120610-1946
26	ACTIVE      org.eclipse.equinox.util_1.0.400.v20120522-2049
27	ACTIVE      org.eclipse.ecf.provider_4.2.100.v20120610-1946
28	ACTIVE      org.eclipse.ecf_3.1.300.v20120610-1946
29	ACTIVE      org.eclipse.ecf.remoteservice_6.0.200.v20120610-1946


With the above working as expected we proceeded to make changes to introduce Blueprint activation (and remove DS).
org.eclipse.ecf.examples.remoteservices.hello.ds.host/OSGI-INF/hello.xml

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" default-activation="eager">
    <bean id="host" class="org.eclipse.ecf.examples.internal.remoteservices.hello.ds.host.HelloComponent"/>

    <service ref="host" interface="org.eclipse.ecf.examples.remoteservices.hello.IHello">
        <service-properties>
			<entry key="service.exported.interfaces" value="*" />
			<entry key="service.exported.configs" value="ecf.generic.server" />
			<entry key="org.eclipse.ecf.containerFactoryArgs" value="ecftcp://localhost:3787/server" />
        </service-properties>
    </service>
</blueprint>

org.eclipse.ecf.examples.remoteservices.hello.ds.host/META-INF/MANIFEST.MF

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.ecf.examples.remoteservices.hello.ds.host;singleton:=true
Bundle-Version: 3.0.0.qualifier
Bundle-Vendor: %bundleProvider
Bundle-RequiredExecutionEnvironment: J2SE-1.5,
 J2SE-1.4,
 CDC-1.1/Foundation-1.1
Import-Package: org.eclipse.ecf.examples.remoteservices.hello;version="3.0.0",
 org.eclipse.equinox.app;version="1.1.0"
Bundle-Blueprint: OSGI-INF/hello.xml
Bundle-Localization: bundle
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.equinox.common;bundle-version="3.6.0"

org.eclipse.ecf.examples.remoteservices.hello.ds.host/products/Hello Service Host DS (zeroconf,generic).product plugins & configurations sections only

   <plugins>
      <plugin id="org.eclipse.ecf.examples.remoteservices.hello"/>
      <plugin id="org.eclipse.ecf.examples.remoteservices.hello.ds.host"/>
      <plugin id="org.aopalliance"/>
      <plugin id="org.apache.commons.logging"/>
      <plugin id="org.apache.felix.gogo.command"/>
      <plugin id="org.apache.felix.gogo.runtime"/>
      <plugin id="org.apache.felix.gogo.shell"/>
      <plugin id="org.eclipse.core.contenttype"/>
      <plugin id="org.eclipse.core.jobs"/>
      <plugin id="org.eclipse.core.runtime"/>
      <plugin id="org.eclipse.ecf"/>
      <plugin id="org.eclipse.ecf.discovery"/>
      <plugin id="org.eclipse.ecf.identity"/>
      <plugin id="org.eclipse.ecf.osgi.services.distribution"/>
      <plugin id="org.eclipse.ecf.osgi.services.remoteserviceadmin"/>
      <plugin id="org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy"/>
      <plugin id="org.eclipse.ecf.provider"/>
      <plugin id="org.eclipse.ecf.provider.jmdns"/>
      <plugin id="org.eclipse.ecf.provider.remoteservice"/>
      <plugin id="org.eclipse.ecf.remoteservice"/>
      <plugin id="org.eclipse.ecf.sharedobject"/>
      <plugin id="org.eclipse.equinox.app"/>
      <plugin id="org.eclipse.equinox.common"/>
      <plugin id="org.eclipse.equinox.concurrent"/>
      <plugin id="org.eclipse.equinox.console"/>
      <plugin id="org.eclipse.equinox.preferences"/>
      <plugin id="org.eclipse.equinox.registry"/>
      <plugin id="org.eclipse.equinox.util"/>
      <plugin id="org.eclipse.gemini.blueprint.core"/>
      <plugin id="org.eclipse.gemini.blueprint.extender"/>
      <plugin id="org.eclipse.gemini.blueprint.io"/>
      <plugin id="org.eclipse.osgi"/>
      <plugin id="org.eclipse.osgi.services"/>
      <plugin id="org.eclipse.osgi.services.remoteserviceadmin"/>
      <plugin id="org.springframework.aop"/>
      <plugin id="org.springframework.asm"/>
      <plugin id="org.springframework.beans"/>
      <plugin id="org.springframework.context"/>
      <plugin id="org.springframework.context.support"/>
      <plugin id="org.springframework.core"/>
      <plugin id="org.springframework.expression"/>
   </plugins>

   <configurations>
      <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.ecf" autoStart="true" startLevel="1" />
      <plugin id="org.eclipse.ecf.osgi.services.distribution" autoStart="true" startLevel="1" />
      <plugin id="org.eclipse.ecf.osgi.services.remoteserviceadmin" autoStart="true" startLevel="1" />
      <plugin id="org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy" autoStart="true" startLevel="1" />
      <plugin id="org.eclipse.equinox.app" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.gemini.blueprint.core" autoStart="true" startLevel="0" />
   </configurations>

Bundle list after starting org.eclipse.ecf.examples.remoteservices.hello.ds.host using Gemini Blueprint

0	ACTIVE      org.eclipse.osgi_3.8.1.v20120830-144521
1	ACTIVE      org.eclipse.ecf.osgi.services.remoteserviceadmin_2.1.0.v20120610-1946
2	ACTIVE      org.eclipse.equinox.registry_3.5.200.v20120522-1841
3	ACTIVE      org.apache.felix.gogo.runtime_0.8.0.v201108120515
4	ACTIVE      org.eclipse.core.runtime_3.8.0.v20120521-2346
5	ACTIVE      org.eclipse.equinox.common_3.6.100.v20120522-1841
6	RESOLVED    org.eclipse.osgi.services.remoteserviceadmin_1.5.0.v20120610-1946
7	STARTING    org.eclipse.ecf.provider.jmdns_4.1.0.v20120610-1946
8	ACTIVE      org.eclipse.equinox.concurrent_1.0.300.v20120522-2049
9	ACTIVE      org.eclipse.equinox.preferences_3.5.0.v20120522-1841
11	ACTIVE      org.apache.felix.gogo.command_0.8.0.v201108120515
12	ACTIVE      org.eclipse.ecf.discovery_4.0.0.v20120610-1946
13	ACTIVE      org.eclipse.equinox.app_1.3.100.v20120522-1841
14	ACTIVE      org.eclipse.core.contenttype_3.4.200.v20120523-2004
16	ACTIVE      org.eclipse.ecf.identity_3.1.200.v20120610-1946
17	ACTIVE      org.eclipse.core.jobs_3.5.200.v20120521-2346
18	ACTIVE      org.eclipse.equinox.console_1.0.0.v20120522-1841
19	ACTIVE      org.apache.felix.gogo.shell_0.8.0.v201110170705
20	STARTING    org.eclipse.ecf.sharedobject_2.2.100.v20120610-1946
21	ACTIVE      org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy_1.0.0.v20120610-1946
23	RESOLVED    org.eclipse.osgi.services_3.3.100.v20120522-1822
24	ACTIVE      org.eclipse.ecf.osgi.services.distribution_2.0.100.v20120610-1946
25	STARTING    org.eclipse.ecf.provider.remoteservice_4.0.0.v20120610-1946
26	STARTING    org.eclipse.equinox.util_1.0.400.v20120522-2049
27	STARTING    org.eclipse.ecf.provider_4.2.100.v20120610-1946
28	ACTIVE      org.eclipse.ecf_3.1.300.v20120610-1946
29	STARTING    org.eclipse.ecf.remoteservice_6.0.200.v20120610-1946
30	ACTIVE      org.eclipse.ecf.examples.remoteservices.hello.ds.host_3.0.0.qualifier
31	ACTIVE      org.eclipse.gemini.blueprint.core_1.0.0.RELEASE
32	ACTIVE      org.eclipse.gemini.blueprint.io_1.0.0.RELEASE
33	RESOLVED    org.springframework.core_3.1.1.RELEASE
34	RESOLVED    org.apache.commons.logging_1.1.1.v201101211721
35	RESOLVED    org.aopalliance_1.0.0.v201105210816
36	RESOLVED    org.springframework.context_3.1.1.RELEASE
39	RESOLVED    org.springframework.context.support_3.1.1.RELEASE
40	RESOLVED    org.springframework.expression_3.1.1.RELEASE
41	RESOLVED    org.springframework.aop_3.1.1.RELEASE
42	RESOLVED    org.springframework.beans_3.1.1.RELEASE
43	RESOLVED    org.springframework.asm_3.1.1.RELEASE
44	RESOLVED    org.eclipse.gemini.blueprint.extender_1.0.0.RELEASE
46	ACTIVE      org.eclipse.ecf.examples.remoteservices.hello_3.0.100.qualifier


No errors are reported during startup. However, the service does not get published and the consumer cannot perform the remote calls. Also, nothing appears under Service Discovery in Eclipse. Tried with different startLevels, configurations, etc. but no dice so far.

I can also post the consumer-side changes but I think it's wiser to resolve the above issue before proceeding further.

Thanks,
Joerg

[Updated on: Tue, 29 January 2013 14:49]

Report message to a moderator

Re: ECF container does not get activated with Gemini Blueprint [message #1005717 is a reply to message #1005695] Mon, 28 January 2013 11:32 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
org.eclipse.gemini.blueprint.extender_1.0.0.RELEASE is RESOLVED so Gemini Blueprint's extender is not operational. You need to start it.
Re: ECF container does not get activated with Gemini Blueprint [message #1005886 is a reply to message #1005717] Tue, 29 January 2013 08:37 Go to previous messageGo to next message
Joerg Saini is currently offline Joerg SainiFriend
Messages: 8
Registered: January 2013
Junior Member
Thanks for the tip Glyn.

After adding the following line in the product configuration (having removed the blueprint.core auto-start):
<plugin id="org.eclipse.gemini.blueprint.extender" autoStart="true" startLevel="0" />

Gemini Blueprint does get triggered, but throws this error:
SEVERE: Unable to create application context for [org.eclipse.ecf.examples.remoteservices.hello.ds.host], unsatisfied dependencies: none
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '.org.eclipse.gemini.blueprint.service.exporter.support.OsgiServiceFactoryBean#0': Initialization of bean failed; nested exception is java.lang.NoSuchFieldError: NULL

This looks similar to https://bugs.eclipse.org/bugs/show_bug.cgi?id=375225 and we assume we should upgrade to Gemini Blueprint 1.0.2.RELEASE (btw, we are using Spring Framework 3.1.1.RELEASE). Correct?
Re: ECF container does not get activated with Gemini Blueprint [message #1005895 is a reply to message #1005886] Tue, 29 January 2013 08:56 Go to previous messageGo to next message
Joerg Saini is currently offline Joerg SainiFriend
Messages: 8
Registered: January 2013
Junior Member
OK, after adding Gemini Blueprint 1.0.2.RELEASE:

INFO: Application context successfully refreshed (OsgiBundleXmlApplicationContext(bundle=org.eclipse.ecf.examples.remoteservices.hello.ds.host, config=OSGI-INF/hello.xml))

The application also successfully appears under Service Discovery.

I will proceed to the consumer-side adaptations and let you know.

Thanks!
Re: ECF container does not get activated with Gemini Blueprint [message #1005906 is a reply to message #1005895] Tue, 29 January 2013 09:25 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Glad you are progressing now. Smile
Re: ECF container does not get activated with Gemini Blueprint [message #1006011 is a reply to message #1005906] Tue, 29 January 2013 14:44 Go to previous messageGo to next message
Joerg Saini is currently offline Joerg SainiFriend
Messages: 8
Registered: January 2013
Junior Member
Consumer-side (org.eclipse.ecf.examples.remoteservices.hello.ds.consumer)

org.eclipse.ecf.examples.remoteservices.hello.ds.consumer/OSGI-INF/helloclient.xml

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" default-activation="eager">
    <bean id="consumer" class="org.eclipse.ecf.examples.internal.remoteservices.hello.ds.consumer.HelloClientComponent"/>

    <service ref="consumer" interface="org.eclipse.ecf.examples.remoteservices.hello.IHello" depends-on="host"/>
    
    <reference id="host" interface="org.eclipse.ecf.examples.remoteservices.hello.IHello" availability="mandatory">
		<reference-listener bind-method="bindHello">
			<ref component-id="consumer" />
		</reference-listener>
	</reference>
</blueprint>

org.eclipse.ecf.examples.remoteservices.hello.ds.consumer/META-INF/MANIFEST.MF

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.eclipse.ecf.examples.remoteservices.hello.ds.consumer;singleton:=true
Bundle-Version: 2.0.0.qualifier
Bundle-Vendor: %bundleProvider
Bundle-RequiredExecutionEnvironment: J2SE-1.5,
 J2SE-1.4,
 CDC-1.1/Foundation-1.1
Import-Package: org.eclipse.ecf.examples.remoteservices.hello;version="3.0.0",
 org.eclipse.ecf.remoteservice,
 org.eclipse.ecf.remoteservice.events,
 org.eclipse.equinox.app;version="1.0.0",
 org.eclipse.equinox.concurrent.future;version="1.0.0"
Bundle-Blueprint: OSGI-INF/helloclient.xml
Bundle-Localization: bundle
Export-Package: org.eclipse.ecf.examples.internal.remoteservices.hello.ds.consumer
Require-Bundle: org.eclipse.equinox.common


org.eclipse.ecf.examples.remoteservices.hello.ds.consumer/products/Hello Service Consumer DS (zeroconf,generic).product plugins & configurations sections only

   <plugins>
      <plugin id="org.eclipse.ecf.examples.remoteservices.hello"/>
      <plugin id="org.eclipse.ecf.examples.remoteservices.hello.ds.consumer"/>
      <plugin id="org.aopalliance"/>
      <plugin id="org.apache.commons.logging"/>
      <plugin id="org.apache.felix.gogo.command"/>
      <plugin id="org.apache.felix.gogo.runtime"/>
      <plugin id="org.apache.felix.gogo.shell"/>
      <plugin id="org.eclipse.core.contenttype"/>
      <plugin id="org.eclipse.core.jobs"/>
      <plugin id="org.eclipse.core.runtime"/>
      <plugin id="org.eclipse.ecf"/>
      <plugin id="org.eclipse.ecf.discovery"/>
      <plugin id="org.eclipse.ecf.identity"/>
      <plugin id="org.eclipse.ecf.osgi.services.distribution"/>
      <plugin id="org.eclipse.ecf.osgi.services.remoteserviceadmin"/>
      <plugin id="org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy"/>
      <plugin id="org.eclipse.ecf.provider"/>
      <plugin id="org.eclipse.ecf.provider.jmdns"/>
      <plugin id="org.eclipse.ecf.provider.remoteservice"/>
      <plugin id="org.eclipse.ecf.remoteservice"/>
      <plugin id="org.eclipse.ecf.sharedobject"/>
      <plugin id="org.eclipse.equinox.app"/>
      <plugin id="org.eclipse.equinox.common"/>
      <plugin id="org.eclipse.equinox.concurrent"/>
      <plugin id="org.eclipse.equinox.console"/>
      <plugin id="org.eclipse.equinox.preferences"/>
      <plugin id="org.eclipse.equinox.registry"/>
      <plugin id="org.eclipse.equinox.util"/>
      <plugin id="org.eclipse.gemini.blueprint.core" version="1.0.2.RELEASE"/>
      <plugin id="org.eclipse.gemini.blueprint.extender" version="1.0.2.RELEASE"/>
      <plugin id="org.eclipse.gemini.blueprint.io" version="1.0.2.RELEASE"/>
      <plugin id="org.eclipse.osgi"/>
      <plugin id="org.eclipse.osgi.services"/>
      <plugin id="org.eclipse.osgi.services.remoteserviceadmin"/>
      <plugin id="org.springframework.aop" version="3.1.1.RELEASE"/>
      <plugin id="org.springframework.asm" version="3.1.1.RELEASE"/>
      <plugin id="org.springframework.beans" version="3.1.1.RELEASE"/>
      <plugin id="org.springframework.context" version="3.1.1.RELEASE"/>
      <plugin id="org.springframework.context.support" version="3.1.1.RELEASE"/>
      <plugin id="org.springframework.core" version="3.1.1.RELEASE"/>
      <plugin id="org.springframework.expression" version="3.1.1.RELEASE"/>
   </plugins>

   <configurations>
      <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.ecf" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.ecf.osgi.services.distribution" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.ecf.osgi.services.remoteserviceadmin" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.ecf.osgi.services.remoteserviceadmin.proxy" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.ecf.provider" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.ecf.provider.jmdns" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.app" autoStart="true" startLevel="0" />
      <plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
      <plugin id="org.eclipse.gemini.blueprint.extender" autoStart="true" startLevel="0" />
   </configurations>


With the above adaptations the synchronous remote call via proxy completes successfully using Gemini Blueprint.

However, the asynchronous remote call with callback fails with:
WARNING: Custom method [public void org.eclipse.ecf.examples.internal.remoteservices.hello.ds.consumer.HelloClientComponent.bindHello(org.eclipse.ecf.examples.remoteservices.hello.IHello)] threw exception when passing service [$Proxy2@58714e00]
java.lang.ClassCastException: $Proxy2 cannot be cast to org.eclipse.ecf.remoteservice.IRemoteServiceProxy


After looking into this it appears that when using DS the proxy instance is of type org.eclipse.ecf.provider.remoteservice.generic.RemoteServiceImpl whereas with Blueprint the proxy is of type org.springframework.aop.framework.JdkDynamicAopProxy (thus the ClassCastException). I'll keep looking... any advice is welcome.

[Updated on: Tue, 29 January 2013 16:19]

Report message to a moderator

Re: ECF container does not get activated with Gemini Blueprint [message #1006147 is a reply to message #1006011] Wed, 30 January 2013 09:03 Go to previous messageGo to next message
Joerg Saini is currently offline Joerg SainiFriend
Messages: 8
Registered: January 2013
Junior Member
I'm pretty much stumped. The way I understand it ECF remote service proxies are supposed to implement the IAsyncRemoteServiceProxy automagically. In this case the result would be to have a proxy that implements the IHelloAsync interface as well. This works when using Service Tracker or DS activation but I can't tell why this does not happen when using Blueprint.

Would that be part of the proxy creation code within ECF or is it within Gemini Blueprint?

Thanks!
Re: ECF container does not get activated with Gemini Blueprint [message #1006481 is a reply to message #1006147] Thu, 31 January 2013 13:09 Go to previous message
Joerg Saini is currently offline Joerg SainiFriend
Messages: 8
Registered: January 2013
Junior Member
When using DS the proxy is created by ECF and in particular org.eclipse.ecf.remoteservice.AbstractRemoteService$ProxyClassLoader. The createProxy() methods seem overly likely (even though I haven't verified through a debug session yet).

The generated instance implements the following interfaces:

interface org.eclipse.ecf.examples.remoteservices.hello.IHello,
interface org.eclipse.ecf.examples.remoteservices.hello.IHelloAsync,
interface org.eclipse.ecf.remoteservice.IRemoteServiceProxy

When using Blueprint the proxy creation appears to be handled through Gemini Blueprint only, involving the org.eclipse.gemini.blueprint.context.support.internal.classloader.ChainedClassLoader.

In this case the generated proxy implements the interfaces:

interface org.eclipse.ecf.examples.remoteservices.hello.IHello,
interface org.eclipse.gemini.blueprint.service.importer.ImportedOsgiServiceProxy,
interface org.springframework.aop.IntroductionInfo,
interface java.io.Serializable,
interface org.springframework.core.InfrastructureProxy,
interface org.springframework.aop.SpringProxy

Should the proxy creation have been delegated to ECF in the second case? Is there a way to cause this?

I'll put together a post to the Gemini forum as well.

[Updated on: Thu, 31 January 2013 13:16]

Report message to a moderator

Previous Topic:ECF doesn't remember IM providers from one eclipse session to the next
Next Topic:ECF Generic server is connecting to the wrong host
Goto Forum:
  


Current Time: Wed Dec 04 16:45:17 GMT 2024

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

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

Back to the top