>>>>> Steinar Bang <[email protected]>: >>>>> Steven Huypens <[email protected]>: >> Hi Steinar, >> I am not using any scopes indeed, nor any explicit logging configuration. I >> just realized though, we sometimes see the stacktrace below in our >> integration tests, maybe it is related to your problem. It doesn't happen a >> lot, so I did not have a closer look yet.
>> EventDispatcher: Error during dispatch. >> (java.lang.ExceptionInInitializerError) >> java.lang.ExceptionInInitializerError >> at >> be.cipal.impl.liquibase.extender.internal.LiquibaseMigrationBundleFactory.loadDatabase(LiquibaseMigrationBundleFactory.java:206) >> // skipped part of the trace >> Caused by: liquibase.exception.UnexpectedLiquibaseException: Cannot find >> default log service >> at liquibase.Scope.getCurrentScope(Scope.java:87) >> at liquibase.database.DatabaseFactory.<clinit>(DatabaseFactory.java:20) >> ... 21 more > Ah! That's the exact message I'm currently seeing in karaf.log and what > I'm trying to get past. > I get that message consistently (at least I do, in the pax exam > integration test I created for the karaf feature). FYI, this is the integration test: https://github.com/steinarb/liquibase-karaf-feature/tree/master/liquibase-integration-test karaf.liquibase.sample is a bundle project defining, and attaching, two karaf features: 1. sample-db which is a jdbc-config feature defining a derby in-memory datasource 2. karaf-liquibase-sample which loads a @Component that exposes a PreHook service, that plugs into the datasource and sets up a schema and populates with some dummy data karaf.liquibase.sample.datasource.receiver is another bundle project, thatcontains a @Component that has a Datasource @Reference and is loaded by a the attached feature karaf-liquibase-sample-datasource-receiver, that requires feature sample-db. karaf.liquibase.tests is a pax exam karaf test that loads and asserts the feature karaf-liquibase-sample-datasource-receiver Note that it is also possible to load the features of the test manually, by building the project, and in a karaf started as my own user (ie. a karaf from a binary tar.gz or .zip distribution file), give the commands: feature:repo-add mvn:no.priv.bang.karaf/karaf.liquibase.sample.datasource.receiver/LATEST/xml/features feature:install karaf-liquibase-sample-datasource-receiver This is what I have used to debug into the liquibase init code that fails to find the log, and give the error messages you've quoted.
