Hi Manuel,

I have not read the whole thread. So I hope my comments are not out of context.

On Wed, Jan 29, 2014 at 1:01 PM, Manuel Holtz <hakay...@gmail.com> wrote:
> I found a solution to the specific issue now.
>
> By experimenting, I noticed that I could just point the existing
> dbpedia-proper-noun-extraction enhancer engine to my own index, as a hack.
> This worked. Subsequently, I copied over the exact configuration settings
> to my own enhancer. Turns out, it was the Type Mappings section that was
> populated by default. After removing all the type mappings from my enhancer
> configuration and restarting the Stanbol server, my enhancer became
> available.

Unexpected adding of defaults has caught me as well. If you define
defaults for services the OSGI environment does already add them to
the parsed configuration. Because of that you can not distinguish in
the component between 'property not present' and 'property set to
default'. The only solution to that is to not defining default values,
but having defaults is also a nice way to provide examples to new
users.

To avoid having the default is is usually the best to define the
property with an empty value in the configuration file.

>
> Thanks for your help! Still, if anyone knows how to properly debug an
> unavailable enhancer, please let me know.
>

Some EnhancementEngines in Stanbol do separate the OSGI Component (the
class taking the configuration) and the OSGI service implementation
(the class implementing EnhancementEngine).

Typically this has the reason that the Component configuration will
require to listen for a specific service based on its configuration
(e.g. a Entityhub Site with the name as parsed by the configuration.

To check if the configuration is valid check if the Component is
marked as "active" in the components tab of the Felix Web Console. If
this is not the case you will find an Exception in the log. Typically
a ConfigurationException telling you the property and the reason.

But even if the Component is "active" the Engine (service) might still
not be around - most likely because one (or more) of the services its
depend on is not present. To check for Services you need to use the
"services" tab of the Felix Web Console. If there are many
EnhancementEngines registered it can be hard to find the correct
service. However searching for engines provided by the correct bundle
should help. In addition newly registered services will get the
highest service IDs.

To monitor the Component activation and the tracking state for
dependent services you should enable DEBUG or even TRACE level logging
for the OSGI component. Log levels can selectively be set by adding
"Apache Sling Logging Logger Configuration"
(org.apache.sling.commons.log.LogManager.factory.config). If you find
an engine that is missing detailed DEBUG an TRACE level logging feel
free to create an Issue and/or provide a patch.

best
Rupert


> Manuel



-- 
| Rupert Westenthaler             rupert.westentha...@gmail.com
| Bodenlehenstraße 11                             ++43-699-11108907
| A-5500 Bischofshofen

Reply via email to