Could not create an instance of Tooling API implementation using the specified Gradle installation for Spring...












1















I have created a Spring Boot project from https://start.spring.io/ using gradle.



Now when I try to import the project in Spring Tool Suite Version: 3.9.6.RELEASE, I am getting the error as



org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle installation '/usr/share/gradle'.
at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:95)
at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:44)
at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:43)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:101)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:83)
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.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
at org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.java:50)
at org.gradle.tooling.internal.consumer.DefaultProjectConnection.getModel(DefaultProjectConnection.java:41)
at org.eclipse.buildship.core.internal.IdeAttachedProjectConnection.configureOperation(IdeAttachedProjectConnection.java:64)
at org.eclipse.buildship.core.internal.IdeAttachedProjectConnection.model(IdeAttachedProjectConnection.java:55)
at org.eclipse.buildship.core.internal.IdeAttachedProjectConnection.getModel(IdeAttachedProjectConnection.java:82)
at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider$1.lambda$call$0(DefaultModelProvider.java:88)
at org.eclipse.buildship.core.internal.DefaultGradleBuild$GradleConnectionOperation.runInToolingApi(DefaultGradleBuild.java:312)
at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager$WorkspaceRunnableAdapter.run(DefaultToolingApiOperationManager.java:57)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2319)
at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:38)
at org.eclipse.buildship.core.internal.DefaultGradleBuild.withConnection(DefaultGradleBuild.java:112)
at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider$1.call(DefaultModelProvider.java:88)
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:5065)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211)
at com.google.common.cache.LocalCache.get(LocalCache.java:4154)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:5060)
at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.getFromCache(DefaultModelProvider.java:123)
at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.executeOperation(DefaultModelProvider.java:115)
at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.executeModelQuery(DefaultModelProvider.java:84)
at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.fetchModel(DefaultModelProvider.java:49)
at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage.fetchBuildEnvironment(ProjectPreviewWizardPage.java:453)
at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage.access$600(ProjectPreviewWizardPage.java:80)
at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage$UpdatePreviewOperation.runInToolingApi(ProjectPreviewWizardPage.java:478)
at org.eclipse.buildship.core.internal.operation.ToolingApiOperations$1.runInToolingApi(ToolingApiOperations.java:59)
at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager$WorkspaceRunnableAdapter.run(DefaultToolingApiOperationManager.java:57)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2319)
at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:38)
at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:32)
at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage$4.run(ProjectPreviewWizardPage.java:313)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
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:182)
at org.gradle.internal.service.DefaultServiceLocator$ServiceFactory.create(DefaultServiceLocator.java:175)
at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:78)
at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:44)
at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:43)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:101)
at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:83)
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.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.base/java.lang.Thread.run(Thread.java:834)
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:55)
at org.gradle.internal.reflect.DirectInstantiator.instantiate(DirectInstantiator.java:35)
at org.gradle.internal.service.DefaultServiceLocator$ServiceFactory.newInstance(DefaultServiceLocator.java:180)
... 16 more
Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.gradle.tooling.internal.provider.DefaultConnection.<clinit>(DefaultConnection.java:73)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:51)
... 18 more
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 24 more


Gradle version I am using is



------------------------------------------------------------
Gradle 4.4.1
------------------------------------------------------------

Build time: 2012-12-21 00:00:00 UTC
Revision: none

Groovy: 2.4.15
Ant: Apache Ant(TM) version 1.10.5 compiled on August 27 2018
JVM: 11.0.1 (Oracle Corporation 11.0.1+13-Ubuntu-2ubuntu1)
OS: Linux 4.18.0-13-generic amd64


I am using Buildship Gradle Integration 3.0 STS plugin.
Is it some version issue or what wrong I am doing?










share|improve this question



























    1















    I have created a Spring Boot project from https://start.spring.io/ using gradle.



    Now when I try to import the project in Spring Tool Suite Version: 3.9.6.RELEASE, I am getting the error as



    org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle installation '/usr/share/gradle'.
    at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:95)
    at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:44)
    at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:43)
    at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:101)
    at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:83)
    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.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    at java.base/java.lang.Thread.run(Thread.java:834)
    at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
    at org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.java:50)
    at org.gradle.tooling.internal.consumer.DefaultProjectConnection.getModel(DefaultProjectConnection.java:41)
    at org.eclipse.buildship.core.internal.IdeAttachedProjectConnection.configureOperation(IdeAttachedProjectConnection.java:64)
    at org.eclipse.buildship.core.internal.IdeAttachedProjectConnection.model(IdeAttachedProjectConnection.java:55)
    at org.eclipse.buildship.core.internal.IdeAttachedProjectConnection.getModel(IdeAttachedProjectConnection.java:82)
    at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider$1.lambda$call$0(DefaultModelProvider.java:88)
    at org.eclipse.buildship.core.internal.DefaultGradleBuild$GradleConnectionOperation.runInToolingApi(DefaultGradleBuild.java:312)
    at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager$WorkspaceRunnableAdapter.run(DefaultToolingApiOperationManager.java:57)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2319)
    at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:38)
    at org.eclipse.buildship.core.internal.DefaultGradleBuild.withConnection(DefaultGradleBuild.java:112)
    at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider$1.call(DefaultModelProvider.java:88)
    at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:5065)
    at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716)
    at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424)
    at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298)
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211)
    at com.google.common.cache.LocalCache.get(LocalCache.java:4154)
    at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:5060)
    at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.getFromCache(DefaultModelProvider.java:123)
    at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.executeOperation(DefaultModelProvider.java:115)
    at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.executeModelQuery(DefaultModelProvider.java:84)
    at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.fetchModel(DefaultModelProvider.java:49)
    at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage.fetchBuildEnvironment(ProjectPreviewWizardPage.java:453)
    at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage.access$600(ProjectPreviewWizardPage.java:80)
    at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage$UpdatePreviewOperation.runInToolingApi(ProjectPreviewWizardPage.java:478)
    at org.eclipse.buildship.core.internal.operation.ToolingApiOperations$1.runInToolingApi(ToolingApiOperations.java:59)
    at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager$WorkspaceRunnableAdapter.run(DefaultToolingApiOperationManager.java:57)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2319)
    at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:38)
    at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:32)
    at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage$4.run(ProjectPreviewWizardPage.java:313)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
    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:182)
    at org.gradle.internal.service.DefaultServiceLocator$ServiceFactory.create(DefaultServiceLocator.java:175)
    at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:78)
    at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:44)
    at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:43)
    at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:101)
    at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:83)
    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.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    at java.base/java.lang.Thread.run(Thread.java:834)
    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:55)
    at org.gradle.internal.reflect.DirectInstantiator.instantiate(DirectInstantiator.java:35)
    at org.gradle.internal.service.DefaultServiceLocator$ServiceFactory.newInstance(DefaultServiceLocator.java:180)
    ... 16 more
    Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
    at org.gradle.tooling.internal.provider.DefaultConnection.<clinit>(DefaultConnection.java:73)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:51)
    ... 18 more
    Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 24 more


    Gradle version I am using is



    ------------------------------------------------------------
    Gradle 4.4.1
    ------------------------------------------------------------

    Build time: 2012-12-21 00:00:00 UTC
    Revision: none

    Groovy: 2.4.15
    Ant: Apache Ant(TM) version 1.10.5 compiled on August 27 2018
    JVM: 11.0.1 (Oracle Corporation 11.0.1+13-Ubuntu-2ubuntu1)
    OS: Linux 4.18.0-13-generic amd64


    I am using Buildship Gradle Integration 3.0 STS plugin.
    Is it some version issue or what wrong I am doing?










    share|improve this question

























      1












      1








      1








      I have created a Spring Boot project from https://start.spring.io/ using gradle.



      Now when I try to import the project in Spring Tool Suite Version: 3.9.6.RELEASE, I am getting the error as



      org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle installation '/usr/share/gradle'.
      at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:95)
      at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:44)
      at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:43)
      at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:101)
      at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:83)
      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.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
      at java.base/java.lang.Thread.run(Thread.java:834)
      at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
      at org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.java:50)
      at org.gradle.tooling.internal.consumer.DefaultProjectConnection.getModel(DefaultProjectConnection.java:41)
      at org.eclipse.buildship.core.internal.IdeAttachedProjectConnection.configureOperation(IdeAttachedProjectConnection.java:64)
      at org.eclipse.buildship.core.internal.IdeAttachedProjectConnection.model(IdeAttachedProjectConnection.java:55)
      at org.eclipse.buildship.core.internal.IdeAttachedProjectConnection.getModel(IdeAttachedProjectConnection.java:82)
      at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider$1.lambda$call$0(DefaultModelProvider.java:88)
      at org.eclipse.buildship.core.internal.DefaultGradleBuild$GradleConnectionOperation.runInToolingApi(DefaultGradleBuild.java:312)
      at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager$WorkspaceRunnableAdapter.run(DefaultToolingApiOperationManager.java:57)
      at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
      at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2319)
      at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:38)
      at org.eclipse.buildship.core.internal.DefaultGradleBuild.withConnection(DefaultGradleBuild.java:112)
      at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider$1.call(DefaultModelProvider.java:88)
      at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:5065)
      at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716)
      at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424)
      at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298)
      at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211)
      at com.google.common.cache.LocalCache.get(LocalCache.java:4154)
      at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:5060)
      at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.getFromCache(DefaultModelProvider.java:123)
      at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.executeOperation(DefaultModelProvider.java:115)
      at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.executeModelQuery(DefaultModelProvider.java:84)
      at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.fetchModel(DefaultModelProvider.java:49)
      at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage.fetchBuildEnvironment(ProjectPreviewWizardPage.java:453)
      at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage.access$600(ProjectPreviewWizardPage.java:80)
      at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage$UpdatePreviewOperation.runInToolingApi(ProjectPreviewWizardPage.java:478)
      at org.eclipse.buildship.core.internal.operation.ToolingApiOperations$1.runInToolingApi(ToolingApiOperations.java:59)
      at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager$WorkspaceRunnableAdapter.run(DefaultToolingApiOperationManager.java:57)
      at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
      at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2319)
      at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:38)
      at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:32)
      at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage$4.run(ProjectPreviewWizardPage.java:313)
      at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
      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:182)
      at org.gradle.internal.service.DefaultServiceLocator$ServiceFactory.create(DefaultServiceLocator.java:175)
      at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:78)
      at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:44)
      at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:43)
      at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:101)
      at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:83)
      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.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
      at java.base/java.lang.Thread.run(Thread.java:834)
      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:55)
      at org.gradle.internal.reflect.DirectInstantiator.instantiate(DirectInstantiator.java:35)
      at org.gradle.internal.service.DefaultServiceLocator$ServiceFactory.newInstance(DefaultServiceLocator.java:180)
      ... 16 more
      Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
      at org.gradle.tooling.internal.provider.DefaultConnection.<clinit>(DefaultConnection.java:73)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
      at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:51)
      ... 18 more
      Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
      at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      ... 24 more


      Gradle version I am using is



      ------------------------------------------------------------
      Gradle 4.4.1
      ------------------------------------------------------------

      Build time: 2012-12-21 00:00:00 UTC
      Revision: none

      Groovy: 2.4.15
      Ant: Apache Ant(TM) version 1.10.5 compiled on August 27 2018
      JVM: 11.0.1 (Oracle Corporation 11.0.1+13-Ubuntu-2ubuntu1)
      OS: Linux 4.18.0-13-generic amd64


      I am using Buildship Gradle Integration 3.0 STS plugin.
      Is it some version issue or what wrong I am doing?










      share|improve this question














      I have created a Spring Boot project from https://start.spring.io/ using gradle.



      Now when I try to import the project in Spring Tool Suite Version: 3.9.6.RELEASE, I am getting the error as



      org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle installation '/usr/share/gradle'.
      at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:95)
      at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:44)
      at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:43)
      at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:101)
      at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:83)
      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.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
      at java.base/java.lang.Thread.run(Thread.java:834)
      at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
      at org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.java:50)
      at org.gradle.tooling.internal.consumer.DefaultProjectConnection.getModel(DefaultProjectConnection.java:41)
      at org.eclipse.buildship.core.internal.IdeAttachedProjectConnection.configureOperation(IdeAttachedProjectConnection.java:64)
      at org.eclipse.buildship.core.internal.IdeAttachedProjectConnection.model(IdeAttachedProjectConnection.java:55)
      at org.eclipse.buildship.core.internal.IdeAttachedProjectConnection.getModel(IdeAttachedProjectConnection.java:82)
      at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider$1.lambda$call$0(DefaultModelProvider.java:88)
      at org.eclipse.buildship.core.internal.DefaultGradleBuild$GradleConnectionOperation.runInToolingApi(DefaultGradleBuild.java:312)
      at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager$WorkspaceRunnableAdapter.run(DefaultToolingApiOperationManager.java:57)
      at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
      at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2319)
      at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:38)
      at org.eclipse.buildship.core.internal.DefaultGradleBuild.withConnection(DefaultGradleBuild.java:112)
      at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider$1.call(DefaultModelProvider.java:88)
      at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:5065)
      at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716)
      at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424)
      at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298)
      at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211)
      at com.google.common.cache.LocalCache.get(LocalCache.java:4154)
      at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:5060)
      at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.getFromCache(DefaultModelProvider.java:123)
      at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.executeOperation(DefaultModelProvider.java:115)
      at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.executeModelQuery(DefaultModelProvider.java:84)
      at org.eclipse.buildship.core.internal.workspace.DefaultModelProvider.fetchModel(DefaultModelProvider.java:49)
      at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage.fetchBuildEnvironment(ProjectPreviewWizardPage.java:453)
      at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage.access$600(ProjectPreviewWizardPage.java:80)
      at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage$UpdatePreviewOperation.runInToolingApi(ProjectPreviewWizardPage.java:478)
      at org.eclipse.buildship.core.internal.operation.ToolingApiOperations$1.runInToolingApi(ToolingApiOperations.java:59)
      at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager$WorkspaceRunnableAdapter.run(DefaultToolingApiOperationManager.java:57)
      at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
      at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2319)
      at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:38)
      at org.eclipse.buildship.core.internal.operation.DefaultToolingApiOperationManager.run(DefaultToolingApiOperationManager.java:32)
      at org.eclipse.buildship.ui.internal.wizard.project.ProjectPreviewWizardPage$4.run(ProjectPreviewWizardPage.java:313)
      at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
      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:182)
      at org.gradle.internal.service.DefaultServiceLocator$ServiceFactory.create(DefaultServiceLocator.java:175)
      at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:78)
      at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:44)
      at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:43)
      at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:101)
      at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:83)
      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.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
      at java.base/java.lang.Thread.run(Thread.java:834)
      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:55)
      at org.gradle.internal.reflect.DirectInstantiator.instantiate(DirectInstantiator.java:35)
      at org.gradle.internal.service.DefaultServiceLocator$ServiceFactory.newInstance(DefaultServiceLocator.java:180)
      ... 16 more
      Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
      at org.gradle.tooling.internal.provider.DefaultConnection.<clinit>(DefaultConnection.java:73)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
      at org.gradle.internal.reflect.DirectInstantiator.newInstance(DirectInstantiator.java:51)
      ... 18 more
      Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
      at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      ... 24 more


      Gradle version I am using is



      ------------------------------------------------------------
      Gradle 4.4.1
      ------------------------------------------------------------

      Build time: 2012-12-21 00:00:00 UTC
      Revision: none

      Groovy: 2.4.15
      Ant: Apache Ant(TM) version 1.10.5 compiled on August 27 2018
      JVM: 11.0.1 (Oracle Corporation 11.0.1+13-Ubuntu-2ubuntu1)
      OS: Linux 4.18.0-13-generic amd64


      I am using Buildship Gradle Integration 3.0 STS plugin.
      Is it some version issue or what wrong I am doing?







      java spring spring-boot gradle






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 23 '18 at 11:22









      DileepDileep

      63




      63
























          1 Answer
          1






          active

          oldest

          votes


















          0














          I had a similar error :



          org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-4.10.1-all.zip'.
          ...
          Caused by: java.lang.ExceptionInInitializerError
          ...
          Caused by: java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerAdapter cannot be cast to org.gradle.api.logging.Logger
          ...


          I searched my whole system for "slf4j" and found two very old .jar files in /usr/java/packages/lib/ext/. Removing them allowed me to build my project.



          I suspect your problem is that you have to add slf4j jar files, since I had a "ClassCastException" and you had a "ClassNotFoundException".






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53903182%2fcould-not-create-an-instance-of-tooling-api-implementation-using-the-specified-g%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            I had a similar error :



            org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-4.10.1-all.zip'.
            ...
            Caused by: java.lang.ExceptionInInitializerError
            ...
            Caused by: java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerAdapter cannot be cast to org.gradle.api.logging.Logger
            ...


            I searched my whole system for "slf4j" and found two very old .jar files in /usr/java/packages/lib/ext/. Removing them allowed me to build my project.



            I suspect your problem is that you have to add slf4j jar files, since I had a "ClassCastException" and you had a "ClassNotFoundException".






            share|improve this answer




























              0














              I had a similar error :



              org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-4.10.1-all.zip'.
              ...
              Caused by: java.lang.ExceptionInInitializerError
              ...
              Caused by: java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerAdapter cannot be cast to org.gradle.api.logging.Logger
              ...


              I searched my whole system for "slf4j" and found two very old .jar files in /usr/java/packages/lib/ext/. Removing them allowed me to build my project.



              I suspect your problem is that you have to add slf4j jar files, since I had a "ClassCastException" and you had a "ClassNotFoundException".






              share|improve this answer


























                0












                0








                0







                I had a similar error :



                org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-4.10.1-all.zip'.
                ...
                Caused by: java.lang.ExceptionInInitializerError
                ...
                Caused by: java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerAdapter cannot be cast to org.gradle.api.logging.Logger
                ...


                I searched my whole system for "slf4j" and found two very old .jar files in /usr/java/packages/lib/ext/. Removing them allowed me to build my project.



                I suspect your problem is that you have to add slf4j jar files, since I had a "ClassCastException" and you had a "ClassNotFoundException".






                share|improve this answer













                I had a similar error :



                org.gradle.tooling.GradleConnectionException: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-4.10.1-all.zip'.
                ...
                Caused by: java.lang.ExceptionInInitializerError
                ...
                Caused by: java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerAdapter cannot be cast to org.gradle.api.logging.Logger
                ...


                I searched my whole system for "slf4j" and found two very old .jar files in /usr/java/packages/lib/ext/. Removing them allowed me to build my project.



                I suspect your problem is that you have to add slf4j jar files, since I had a "ClassCastException" and you had a "ClassNotFoundException".







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 19 at 3:15









                andrew lorienandrew lorien

                632718




                632718






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53903182%2fcould-not-create-an-instance-of-tooling-api-implementation-using-the-specified-g%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Homophylophilia

                    Updating UILabel text programmatically using a function

                    Cloud Functions - OpenCV Videocapture Read method fails for larger files from cloud storage