Failed to copy resources: java.nio.file.NoSuchFileException - quarkus

I'm trying to compile and run my Quarkus servlet application. But it keeps getting the following error with quarkus-maven-plugin 0.24.0 and 0.25.0. But it works fine with quarkus-maven-plugin 0.23.2
ERROR [io.qua.dev] (vert.x-worker-thread-0) Failed to copy resources: java.nio.file.NoSuchFileException: D:\quarkus-sample\rest\target\classes\myproperties.properties
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)
at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
at java.nio.file.Files.delete(Files.java:1126)
at io.quarkus.dev.RuntimeUpdatesProcessor.checkForFileChange(RuntimeUpdatesProcessor.java:332)
at io.quarkus.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:121)
at io.quarkus.vertx.http.deployment.devmode.VertxHotReplacementSetup$1.handle(VertxHotReplacementSetup.java:52)
at io.quarkus.vertx.http.deployment.devmode.VertxHotReplacementSetup$1.handle(VertxHotReplacementSetup.java:44)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)

If it worked with a previous version, there's a good chance it's a bug.
Could you create a GitHub issue in our tracker and provide a reproducer (simple Quarkus app reproducing the issue) and the steps to reproduce it?

This was fixed by Quarkus release 0.26.0.
Related git hub issue can be found in https://github.com/quarkusio/quarkus/issues/4697

Related

java.lang.NoClassDefFoundError in firebase admin

I have log4j in spring boot project which uses firebase admin
Randomly firebase admin threw this error even if it is not in use.
Exception in thread "firebase-database-worker" java.lang.NoClassDefFoundError: ch/qos/logback/classic/spi/ThrowableProxy
at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:119)
at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
at ch.qos.logback.classic.Logger.error(Logger.java:538)
at com.google.firebase.database.core.JvmPlatform$1.handleException(JvmPlatform.java:57)
at com.google.firebase.database.utilities.DefaultRunLoop.handleExceptionInternal(DefaultRunLoop.java:102)
at com.google.firebase.database.utilities.DefaultRunLoop.access$000(DefaultRunLoop.java:34)
at com.google.firebase.database.utilities.DefaultRunLoop$1.afterExecute(DefaultRunLoop.java:65)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2022-08-13 22:27:22,729 INFO [http-nio-9658-exec-190]
It seems like it needs a different log library, and when I tried to install ch/qos
The project won't work. unless I removed it from the pom.xml
Does anyone have a solution?
i don't want to change my log library as I can't replace firebase now

vertex jar not found exception even after the jar is present

org.vertx.java.platform.PlatformManagerException: Module io.vertx~lang-groovy~2.0.0-final not found in any repositories
at org.vertx.java.platform.impl.DefaultPlatformManager.getModule(DefaultPlatformManager.java:985)
at org.vertx.java.platform.impl.DefaultPlatformManager.doInstallMod(DefaultPlatformManager.java:974)
at org.vertx.java.platform.impl.DefaultPlatformManager.loadIncludedModules(DefaultPlatformManager.java:858)
at org.vertx.java.platform.impl.DefaultPlatformManager.doDeploy(DefaultPlatformManager.java:1219)
at org.vertx.java.platform.impl.DefaultPlatformManager.deployModuleFromModJson(DefaultPlatformManager.java:742)
at org.vertx.java.platform.impl.DefaultPlatformManager.deployModuleFromFileSystem(DefaultPlatformManager.java:812)
at org.vertx.java.platform.impl.DefaultPlatformManager.access$100(DefaultPlatformManager.java:55)
at org.vertx.java.platform.impl.DefaultPlatformManager$1.run(DefaultPlatformManager.java:151)
at org.vertx.java.platform.impl.DefaultPlatformManager$11.run(DefaultPlatformManager.java:359)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
The issue was io.vertx~lang-groovy~2.0.0-final folder was missing after compiling of project.
It was missing because the vertx was not able to fetch the jar from maven as maven has stopped support to http from january 15 2020.

Spring Initializr pane is blank in IntellJ, for both New Project and New Module

In Intellij, the Spring initializr option is available, but the pane where the options for adding dependencies reside is blank. I tried upgrading my IDE to no avail. This is true when either creating a new project or a new module. This was not an issue until my work issued me a PowerMac (was on Windows before).
When I try to access Initializr, idea.log shows the following stacktrace:
2019-02-12 13:52:16,116 [7322253] ERROR - plication.impl.ApplicationImpl - java.lang.NullPointerException
java.lang.RuntimeException: java.lang.NullPointerException
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1488)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3018)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:489)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
at com.intellij.util.io.HttpRequests.openConnection(HttpRequests.java:609)
at com.intellij.util.io.HttpRequests.access$300(HttpRequests.java:59)
at com.intellij.util.io.HttpRequests$RequestImpl.getConnection(HttpRequests.java:378)
at com.intellij.util.io.HttpRequests$RequestImpl.getInputStream(HttpRequests.java:387)
at com.intellij.util.io.HttpRequests$RequestImpl.getReader(HttpRequests.java:405)
at com.intellij.spring.boot.initializr.SpringInitializrOptionsLoader$1.process(SpringInitializrOptionsLoader.java:104)
at com.intellij.spring.boot.initializr.SpringInitializrOptionsLoader$1.process(SpringInitializrOptionsLoader.java:97)
at com.intellij.util.io.HttpRequests.doProcess(HttpRequests.java:523)
at com.intellij.util.io.HttpRequests.process(HttpRequests.java:499)
at com.intellij.util.io.HttpRequests.access$100(HttpRequests.java:59)
at com.intellij.util.io.HttpRequests$RequestBuilderImpl.connect(HttpRequests.java:352)
at com.intellij.spring.boot.initializr.SpringInitializrOptionsLoader.loadOptions(SpringInitializrOptionsLoader.java:97)
at com.intellij.spring.boot.initializr.SpringInitializrApplicationInfoStep.lambda$loadSpringInitializrOptions$3(SpringInitializrApplicationInfoStep.java:151)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.sun.security.ntlm.Client.type3(Client.java:161)
at sun.net.www.protocol.http.ntlm.NTLMAuthentication.buildType3Msg(NTLMAuthentication.java:241)
at sun.net.www.protocol.http.ntlm.NTLMAuthentication.setHeaders(NTLMAuthentication.java:216)
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2096)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
... 20 more
How can I fix this?
It looks like a Java bug specific to your NTLM proxy.
It may help if you use IntelliJ IDEA 2019.1 EAP version with JetBrains Runtime 11 version where this issue should be fixed.

org.gradle.tooling.GradleConnectionException: Could not fetch model of type 'BuildEnvironment'

I am running netbeans with lates version of Gradle on windows and anytime I try to select an old project from the gradle tasks panel I get the following error:
Requested project: D:\ian\libGDX\MarioBros
Stack trace:
org.gradle.tooling.GradleConnectionException: Could not fetch model of type 'BuildEnvironment' using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.10-all.zip'.
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:55)
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:29)
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:41)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
at org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.java:50)
at org.netbeans.gradle.project.model.DefaultGradleModelLoader.loadModelWithProgress(DefaultGradleModelLoader.java:551)
at org.netbeans.gradle.project.model.DefaultGradleModelLoader.access$1600(DefaultGradleModelLoader.java:64)
at org.netbeans.gradle.project.model.DefaultGradleModelLoader$6.run(DefaultGradleModelLoader.java:419)
at org.netbeans.gradle.project.tasks.GradleDaemonManager.runNonBlockingGradleTask(GradleDaemonManager.java:35)
at org.netbeans.gradle.project.tasks.GradleDaemonManager.access$100(GradleDaemonManager.java:22)
at org.netbeans.gradle.project.tasks.GradleDaemonManager$2.execute(GradleDaemonManager.java:125)
at org.jtrim.concurrent.AbstractTaskExecutorService$FunctionWrapper.execute(AbstractTaskExecutorService.java:270)
at org.jtrim.concurrent.AbstractTaskExecutorService$TaskOfAbstractExecutor.execute(AbstractTaskExecutorService.java:340)
at org.jtrim.concurrent.Tasks$RunOnceCancelableTask.execute(Tasks.java:342)
at org.jtrim.concurrent.SingleThreadedExecutor$QueuedItem.runTask(SingleThreadedExecutor.java:919)
at org.jtrim.concurrent.SingleThreadedExecutor$QueuedItem.access$1200(SingleThreadedExecutor.java:898)
at org.jtrim.concurrent.SingleThreadedExecutor$Impl$Worker.executeTask(SingleThreadedExecutor.java:815)
at org.jtrim.concurrent.SingleThreadedExecutor$Impl$Worker.processQueue(SingleThreadedExecutor.java:827)
at org.jtrim.concurrent.SingleThreadedExecutor$Impl$Worker.run(SingleThreadedExecutor.java:861)
at org.jtrim.concurrent.SingleThreadedExecutor$Impl$1.run(SingleThreadedExecutor.java:453)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.gradle.api.GradleException: Java home supplied via 'org.gradle.java.home' is invalid. Invalid directory: C:\Program Files\Java\jdk1.8.0_92
at org.gradle.launcher.cli.converter.PropertiesToDaemonParametersConverter.convert(PropertiesToDaemonParametersConverter.java:51)
at org.gradle.tooling.internal.provider.ProviderConnection.initParams(ProviderConnection.java:172)
at org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.java:91)
at org.gradle.tooling.internal.provider.DefaultConnection.getModel(DefaultConnection.java:168)
at org.gradle.tooling.internal.consumer.connection.CancellableModelBuilderBackedModelProducer.produceModel(CancellableModelBuilderBackedModelProducer.java:53)
at org.gradle.tooling.internal.consumer.connection.PluginClasspathInjectionSupportedCheckModelProducer.produceModel(PluginClasspathInjectionSupportedCheckModelProducer.java:41)
at org.gradle.tooling.internal.consumer.connection.AbstractConsumerConnection.run(AbstractConsumerConnection.java:58)
at org.gradle.tooling.internal.consumer.connection.ParameterValidatingConsumerConnection.run(ParameterValidatingConsumerConnection.java:46)
at org.gradle.tooling.internal.consumer.DefaultModelBuilder$1.run(DefaultModelBuilder.java:60)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:84)
at org.gradle.tooling.internal.consumer.connection.CancellableConsumerActionExecutor.run(CancellableConsumerActionExecutor.java:45)
at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:58)
at org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:55)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
... 1 more
Has anyone else run into this error? And How to fix the problem?
Actually the issue is described here already
Caused by: org.gradle.api.GradleException: Java home supplied via 'org.gradle.java.home' is invalid. Invalid directory: C:\Program Files\Java\jdk1.8.0_92
If you go to your gradle.properties configuration file, you will get the following
org.gradle.java.home=C:\Program Files\Java\jdk1.8.0_92
You can remove it or give the original JAVA_HOME location. Hope it will solve your issue.
N.B: If your path is OK, then use double backslashes "\" like above in your path.
Wrong jdk version in %userprofile%\.gradle\gradle.properties caused the issue in my case. Another option to try is hardcode the java home path directly in gradle_dir/bin/gradle.bat like so:
set JAVA_HOME="c:\Program Files\Java\jdk1.8.0_251"
This is probably an proxy issue, try creating %userprofile%\.gradle\gradle.properties or ~/.gradle/gradle.properties containing the following :
systemProp.http.proxyHost=[host]
systemProp.http.proxyPort=[port]
systemProp.http.proxyUser=[user]
systemProp.http.proxyPassword=[pass]
systemProp.https.proxyHost=
systemProp.https.proxyPort=
systemProp.https.proxyUser=
systemProp.https.proxyPassword=
systemProp.http.nonProxyHosts=localhost|orther.domain.tld

Unable to find data for class 'org/springframework/boot/context/web/SpringBootServletInitializer'

I am getting this strange error while trying to start Spring Boot application in Servlet container.
The same WAR starts normally in standalone Tomcat server, but gives the error seen below if started using Gretty Gradle plugin
Any ideas that it means?
Spring-boot 1.3.3, Gradle 2.12, Gretty 1.2.4, Tomcat 8
java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:104)
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
...
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:305)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5066)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springsource.loaded.UnableToLoadClassException: Unable to find data for class 'org/springframework/boot/context/web/SpringBootServletInitializer'
at org.springsource.loaded.Utils.loadSlashedClassAsBytes(Utils.java:787)
at org.springsource.loaded.TypeRegistry.getDescriptorFor(TypeRegistry.java:311)
at org.springsource.loaded.TypeDescriptorExtractor$ExtractionVisitor.getTypeDescriptorFor(TypeDescriptorExtractor.java:124)
at org.springsource.loaded.TypeDescriptorExtractor$ExtractionVisitor.findTypeDescriptor(TypeDescriptorExtractor.java:140)
at org.springsource.loaded.TypeDescriptorExtractor$ExtractionVisitor.walkHierarchyForCatchersAndSuperDispatchers(TypeDescriptorExtractor.java:152)
at org.springsource.loaded.TypeDescriptorExtractor$ExtractionVisitor.computeCatchersAndSuperdispatchers(TypeDescriptorExtractor.java:219)
at org.springsource.loaded.TypeDescriptorExtractor$ExtractionVisitor.getTypeDescriptor(TypeDescriptorExtractor.java:81)
at org.sprce.loaded.TypeDescriptorExtractor.extract(TypeDescriptorExtractor.java:51)
at org.springsource.loaded.TypeRegistry.addType(TypeRegistry.java:912)
at org.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:302)
at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:102)
... 42 more
Apparently there is a bug in Gretty related to classloading.
Starting Gretty with WAR e.g. gradlew appRunWar allows to work around it.
There are multiple bugs opened for it:
https://github.com/akhikhl/gretty/issues/199
https://github.com/akhikhl/gretty/issues/209
https://github.com/akhikhl/gretty/issues/148

Resources