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

Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-6.5.1-all.zip'. #11310

Closed
cbeust opened this issue Aug 10, 2020 · 9 comments · Fixed by #11458
Assignees
Labels
area/gradle Gradle kind/bug Something isn't working
Milestone

Comments

@cbeust
Copy link

cbeust commented Aug 10, 2020

Describe the bug

./gradlew run

produced the following error

Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at io.quarkus.launcher.QuarkusLauncher.launch(QuarkusLauncher.java:52)
        at io.quarkus.runtime.Quarkus.launchFromIDE(Quarkus.java:93)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:79)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:106)
        at com.beust.cedlinks.MainKt.main(Main.kt:15)
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at io.quarkus.launcher.QuarkusLauncher.launch(QuarkusLauncher.java:49)
        ... 5 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-6.5.1-all.zip'.

Expected behavior

The application should start.

Actual behavior

The application doesn't start.

To Reproduce

Using Gradle 6.5.1 on Windows 10. Haven't uploaded this project to github yet but can do if necessary.

Configuration

# Add your application.properties here, if applicable.
quarkus.datasource.db-kind=h2
quarkus.datasource.username=sa
quarkus.datasource.password=password
quarkus.datasource.jdbc.url=jdbc:h2:mem:testdb

quarkus.http.port=8080

Environment (please complete the following information):

Windows 10

$ java -version
java version "14.0.2" 2020-07-14
Java(TM) SE Runtime Environment (build 14.0.2+12-46)
Java HotSpot(TM) 64-Bit Server VM (build 14.0.2+12-46, mixed mode, sharing)
$ ./gradlew --version

------------------------------------------------------------
Gradle 6.5.1
------------------------------------------------------------

Build time:   2020-06-30 06:32:47 UTC
Revision:     66bc713f7169626a7f0134bf452abde51550ea0a

Kotlin:       1.3.72
Groovy:       2.5.11
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          14.0.2 (Oracle Corporation 14.0.2+12-46)
OS:           Windows 10 10.0 amd64

Additional context

Full stack trace

59:51,043 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
13:59:51,043 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
13:59:51,044 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [io.micronaut.http] to DEBUG
13:59:51,044 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
13:59:51,045 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@65b3f4a4 - Registering current configuration as safe fallback point

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/Cedric/.gradle/caches/modules-2/files-2.1/org.jboss.slf4j/slf4j-jboss-logging/1.2.0.Final/bff294c02b64ad6bf8af6e6994e186dc035e0a47/slf4j-jboss-logging-1.2.0.Final.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Cedric/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.3/7c4f3c474fb2c041d8028740440937705ebb473a/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.jboss.slf4j.JBossLoggerFactory]
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at io.quarkus.launcher.QuarkusLauncher.launch(QuarkusLauncher.java:52)
        at io.quarkus.runtime.Quarkus.launchFromIDE(Quarkus.java:93)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:79)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:106)
        at com.beust.cedlinks.MainKt.main(Main.kt:15)
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at io.quarkus.launcher.QuarkusLauncher.launch(QuarkusLauncher.java:49)
        ... 5 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-6.5.1-all.zip'.
        at io.quarkus.bootstrap.IDELauncherImpl.launch(IDELauncherImpl.java:58)
        ... 10 more
Caused by: java.lang.RuntimeException: org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-6.5.1-all.zip'.
        at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:135)
        at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:85)
        at io.quarkus.bootstrap.IDELauncherImpl.launch(IDELauncherImpl.java:56)
        ... 10 more
Caused by: org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-6.5.1-all.zip'.
        at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:102)
        at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:45)
        at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:44)
        at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:147)
        at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:129)
        at org.gradle.tooling.internal.consumer.connection.CancellableConsumerActionExecutor.run(CancellableConsumerActionExecutor.java:45)
        at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:61)
        at org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)
        at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor.lambda$run$0(DefaultAsyncConsumerActionExecutor.java:62)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
        at java.base/java.lang.Thread.run(Thread.java:832)
        at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
        at org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.java:51)
        at io.quarkus.bootstrap.resolver.QuarkusGradleModelFactory.createForTasks(QuarkusGradleModelFactory.java:25)
        at io.quarkus.deployment.dev.IDEDevModeMain.accept(IDEDevModeMain.java:47)
        at io.quarkus.deployment.dev.IDEDevModeMain.accept(IDEDevModeMain.java:24)
        at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:132)
        ... 12 more
Caused by: java.lang.RuntimeException: Could not create an implementation of service 'org.gradle.tooling.internal.protocol.ConnectionVersion4'.
        at org.gradle.internal.service.DefaultServiceLocator$ServiceFactory.newInstance(DefaultServiceLocator.java:195)
        at org.gradle.internal.service.DefaultServiceLocator$ServiceFactory.create(DefaultServiceLocator.java:188)
        at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:82)
        at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:45)
        at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:44)
        at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:147)
        at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:129)
        at org.gradle.tooling.internal.consumer.connection.CancellableConsumerActionExecutor.run(CancellableConsumerActionExecutor.java:45)
        at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:61)
        at org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)
        at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor.lambda$run$0(DefaultAsyncConsumerActionExecutor.java:62)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
        at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: org.gradle.api.reflect.ObjectInstantiationException: Could not create an instance of type org.gradle.tooling.internal.provider.DefaultConnection.
        at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:66)
        at org.gradle.internal.reflect.DirectInstantiator.instantiate(DirectInstantiator.java:45)
        at org.gradle.internal.service.DefaultServiceLocator$ServiceFactory.newInstance(DefaultServiceLocator.java:193)
        ... 16 more
Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization for class org.gradle.tooling.internal.provider.DefaultConnection: when selecting method 'org.gradle.tooling.internal.protocol.ConnectionMetaDataVersion1 org.gradle.tooling.internal.protocol.ConnectionVersion4.getMetaData()' the class loader io.quarkus.launcher.QuarkusLauncher$IDEClassLoader @282003e1 for super interface org.gradle.tooling.internal.protocol.ConnectionVersion4, and the class loader org.gradle.internal.classloader.VisitableURLClassLoader @718d58e of the selected method's class, org.gradle.tooling.internal.provider.DefaultConnection have different Class objects for the type org.gradle.tooling.internal.protocol.ConnectionMetaDataVersion1 used in the signature (org.gradle.tooling.internal.protocol.ConnectionVersion4 is in unnamed module of loader io.quarkus.launcher.QuarkusLauncher$IDEClassLoader @282003e1, parent loader 'app'; org.gradle.tooling.internal.provider.DefaultConnection is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @718d58e, parent loader org.gradle.internal.classloader.FilteringClassLoader @412267b0)
        at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3215)
        at java.base/java.lang.Class.getConstructors(Class.java:1957)
        at org.gradle.internal.reflect.DirectInstantiator$ConstructorCache.create(DirectInstantiator.java:91)
        at org.gradle.internal.reflect.DirectInstantiator$ConstructorCache.create(DirectInstantiator.java:86)
        at org.gradle.internal.reflect.ReflectionCache$WeaklyClassReferencingCache.get(ReflectionCache.java:56)
        at org.gradle.internal.reflect.ReflectionCache.get(ReflectionCache.java:36)
        at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:60)
        ... 18 more

> Task :run FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Process 'command 'C:\Program Files\Java\jdk-14.0.2\bin\java.exe'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings
@cbeust cbeust added the kind/bug Something isn't working label Aug 10, 2020
@quarkusbot
Copy link

/cc @quarkusio/devtools, @glefloch

@quarkusbot quarkusbot added the area/gradle Gradle label Aug 10, 2020
@cbeust
Copy link
Author

cbeust commented Aug 11, 2020

Was hoping to do some clean up but since a few people have already asked me for details on Twitter, here is how to reproduce. Apologies for the poor shape of the code, but it's transitioning from Micronaut to Quarkus so it still kind of a hybrid (although I've commented out everything Micronaut related):

I have seen the exact same behavior on two different Windows machines, hopefully you can see this as well pretty quickly.

@glefloch
Copy link
Member

glefloch commented Aug 11, 2020

Thanks for reporting this one. Is it working when running the quarkusDev task ?

@aloubyansky
Copy link
Member

quarkusDev starts w/o errors.

@cbeust
Copy link
Author

cbeust commented Aug 11, 2020

Indeed, quarkusDev stars with no errors.

@Imaclean74
Copy link

FYI - I get the same behavior with gradle 6. Repro on win 10, jdk-14.0.1.7, with basically the template project created on quarkus.io.

Full stack trace

Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at io.quarkus.launcher.QuarkusLauncher.launch(QuarkusLauncher.java:52)
        at io.quarkus.runtime.Quarkus.launchFromIDE(Quarkus.java:93)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:79)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
        at org.maclei.JavaMain.main(JavaMain.java:11)
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at io.quarkus.launcher.QuarkusLauncher.launch(QuarkusLauncher.java:49)
        ... 4 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-6.6-bin.zip'.
        at io.quarkus.bootstrap.IDELauncherImpl.launch(IDELauncherImpl.java:58)
        ... 9 more
Caused by: java.lang.RuntimeException: org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-6.6-bin.zip'.
        at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:135)
        at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:85)
        at io.quarkus.bootstrap.IDELauncherImpl.launch(IDELauncherImpl.java:56)
        ... 9 more
Caused by: org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-6.6-bin.zip'.
        at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:102)       
        at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:45)        
        at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:44)
        at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:147)
        at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:129)
        at org.gradle.tooling.internal.consumer.connection.CancellableConsumerActionExecutor.run(CancellableConsumerActionExecutor.java:45)
        at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:61) 
        at org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)
        at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor.lambda$run$0(DefaultAsyncConsumerActionExecutor.java:62)   
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
        at java.base/java.lang.Thread.run(Thread.java:832)
        at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
        at org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.java:51)
        at io.quarkus.bootstrap.resolver.QuarkusGradleModelFactory.createForTasks(QuarkusGradleModelFactory.java:25)
        at io.quarkus.deployment.dev.IDEDevModeMain.accept(IDEDevModeMain.java:47)
        at io.quarkus.deployment.dev.IDEDevModeMain.accept(IDEDevModeMain.java:24)
        at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:132)
        ... 11 more
Caused by: java.lang.RuntimeException: Could not create an implementation of service 'org.gradle.tooling.internal.protocol.ConnectionVersion4'.     
        at org.gradle.internal.service.DefaultServiceLocator$ServiceFactory.newInstance(DefaultServiceLocator.java:195)
        at org.gradle.internal.service.DefaultServiceLocator$ServiceFactory.create(DefaultServiceLocator.java:188)
        at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:82)        
        at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:45)        
        at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:44)
        at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:147)
        at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:129)
        at org.gradle.tooling.internal.consumer.connection.CancellableConsumerActionExecutor.run(CancellableConsumerActionExecutor.java:45)
        at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:61) 
        at org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)
        at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor.lambda$run$0(DefaultAsyncConsumerActionExecutor.java:62)   
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
        at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: org.gradle.api.reflect.ObjectInstantiationException: Could not create an instance of type org.gradle.tooling.internal.provider.DefaultConnection.
        at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:66)
        at org.gradle.internal.reflect.DirectInstantiator.instantiate(DirectInstantiator.java:45)
        at org.gradle.internal.service.DefaultServiceLocator$ServiceFactory.newInstance(DefaultServiceLocator.java:193)
        ... 16 more
Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization for class org.gradle.tooling.internal.provider.DefaultConnection: when selecting method 'org.gradle.tooling.internal.protocol.ConnectionMetaDataVersion1 org.gradle.tooling.internal.protocol.ConnectionVersion4.getMetaData()' the class loader io.quarkus.launcher.QuarkusLauncher$IDEClassLoader @2ac273d3 for super interface org.gradle.tooling.internal.protocol.ConnectionVersion4, and the class loader org.gradle.internal.classloader.VisitableURLClassLoader @642b9143 of the selected method's class, org.gradle.tooling.internal.provider.DefaultConnection have different Class objects for the type org.gradle.tooling.internal.protocol.ConnectionMetaDataVersion1 used in the signature (org.gradle.tooling.internal.protocol.ConnectionVersion4 is in unnamed module of loader io.quarkus.launcher.QuarkusLauncher$IDEClassLoader @2ac273d3, parent loader 'app'; org.gradle.tooling.internal.provider.DefaultConnection is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @642b9143, parent loader org.gradle.internal.classloader.FilteringClassLoader @404257b9)    
        at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3215)
        at java.base/java.lang.Class.getConstructors(Class.java:1957)
        at org.gradle.internal.reflect.DirectInstantiator$ConstructorCache.create(DirectInstantiator.java:91)
        at org.gradle.internal.reflect.DirectInstantiator$ConstructorCache.create(DirectInstantiator.java:86)
        at org.gradle.internal.reflect.ReflectionCache$WeaklyClassReferencingCache.get(ReflectionCache.java:56)
        at org.gradle.internal.reflect.ReflectionCache.get(ReflectionCache.java:36)
        at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:60)

@glefloch
Copy link
Member

@Imaclean74 are you using the ./gradlew run command or ./gradlew quarkusDev ?

@vu-bui
Copy link

vu-bui commented Aug 24, 2020

Is there any way that we can support Gradle Kotlin DSL build.gradle.kts as well? I see the enum io.quarkus.bootstrap.utils.BuildToolHelper.BuildTool#GRADLE is set to build.gradle only.

@glefloch
Copy link
Member

@vu-bui, you right. I forgot about this one. I will add the build.gradle.kts in the enum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gradle Gradle kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants