quarkus: Regression issue: Exception when using OpenShift/Kubernetes extensions and having an external Ansi dependency
Describe the bug
We are getting an exception when using the OpenShift/Kubernetes extensions and having a third party dependency like:
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<version>2.3.2</version>
</dependency>
When we build our application, it fails with:
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project openshift-quickstart: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.kubernetes.deployment.KubernetesProcessor#build threw an exception: java.lang.IllegalStateException: AnsiLogger requires a PrintStream instance.
[ERROR] at io.dekorate.logger.AnsiLogger.check(AnsiLogger.java:82)
[ERROR] at io.dekorate.logger.AnsiLogger.info(AnsiLogger.java:59)
[ERROR] at io.dekorate.processor.SimpleFileReader.read(SimpleFileReader.java:51)
[ERROR] at io.dekorate.Session.lambda$readExistingResources$6(Session.java:291)
[ERROR] at java.base/java.util.Optional.ifPresent(Optional.java:183)
[ERROR] at io.dekorate.Session.readExistingResources(Session.java:291)
[ERROR] at io.dekorate.Session.generate(Session.java:281)
[ERROR] at io.dekorate.Session.close(Session.java:248)
[ERROR] at io.quarkus.kubernetes.deployment.KubernetesProcessor.lambda$build$4(KubernetesProcessor.java:168)
[ERROR] at java.base/java.util.Optional.ifPresent(Optional.java:183)
[ERROR] at io.quarkus.kubernetes.deployment.KubernetesProcessor.build(KubernetesProcessor.java:122)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)
This is a regression issue caused by this change.
Expected behavior
The application should work as before this change.
To Reproduce
Steps to reproduce the behavior:
- Create a Quarkus application using:
mvn io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:create -DprojectGroupId=org.acme -DprojectArtifactId=openshift-quickstart -DclassName="org.acme.rest.GreetingResource" -Dpath="/greeting"
- Add an ansi dependency like:
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<version>2.3.2</version>
</dependency>
Additional context
The issue is that the AnsiLogger gets used instead of NoopLogger. But AnsiLogger is not initialized.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (16 by maintainers)
@iocanel are you planning on opening the PR to bump dekorate?