Community
Participate
Working Groups
!ENTRY org.eclipse.ecf.osgi.services.distribution 4 0 2010-07-07 01:39:32.258 !MESSAGE !STACK 0 org.osgi.framework.ServiceException: Exception in org.eclipse.ecf.internal.osgi.services.distribution.EventHookImpl.event() at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.notifyEventHooksPrivileged(ServiceRegistry.java:1138) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:743) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:711) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:129) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:206) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:507) at org.eclipse.ecf.tests.osgi.services.distribution.AbstractDistributionTest.registerService(AbstractDistributionTest.java:164) at org.eclipse.ecf.tests.osgi.services.distribution.AbstractDistributionTest.registerService(AbstractDistributionTest.java:169) at org.eclipse.ecf.tests.osgi.services.distribution.AbstractRemoteServiceAccessTest.testGetRemoteServiceReference(AbstractRemoteServiceAccessTest.java:70) 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:585) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.pluginbuilder.autotestsuite.application.AutoTestRunner.run(AutoTestRunner.java:115) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.runAllJUnit3Tests(AutoTestApplication.java:260) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.runAllJUnitTestsOnUIThread(AutoTestApplication.java:175) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.runHeadless(AutoTestApplication.java:159) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.run(AutoTestApplication.java:96) at org.pluginbuilder.autotestsuite.application.AutoTestApplication.start(AutoTestApplication.java:69) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311) at org.eclipse.equinox.launcher.Main.main(Main.java:1287) Caused by: java.lang.IllegalArgumentException: Service is not valid: * at org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.registerRemoteService(RegistrySharedObject.java:295) at org.eclipse.ecf.internal.osgi.services.distribution.EventHookImpl.handleRegisteredServiceEvent(EventHookImpl.java:118) at org.eclipse.ecf.internal.osgi.services.distribution.EventHookImpl.event(EventHookImpl.java:62) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.notifyEventHooksPrivileged(ServiceRegistry.java:1129) ... 41 more org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.checkServiceClass(String[], Object) throws an exception if called with the remote service wildcard.
Attached context shows the classes/methods involved
Created attachment 173651 [details] mylyn/context/zip
Please describe/detail the input parameters used for this call.
One of the test that fails because of this issue is GenericRemoteServiceRegisterTest(AbstractRemoteServiceRegisterTest).testRegisterOnCreatedServer() line: 81 The problem is in org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.checkServiceClass(String[], Object) if called with String[]{"*"} which fails with a ClassNotFoundException for "*". We might have to add logic to accept "*" in org.eclipse.ecf.provider.remoteservice.generic.RegistrySharedObject.checkServiceClass(String[], Object)
Alternatively we might want to change org.eclipse.ecf.internal.osgi.services.distribution.EventHookImpl.handleRegisteredServiceEvent(ServiceReference, Collection) to resolve "*" to the actual service interface(s) in org.eclipse.ecf.internal.osgi.services.distribution.EventHookImpl.getExportedInterfaces(ServiceReference).
After some more investigation the underlying problem might be relatively simple. org.eclipse.ecf.internal.osgi.services.distribution.EventHookImpl.getExportedInterfaces(ServiceReference) does not handle a service wildcard nested inside a String[].
(In reply to comment #6) > After some more investigation the underlying problem might be relatively > simple. > org.eclipse.ecf.internal.osgi.services.distribution.EventHookImpl.getExportedInterfaces(ServiceReference) > does not handle a service wildcard nested inside a String[]. Yeah. It does handle "*" (i.e. rather than new String[] { "*" }). As I *remember*, the specification (for remote services) specifies the "*" String as indicating the wildcard...I don't recall it saying anything about new String[] { "*" }. So...in the current implementation new String[] { "*" } isn't supported (as you've found). We could pretty easily support it...although I'm not sure if that would be specification compliant or not. Unless I'm misremembering (which is possible, since I don't have the spec committed to memory yet :) I think the spec is ambiguous about new String[] { "*" }.
Created attachment 173680 [details] Handle String[]{"*"}
(In reply to comment #8) > Created an attachment (id=173680) [details] > Handle String[]{"*"} Although this patch certainly allows us to support new String[] { "*" }, I think we need to determine (somehow) whether this is going to introduce a problem WRT remote service spec compliance. One reason...*now* the impl will also accept (e.g.): new String[] { "IFoo", "*" }; and this might be considered a problem (by some). In any event, it's not a big deal to me, but I just don't want to introduce things without checking that might get us dinged on spec compliance (no matter how trivial).
Removing R-OSGi tag as this also affects other remote service containers
Released a change in org.eclipse.ecf.tests.osgi.services.distribution.AbstractRemoteServiceAccessTest.getServiceProperties() to HEAD that replaces the String[]{SERVICE_EXPORTED_INTERFACES_WILDCARD} from the service properties with just SERVICE_EXPORTED_INTERFACES_WILDCARD.
Fixed in HEAD (as per previous comment)
Does this need a backport for 3.3.1?
(In reply to comment #13) > Does this need a backport for 3.3.1? Yes. Please apply this fix to the Release_3_3 stream, and I'll do another Release_3_3 sdk build for our contribution to Helios maintenance build on Monday next (9/13). Please just let me know on this bug when it's been applied to Release_3_3 stream.
(In reply to comment #14) > Yes. Please apply this fix to the Release_3_3 stream, and I'll do another > Release_3_3 sdk build for our contribution to Helios maintenance build on > Monday next (9/13). Please just let me know on this bug when it's been applied > to Release_3_3 stream. Backported to Release_3_3 and spun off a new test build https://build.ecf-project.org/hudson/job/L-Release_3_3-sdk.tests.feature/16/
Changing target milestone