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

2022-08-13 Thread Steven Huypens
Hi Steinar,

1) The exception "No Common Superclass:javax/crypto/SecretKey
javax/crypto/SecretKeyFactory" is from the liquibase pro package, as you
can see in the stacktrace. But I do not understand that, because that
package is not part of the 4.9.1 liquibase-core.jar. It might be however
that we are not seeing that error because we do not use the Liquibase class.

2) The XSDLookUpException is because liquibase cannot find the xsd's
located in liquibase-core-4.9.1.jar\www.liquibase.org\xml\ns\dbchangelog,
it's a classLoader issue I guess.

3) The spifly startlevel seems to be important indeed. Since I lowered it's
startLevel in our own code, the exception did not occur anymore.

4) I don't know which approach you're supposed to use, sorry.

5) fyi, I'm using this to assert the exception. Maybe it's useful for you
as well ..

Stream lines = Files.lines(Paths.get("data/log/karaf.log"));
lines.forEach(l -> System.out.println(l));
Assert.assertFalse(lines.anyMatch(line -> line.contains("Exception")));

On Sat, Aug 13, 2022 at 12:02 PM Steinar Bang  wrote:

> > Steinar Bang :
>
> > Hm... I removed the liquibase-slf4j bundle from the feature.xml and then
> > I got a different karaf.log
> >  https://gist.github.com/steinarb/c04967029621509053f0b6c5903f5fcf
>
> The important stack trace here, is:
>
> https://gist.github.com/steinarb/fe342779dfe50b82345e9ac04718f17d#file-karaf-log-L433
>
> This is because of the way I'm using the Liquibase Java API and because
> the Liquibase.update() operation creates a new scope from the root
> scope, when there already is a scope, and that doesn't work.
>
> Possibly releated to this open liquibase issue...? (I googled the error
> message)
>  https://github.com/liquibase/liquibase/issues/2248
>
> My approach worked for liquibase 3.x, but I have to rethink what to do
> for liquibase 4.x (I don't feel like waiting until issue 2248 is fixed).
> Maybe look at Steven's pseudi code?
>
>


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

2022-08-13 Thread Steinar Bang
> Steinar Bang :

> Hm... I removed the liquibase-slf4j bundle from the feature.xml and then
> I got a different karaf.log
>  https://gist.github.com/steinarb/c04967029621509053f0b6c5903f5fcf

The important stack trace here, is:
 
https://gist.github.com/steinarb/fe342779dfe50b82345e9ac04718f17d#file-karaf-log-L433

This is because of the way I'm using the Liquibase Java API and because
the Liquibase.update() operation creates a new scope from the root
scope, when there already is a scope, and that doesn't work.

Possibly releated to this open liquibase issue...? (I googled the error message)
 https://github.com/liquibase/liquibase/issues/2248

My approach worked for liquibase 3.x, but I have to rethink what to do
for liquibase 4.x (I don't feel like waiting until issue 2248 is fixed).
Maybe look at Steven's pseudi code?