Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
aureamunoz opened this issue Mar 24, 2021 · 0 comments
Assignees
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository

Comments

@aureamunoz
Copy link

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.


quarkusio#15953


$upstream:15953$

@snowdrop-bot snowdrop-bot added the upstream/closed The issue has been closed in the upstream repository label May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository
Projects
None yet
Development

No branches or pull requests

3 participants