Re: Problems with logging to karaf.log from liquibase >3

2022-06-05 Thread Steinar Bang
> Steinar Bang :

> (rookie copy/paste mistake!  I forgot to match the name in the
> @Component annotation with the ops4j.preHook config value in
> jdbc-config)

Correcting myself: in addition to the mistake above, I do need a
Datasource consumer, i.e. an SCR component that receives a Datasource
injection.

If not, the liquibase actions are not run.

The project now has an integration test, and the karaf.log of the
integration test shows liquibase output, for version 3.8.0 of liquibase,
so I can use this to debug liquibase logging for 4.x versions:
 
https://github.com/steinarb/liquibase-karaf-feature/tree/master/liquibase-integration-test/karaf.liquibase.tests



Re: Problems with logging to karaf.log from liquibase >3

2022-06-05 Thread Steinar Bang
> Steinar Bang :

> So I created a bundle project with a PreHook java class, and in the
> feature.xml added a jdbc-config feature that creates the datasource and
> requires the PreHook feature.

> And then I created an integration test that loads the jdbc-config
> feature.

> And according to the karaf.log this just loads all features and then
> stops.

> What's needed to actually run the PreHook?

> Do I need to create another feature that requires the jdbc-config
> feature and expects a DatataSource service?

(rookie copy/paste mistake!  I forgot to match the name in the
@Component annotation with the ops4j.preHook config value in
jdbc-config)