| Hi Fabian, 
 This is a bug in the handling of the wildcard.  Please see [1].   In
    the mean time, things work with the exported interfaces explicitly
    spelled out rather than using the wildcard character
 
 e.g. properties.put("service.exported.interfaces", new String[] {
    "my.package.Foo" });
 
 Thanks,
 
 Scott
 
 [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=340775
 
 
 On 3/23/2011 8:07 AM, Fabian Meyer wrote:
 Hi,
 I was trying to implement a quick example for the osgi remote
      service admin using ecf:
 
 HashMap<String, Object> properties = new
      HashMap<String, Object>();
 properties.put("service.exported.interfaces", new String[]
      {"*"});
 Collection<ExportRegistration> exportService =
      admin.exportService(test, properties);
 for (ExportRegistration reg : exportService) {
 if (reg.getException() != null) {
 reg.getException().printStackTrace();
 }
 ExportReference exportReference =
      reg.getExportReference();
 EndpointDescription exportedEndpoint =
      exportReference.getExportedEndpoint();
 System.out.println(exportedEndpoint);
 }
 
 "test" is a simple service reference without any properties. The
      following exception is returned by reg.getException():
 
 java.lang.IllegalArgumentException: Service=* is invalid
 at
org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.registerRemoteService(RegistrySharedObject.java:237)
 at
org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin.exportService(RemoteServiceAdmin.java:1842)
 at
org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin.exportService(RemoteServiceAdmin.java:240)
 at testexporter.Testexporter.activate(Testexporter.java:29)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at
org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:210)
 at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:139)
 at
org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:339)
 at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588)
 at
org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196)
 at
org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:441)
 at
org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:213)
 at
org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:800)
 at
org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:767)
 at
      org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
 at
org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:70)
 
 
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev 
 |