Community
Participate
Working Groups
Build Identifier: The Metatype Service implementation is currently failing the CT due to a recent change in the Bundle Wiring API where the getFragmentRevisions() method was removed. This needs to be fixed and the RI updated. java.lang.NoSuchMethodError: org.osgi.framework.wiring.BundleWiring.getFragmentRevisions()Ljava/util/List; at org.eclipse.equinox.metatype.FragmentUtils.findEntryPaths(FragmentUtils.java:42) at org.eclipse.equinox.metatype.MetaTypeProviderImpl.readMetaFiles(MetaTypeProviderImpl.java:88) at org.eclipse.equinox.metatype.MetaTypeProviderImpl.<init>(MetaTypeProviderImpl.java:56) at org.eclipse.equinox.metatype.MetaTypeInformationImpl.<init>(MetaTypeInformationImpl.java:36) at org.eclipse.equinox.metatype.MetaTypeServiceImpl$1.run(MetaTypeServiceImpl.java:76) at org.eclipse.equinox.metatype.MetaTypeServiceImpl$1.run(MetaTypeServiceImpl.java:1) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.equinox.metatype.MetaTypeServiceImpl.getMetaTypeProvider(MetaTypeServiceImpl.java:74) at org.eclipse.equinox.metatype.MetaTypeServiceImpl.getMetaTypeInformation(MetaTypeServiceImpl.java:52) at org.osgi.test.cases.metatype.junit.AdMinOnlyTest.setUp(AdMinOnlyTest.java:130) at junit.framework.TestCase.runBare(TestCase.java:128) 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 aQute.junit.Activator.test(Activator.java:200) at aQute.junit.Activator.automatic(Activator.java:97) at aQute.junit.Activator.run(Activator.java:47) Reproducible: Always
Created attachment 189007 [details] initial patch Here is a quick patch that migrates to using BundleWire objects from the osgi.wiring.host namespace to discover fragment revisions. I think we should consider changing the code to using BundleWiring.findEntries instead.
Created attachment 189030 [details] Updated patch using BundleWiring findEntries and listResources Here is an updated patch that uses BundleWiring.findEntries and listResources. Tested against the CT.
Created attachment 189045 [details] Corrected updated patch using only findEntries We don't want classpath scanning.
(In reply to comment #3) > Created attachment 189045 [details] > Corrected updated patch using only findEntries > > We don't want classpath scanning. Is this the complete patch. When applied to head I get a compile error in org.eclipse.equinox.metatype.MetaTypeProviderImpl.readMetaFiles(Bundle, SAXParserFactory) To a call to the old FragmentUtils.findEntryPaths method.
Created attachment 189105 [details] Corrected complete patch using only findEntries The previous patch only included FragmentUtils changes. Needed the MetatypeProviderImpl changes as well.
I released the patch.