Cannot find default log service when using Ant Task

Hi:
I am getting this exception:
liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.UnexpectedLiquibaseException: Cannot find default log service
at liquibase.serializer.ChangeLogSerializerFactory.(ChangeLogSerializerFactory.java:33)
at liquibase.serializer.ChangeLogSerializerFactory.getInstance(ChangeLogSerializerFactory.java:21)
at liquibase.integration.ant.GenerateChangeLogTask.addConfiguredXml(GenerateChangeLogTask.java:107)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.apache.tools.ant.IntrospectionHelper$AddNestedCreator.istore(IntrospectionHelper.java:1459)
at org.apache.tools.ant.IntrospectionHelper$AddNestedCreator.store(IntrospectionHelper.java:1453)
at org.apache.tools.ant.IntrospectionHelper$Creator.store(IntrospectionHelper.java:1358)
at org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:590)
at org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:357)
at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:206)
at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:165)
at org.apache.tools.ant.Task.perform(Task.java:349)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1391)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1254)
at org.apache.tools.ant.Main.runBuild(Main.java:830)
at org.apache.tools.ant.Main.startAnt(Main.java:223)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
Caused by: liquibase.exception.UnexpectedLiquibaseException: Cannot find default log service
at liquibase.Scope.getCurrentScope(Scope.java:71)
at liquibase.serializer.ChangeLogSerializerFactory.(ChangeLogSerializerFactory.java:29)
… 24 more
And build.xml fragment is as follows:



<liquibase:generateChangeLog classpathref=“ivy.retrieved.path”>
<liquibase:database driver="{db.driver}" url="{urlProtocol}:{urlSubprotocol}://{db.host}:{db.port}/{db.name}?{db.extra}" user="{db.user}" password="{db.password}"/> <liquibase:xml outputfile="{working.dir}/changelog.xml" encoding=“UTF-8”/>
</liquibase:generateChangeLog>

Hi @cp_enigmadata ,

What version of Liquibase are you using? Does liquibase work by itself on the commandline? Have you tried defining a logfile and see if that works?

Im having the same issue and not getting around it with a logging file.

i have same issue , is there any workaround for this plz.

I’m having the same issue - did anyone ever resolve this?