question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression issue: Exception when using OpenShift/Kubernetes extensions and having an external Ansi dependency

See original GitHub issue

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:

  1. 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" 
  1. 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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
geoandcommented, May 12, 2021

@iocanel are you planning on opening the PR to bump dekorate?

0reactions
geoandcommented, May 12, 2021

Cool!

In the future, it would be great to record such outcomes on the issue for posterity 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change log for 4.10.43
... Bug 2095114: cluster-backup.sh script has a conflict to use the '/etc/kubernetes/static-pod-certs' folder if a custom API certificate is ...
Read more >
quarkusio/quarkus 2.0.0.Alpha3 on GitHub - NewReleases.io
... Create a MongoDB test extension; #15953 - Regression issue: Exception when using OpenShift/Kubernetes extensions and having an external Ansi dependency ...
Read more >
Latest Posts | “Learn From Others Experience"
This is most common exception when connecting with database ... To use Couchbase in your Spring boot application you have to add this ......
Read more >
origin-1.4.0-1.el7 | Build Info - CentOS Community Build Service
(smitram@gmail.com) - Fix an issue with route ordering: it was ... Limit Range (mturansk@redhat.com) - Remove dependence on external mysql ...
Read more >
How to Run Java Microservices on OpenShift Using Source-2 ...
With Source-2-Image (S2I), you don't have to provide Kubernetes YAML templates or build Docker images, OpenShift will do it for you.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found