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

Need to import org.fusesource.jansi:jansi to compile successfully in idea #332

Open
cdmikechen opened this issue May 5, 2022 · 6 comments

Comments

@cdmikechen
Copy link

I have updated quarkus to 2.8.2 and operator to 4.0.0.Beta and I have found that I need to import org.fusesource.jansi:jansi to compile successfully in idea

    <dependency>
      <groupId>org.fusesource.jansi</groupId>
      <artifactId>jansi</artifactId>
      <version>1.18</version>
      <scope>compile</scope>
    </dependency>

error:

java: compiler message file broken: key=compiler.misc.msg.bug arguments=11.0.14, {1}, {2}, {3}, {4}, {5}, {6}, {7}
java: java.util.ServiceConfigurationError: javax.annotation.processing.Processor: Provider io.dekorate.apt.DekorateProcessor could not be instantiated
java: 	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:582)
java: 	at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:804)
java: 	at java.base/java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:722)
java: 	at java.base/java.util.ServiceLoader$3.next(ServiceLoader.java:1395)
java: 	at org.jetbrains.jps.javac.Iterators$10.next(Iterators.java:212)
java: 	at jdk.compiler/com.sun.tools.javac.util.Iterators$CompoundIterator.next(Iterators.java:69)
java: 	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:789)
java: 	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:886)
java: 	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1227)
java: 	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1340)
java: 	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1258)
java: 	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:936)
java: 	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
java: 	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:147)
java: 	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
java: 	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
java: 	at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:238)
java: 	at org.jetbrains.jps.incremental.java.JavaBuilder.lambda$compileJava$2(JavaBuilder.java:514)
java: 	at org.jetbrains.jps.incremental.java.JavaBuilder.invokeJavac(JavaBuilder.java:560)
java: 	at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:512)
java: 	at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:355)
java: 	at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:280)
java: 	at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:234)
java: 	at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1485)
java: 	at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:1123)
java: 	at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1268)
java: 	at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:1088)
java: 	at org.jetbrains.jps.incremental.IncProjectBuilder.access$1200(IncProjectBuilder.java:69)
java: 	at org.jetbrains.jps.incremental.IncProjectBuilder$BuildParallelizer$1.run(IncProjectBuilder.java:1028)
java: 	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
java: 	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
java: 	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
java: 	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:213)
java: 	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:184)
java: 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
java: 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java: 	at java.base/java.lang.Thread.run(Thread.java:829)
java: Caused by: java.lang.NoClassDefFoundError: org/fusesource/jansi/AnsiConsole
java: 	at io.dekorate.logger.AnsiLogger.<init>(AnsiLogger.java:42)
java: 	at io.dekorate.LoggerFactory.getLogger(LoggerFactory.java:49)
java: 	at io.dekorate.apt.DekorateProcessor.<init>(DekorateProcessor.java:44)
java: 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
java: 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
java: 	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java: 	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
java: 	at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:780)
java: 	... 35 more
java: Caused by: java.lang.ClassNotFoundException: org.fusesource.jansi.AnsiConsole
java: 	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
java: 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
java: 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
java: 	... 43 more
@metacosm
Copy link
Member

metacosm commented May 5, 2022

Do you have a way to replicate the issue?

@cdmikechen
Copy link
Author

cdmikechen commented May 5, 2022

@metacosm
I just use quarkus start coding in https://code.quarkus.io/ and I import Quarkus - Operator SDK.
This is my java version:

openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment GraalVM CE 22.0.0.2 (build 11.0.14+9-jvmci-22.0-b05)
OpenJDK 64-Bit Server VM GraalVM CE 22.0.0.2 (build 11.0.14+9-jvmci-22.0-b05, mixed mode, sharing)

And I find that If I don't add code files, it will build successfully..

@metacosm
Copy link
Member

Does it still happen with Quarkus 2.9.0?

@cdmikechen
Copy link
Author

@metacosm
I haven't had time to deal with it in recent days. I'm sorry. I will update the version this weekend and test the latest 2.9.1 to see if there are any problems.

@cdmikechen
Copy link
Author

@metacosm
Hi~
It still has the same problem. I think there may be a bug in my intellij idea version. There is no problem when letting my friend test on his intellij idea (win platform and version is older than me).

@metacosm
Copy link
Member

Weird. Let us know if you figure something out…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants