Following up on this...these messages are actually being sent to Felix' internal "logger", but currently that is just hard-wired to stdout. The ultimate goal is to have the internal logger use the Log Service if it is available, but this hasn't been implemented yet.

So, until then there is no way to "hide" these errors. Perhaps there is another approach too. One thing that we could do (in addition to eventually using the log service) is to have a property that allows us to disable diagnostic messages...otherwise, I don't know.

It is unfortunate that resource loading also probes classes too, but in most cases these "errors" are harmless.

-> richard

John E. Conlon wrote:
When Richard tightened the classloading restrictions he added more
verbose logging. Must admit some of the messages are just noise and I
ignore them.

It would be nice to modulate logging to eliminate some or all of the
'noisy' ones.

Here are three variations of 'error' messages that I ignore:

1. My slf4j logging bundle will look for non-existence BeanInfo objects
so felix will generate messages like this one:

ERROR: ****
****
Package 'org.apache.log4j' is imported by bundle 7 from bundle 7, but
the export ed package from bundle 7 does not contain the requested class
'org.apache.log4j. PatternLayoutBeanInfo'. Please verify that the class
name is correct in the impo rting bundle 7 and/or that the exported
package is correctly bundled in 7.
****


2. Couple of my bundles use JXPath to query business objects. JXPath
will search for metadata objects to aid its search, causing felix to
generate messages like this one:

ERROR: ****
****
Package 'com.verticon.react2.business' is imported by bundle 20 from
bundle 20, but the exported package from bundle 20 does not contain the
requested class
'com.verticon.react2.business.MovementHistoryEntryXBeanInfo'. Please
verify that the class name is correct in the importing bundle 20 and/or
that the exported package is correctly bundled in 20.
****

3. Using beanshell script in a bundle to bring in complex configuration
information. Beanshell tries to load metadata as well. In response Felix
logs messages like:

ERROR: ****
****
Class 'java.lang.bsh' was not found. Bundle 21 does not import package
'java.lang', nor is the package exported by any other bundle or
available from the system class loader.
****
****


- John

On Thu, 2006-06-01 at 14:18 +0800, Niclas Hedhman wrote:
On Thursday 01 June 2006 12:21, Nichols, Jon wrote:
Should this really be logging? If so, how do I prevent all of these
messages?
I have noticed these too... (not been on Felix more than a few minutes ;o) )

Apparently, Felix wants to warn people that resource loading fails. BUT, many applications are designed to fail and try something else, like ResourceBundle.

I guess that a discriminatory logging would be needed, i.e. one can declare which packages are expected to fail in this fashion, and only for other failures will Felix output a Warning.


Cheers
Niclas



Reply via email to