Re: Platform wrapped jar cannot access META-INF/service impl via ServiceLoader

2019-08-19 Thread Damian Carey
Geertjan, Emi and Boris, Many thanks for responding. It seems that Lookup and ServiceLoader are similar, yet different enough to be troublesome. I will need to do more testing, but first I will try to inject the services I need via a method, and not via META-INF/resources. Much appreciated. -Damian

Re: Platform wrapped jar cannot access META-INF/service impl via ServiceLoader

2019-08-17 Thread Boris Heithecker
Are you sure that the services your third-party jar wants to look up via java.util.ServiceLoader.load(Clazz.class) are registered as META-INF/services entries? The problem could be that Lookup.getDefault().lookup(Clazz.class) also looks up services registered in the system file system (layer.xml) i

Re: Platform wrapped jar cannot access META-INF/service impl via ServiceLoader

2019-08-17 Thread Emilian Bold
I don't have a solution at hand but remember that the lookup will keep a single object instance in memory for a given service entry while the ServiceLoader will create fresh instances if it's just reading META-INF/service files (unless the JAR keeps a reference to a single ServiceLoader instance so

Re: Platform wrapped jar cannot access META-INF/service impl via ServiceLoader

2019-08-17 Thread Geertjan Wielenga
I can't respond theoretically to this but would be happy to look at it if you could put a small app together that reproduces this, on GitHub. Gj On Sat, Aug 17, 2019 at 8:12 AM Damian Carey wrote: > Hi all, > > We have a "mature" (10+ year old) Netbeans Platform Swing product, which > has 35+ m

Platform wrapped jar cannot access META-INF/service impl via ServiceLoader

2019-08-16 Thread Damian Carey
Hi all, We have a "mature" (10+ year old) Netbeans Platform Swing product, which has 35+ modules. This all works well. As usual, when one Netbeans module provides an Implementation we find it from other Netbeans modules using the usual idiom ... Provider: puts entry in META-INF/services Consumer: