Re: Solved felix SCR Logging, but replaced that with a problem with optional dependency resolution in the framework

2016-08-11 Thread Benson Margulies
I have now explained it. The exception is noisy and harmless. In Equinox, it's logged to the Equinox log service, which was, until moments ago, invisible to me. However, it's still true that my test fails in Felix. I am not going to bother this list or myself with that phenomenon until I have

Re: Solved felix SCR Logging, but replaced that with a problem with optional dependency resolution in the framework

2016-08-11 Thread Benson Margulies
On Thu, Aug 11, 2016 at 5:07 PM, David Jencks wrote: > I don’t understand your explanation. What is causing the class load? So far > it looks like resolution:=optional worked fine, but your code doesn’t > implement what it needs to make it actually optional.

Solved felix SCR Logging, but replaced that with a problem with optional dependency resolution in the framework

2016-08-11 Thread Benson Margulies
Quite some time ago, we had a requirement to have read-only provisioned OSGi caches. So I had set up our standard configuration to use Equinox rather than Felix. Equinox sets up a LogService of its own, which in turn requires a 'LogReader' to get the log messages to show up anywhere. Adding

DS logging, still

2016-08-11 Thread Benson Margulies
I think I'm still missing something simple about DS logging. I have added org.slf4j:osgi-over-slf4j to my container to provide a LogService. In pax-exam, I did: frameworkProperty("ds.loglevel").value("debug"), SLF4J messages from my code show up. Nothing shows up from Felix SCR. Any ideas?

Re: NoClassDefFoundError of classes that are in the JRE

2016-08-11 Thread Neil Bartlett
I want to try to give you a more solid basis for these discoveries. A bundle MUST import all of the packages that it both (a) uses (that is, refers to from contained types) and (b) does not contain. There is a single exception to this rule: all package names beginning with “java.” are loaded by

RE: NoClassDefFoundError of classes that are in the JRE

2016-08-11 Thread Remo Liechti
Found it. You need to pass that imports along all bundles in between. Let's say, you have bundle A, B and C. And Bundle C uses some javax.xml.* stuff, while the bundles hierarchy sis like: A=Com.foo B=com.foo.bar C=com.foo.bar.util Now you first need to add the javax.xml.parsers to the the

Re: Bundles needed to use DS/SCR

2016-08-11 Thread Benson Margulies
Yup, I have it all working. I have to have a family of an abstract class and subclasses of tests if each test needs different CM properties, but that's better than the bigger mess I was making before. On Thu, Aug 11, 2016 at 2:59 AM, Christian Schneider wrote: >

Re: Bundles needed to use DS/SCR

2016-08-11 Thread Christian Schneider
pax-exam-cm just sets up the config. As far as I know it does not install config admin so you will still need the bundle. Christian 2016-08-11 1:42 GMT+02:00 Benson Margulies : > For one of my tests, pax-exam-cm looks great. Do I include felix > config admin with it or

Re: NoClassDefFoundError of classes that are in the JRE

2016-08-11 Thread Robert Onslow
Nothing that occurs to me, unfortunately Remo Robert On Thu, Aug 11, 2016 at 11:36 AM, Remo Liechti wrote: > Robert > > Thanks for pointing this out. I found the config location and in Weblogic you > can actually set this property, but it seems to have no effect. I'll

RE: NoClassDefFoundError of classes that are in the JRE

2016-08-11 Thread Remo Liechti
Robert Thanks for pointing this out. I found the config location and in Weblogic you can actually set this property, but it seems to have no effect. I'll open a tracker with Oracle on this. Anything else I can try? Thanks -Original Message- From: Robert Onslow

Re: NoClassDefFoundError of classes that are in the JRE

2016-08-11 Thread Robert Onslow
Remo The other thing you may need to do is find the configuration file for the felix installation, something like config.properties, and set org.osgi.framework.system.packages.extra=javax.xml.parser, There's no need for a version number Robert On Thu, Aug 11, 2016 at 9:34 AM, Remo

RE: NoClassDefFoundError of classes that are in the JRE

2016-08-11 Thread Remo Liechti
Hi Robert Good to hear that. Anything else to put in, like version number or the like? When I put it in like this, it didn't work: Import-Package: javax.xml.parsers, ..., ..., Thanks -Original Message- From: Robert Onslow [mailto:robert.ons...@gmail.com] Sent: Donnerstag, 11.

Re: Registering a ConfigurationListener

2016-08-11 Thread Oliver Lietz
On Wednesday 10 August 2016 19:46:05 Benson Margulies wrote: > On Wed, Aug 10, 2016 at 5:44 PM, David Jencks [...] > > out of curiosity, why do you need your own ConfigurationListener? > > Oh, it's the collision of two issues. > > First, I need to have the arrangement of '.cfg' file make sense

NoClassDefFoundError of classes that are in the JRE

2016-08-11 Thread Remo Liechti
Hi guys Another issue I came across while bundling the osgi application into a webapplication for WebLogic. It seems like some of the bundles I like to start fail during activation, because they cannot find the class description of classes that actually are in the regular JRE:

RE: Cannot use configuration pid ... for bundle XX because it belongs to bundle YY

2016-08-11 Thread Remo Liechti
>> The main bundle activator does the following regarding this component: >> Dictionary properties = new Hashtable> Object>(); properties.put("userRolesFile", "someFileSystemPath"); >> properties.put("userCredentialsFile", "someFileSystemPath"); >>

Re: Bundles needed to use DS/SCR

2016-08-11 Thread Oliver Lietz
On Wednesday 10 August 2016 19:42:52 Benson Margulies wrote: > For one of my tests, pax-exam-cm looks great. Do I include felix > config admin with it or not? Not sure if I understand your question, but you have to provide Metatype Service and Configuration Admin Service when using Felix DS/SCR.