java.lang.reflect.InvocationTargetException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I configured GGTS to use a [JRockit|http://www.oracle.com/technetwork/middleware/jrockit/overview/index.html] jdk in order to easily collect some useful performance data through its flight recording feature. Since then the gradle integration stopped working: initially I didn't understand what was going on, cause the gradle refresh on existing projects stopped writing on the console, and the dependencies was not refreshed at all. I initially thought I had some proxy related issue, then I tried to import a simple gradle project, and it failed soon to build the model complaining {quote} java.lang.reflect.InvocationTargetException at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.java:92) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: org.eclipse.core.runtime.CoreException: Could not fetch model of type 'HierarchicalEclipseProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.5-bin.zip'. at org.springsource.ide.eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.ensureModels(GradleModelProvider.java:284) at org.springsource.ide.eclipse.gradle.core.GradleProject.getGradleModel(GradleProject.java:633) at org.springsource.ide.eclipse.gradle.core.GradleProject.getSkeletalGradleModel(GradleProject.java:654) at org.springsource.ide.eclipse.gradle.ui.wizards.GradleImportWizardPageOne$11.doit(GradleImportWizardPageOne.java:516) at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.java:84) ... 1 more Caused by: org.gradle.tooling.GradleConnectionException: Could not fetch model of type 'HierarchicalEclipseProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.5-bin.zip'. at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:55) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$2.run(DefaultAsyncConnection.java:71) at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ExceptionInInitializerError at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.createImplementationClassLoader(DefaultToolingImplementationLoader.java:87) at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:53) at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:40) at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:43) at org.gradle.tooling.internal.consumer.connection.LazyConnection.onStartAction(LazyConnection.java:122) at org.gradle.tooling.internal.consumer.connection.LazyConnection.withConnection(LazyConnection.java:105) at org.gradle.tooling.internal.consumer.connection.LazyConnection.run(LazyConnection.java:96) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection$1.run(ProgressLoggingConnection.java:57) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:71) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:55) at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConnection.run(LoggingInitializerConnection.java:52) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$1.run(DefaultAsyncConnection.java:51) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$2.run(DefaultAsyncConnection.java:69) ... 4 more Caused by: java.lang.NullPointerException at java.io.File.<init>(File.java:222) at java.lang.Package$1.run(Package.java:527) at java.lang.Package.defineSystemPackage(Package.java:520) at java.lang.Package.getSystemPackages(Package.java:511) at java.lang.ClassLoader.getPackages(ClassLoader.java:1513) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.gradle.util.JavaMethod.invoke(JavaMethod.java:56) at org.gradle.util.FilteringClassLoader.<clinit>(FilteringClassLoader.java:46) at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.createImplementationClassLoader(DefaultToolingImplementationLoader.java:87) at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:53) at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:40) at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:43) at org.gradle.tooling.internal.consumer.connection.LazyConnection.onStartAction(LazyConnection.java:122) at org.gradle.tooling.internal.consumer.connection.LazyConnection.withConnection(LazyConnection.java:105) at org.gradle.tooling.internal.consumer.connection.LazyConnection.run(LazyConnection.java:96) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection$1.run(ProgressLoggingConnection.java:57) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:71) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:55) at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConnection.run(LoggingInitializerConnection.java:52) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$1.run(DefaultAsyncConnection.java:51) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$2.run(DefaultAsyncConnection.java:69) at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) ... 1 more {quote} (it seems quite a class loading issue). Then I saw the same happened when refreshing gradle deps for existing projects, but the error is shown only on the error log (with no other notification). h4. Some steps to reproduce it In order to use jrockit I changed GGTS configuration the following way {code:title=GGTS.ini} -vm /home/davide/opt/jrockit-jdk1.6.0_45-R28.2.7-4.1.0/jre/lib/i386/jrockit/libjvm.so ... {code} I reproduce the issue both with Gradle IDE stable (3.3.0) and last nightly build (3.4.0.201307082353-CI-B200) just trying to import a gradle project from _File|Import|Gradle|Gradle project_, then setting the project root folder path and pressing the _Build model_ button. The gradle project is a folder with a _build.gradle_ that simply applies the java plugin. Using any sun/oracle jvm it works properly.
    via by Davide Cavestro,
  • I configured GGTS to use a [JRockit|http://www.oracle.com/technetwork/middleware/jrockit/overview/index.html] jdk in order to easily collect some useful performance data through its flight recording feature. Since then the gradle integration stopped working: initially I didn't understand what was going on, cause the gradle refresh on existing projects stopped writing on the console, and the dependencies was not refreshed at all. I initially thought I had some proxy related issue, then I tried to import a simple gradle project, and it failed soon to build the model complaining {quote} java.lang.reflect.InvocationTargetException at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.java:92) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: org.eclipse.core.runtime.CoreException: Could not fetch model of type 'HierarchicalEclipseProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.5-bin.zip'. at org.springsource.ide.eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.ensureModels(GradleModelProvider.java:284) at org.springsource.ide.eclipse.gradle.core.GradleProject.getGradleModel(GradleProject.java:633) at org.springsource.ide.eclipse.gradle.core.GradleProject.getSkeletalGradleModel(GradleProject.java:654) at org.springsource.ide.eclipse.gradle.ui.wizards.GradleImportWizardPageOne$11.doit(GradleImportWizardPageOne.java:516) at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.java:84) ... 1 more Caused by: org.gradle.tooling.GradleConnectionException: Could not fetch model of type 'HierarchicalEclipseProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.5-bin.zip'. at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:55) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$2.run(DefaultAsyncConnection.java:71) at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ExceptionInInitializerError at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.createImplementationClassLoader(DefaultToolingImplementationLoader.java:87) at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:53) at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:40) at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:43) at org.gradle.tooling.internal.consumer.connection.LazyConnection.onStartAction(LazyConnection.java:122) at org.gradle.tooling.internal.consumer.connection.LazyConnection.withConnection(LazyConnection.java:105) at org.gradle.tooling.internal.consumer.connection.LazyConnection.run(LazyConnection.java:96) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection$1.run(ProgressLoggingConnection.java:57) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:71) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:55) at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConnection.run(LoggingInitializerConnection.java:52) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$1.run(DefaultAsyncConnection.java:51) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$2.run(DefaultAsyncConnection.java:69) ... 4 more Caused by: java.lang.NullPointerException at java.io.File.<init>(File.java:222) at java.lang.Package$1.run(Package.java:527) at java.lang.Package.defineSystemPackage(Package.java:520) at java.lang.Package.getSystemPackages(Package.java:511) at java.lang.ClassLoader.getPackages(ClassLoader.java:1513) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.gradle.util.JavaMethod.invoke(JavaMethod.java:56) at org.gradle.util.FilteringClassLoader.<clinit>(FilteringClassLoader.java:46) at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.createImplementationClassLoader(DefaultToolingImplementationLoader.java:87) at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:53) at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:40) at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:43) at org.gradle.tooling.internal.consumer.connection.LazyConnection.onStartAction(LazyConnection.java:122) at org.gradle.tooling.internal.consumer.connection.LazyConnection.withConnection(LazyConnection.java:105) at org.gradle.tooling.internal.consumer.connection.LazyConnection.run(LazyConnection.java:96) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection$1.run(ProgressLoggingConnection.java:57) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:71) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:55) at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConnection.run(LoggingInitializerConnection.java:52) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$1.run(DefaultAsyncConnection.java:51) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$2.run(DefaultAsyncConnection.java:69) at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) ... 1 more {quote} (it seems quite a class loading issue). Then I saw the same happened when refreshing gradle deps for existing projects, but the error is shown only on the error log (with no other notification). h4. Some steps to reproduce it In order to use jrockit I changed GGTS configuration the following way {code:title=GGTS.ini} -vm /home/davide/opt/jrockit-jdk1.6.0_45-R28.2.7-4.1.0/jre/lib/i386/jrockit/libjvm.so ... {code} I reproduce the issue both with Gradle IDE stable (3.3.0) and last nightly build (3.4.0.201307082353-CI-B200) just trying to import a gradle project from _File|Import|Gradle|Gradle project_, then setting the project root folder path and pressing the _Build model_ button. The gradle project is a folder with a _build.gradle_ that simply applies the java plugin. Using any sun/oracle jvm it works properly.
    via by Davide Cavestro,
  • trying and failing to do java functions
    via Stack Overflow by Shani Paley
    ,
    • java.lang.reflect.InvocationTargetException at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.java:92) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: org.eclipse.core.runtime.CoreException: Could not fetch model of type 'HierarchicalEclipseProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.5-bin.zip'. at org.springsource.ide.eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.ensureModels(GradleModelProvider.java:284) at org.springsource.ide.eclipse.gradle.core.GradleProject.getGradleModel(GradleProject.java:633) at org.springsource.ide.eclipse.gradle.core.GradleProject.getSkeletalGradleModel(GradleProject.java:654) at org.springsource.ide.eclipse.gradle.ui.wizards.GradleImportWizardPageOne$11.doit(GradleImportWizardPageOne.java:516) at org.springsource.ide.eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.java:84) ... 1 more Caused by: org.gradle.tooling.GradleConnectionException: Could not fetch model of type 'HierarchicalEclipseProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.5-bin.zip'. at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:55) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$2.run(DefaultAsyncConnection.java:71) at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ExceptionInInitializerError at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.createImplementationClassLoader(DefaultToolingImplementationLoader.java:87) at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:53) at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:40) at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:43) at org.gradle.tooling.internal.consumer.connection.LazyConnection.onStartAction(LazyConnection.java:122) at org.gradle.tooling.internal.consumer.connection.LazyConnection.withConnection(LazyConnection.java:105) at org.gradle.tooling.internal.consumer.connection.LazyConnection.run(LazyConnection.java:96) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection$1.run(ProgressLoggingConnection.java:57) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:71) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:55) at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConnection.run(LoggingInitializerConnection.java:52) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$1.run(DefaultAsyncConnection.java:51) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$2.run(DefaultAsyncConnection.java:69) ... 4 more Caused by: java.lang.NullPointerException at java.io.File.<init>(File.java:222) at java.lang.Package$1.run(Package.java:527) at java.lang.Package.defineSystemPackage(Package.java:520) at java.lang.Package.getSystemPackages(Package.java:511) at java.lang.ClassLoader.getPackages(ClassLoader.java:1513) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.gradle.util.JavaMethod.invoke(JavaMethod.java:56) at org.gradle.util.FilteringClassLoader.<clinit>(FilteringClassLoader.java:46) at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.createImplementationClassLoader(DefaultToolingImplementationLoader.java:87) at org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:53) at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:40) at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:43) at org.gradle.tooling.internal.consumer.connection.LazyConnection.onStartAction(LazyConnection.java:122) at org.gradle.tooling.internal.consumer.connection.LazyConnection.withConnection(LazyConnection.java:105) at org.gradle.tooling.internal.consumer.connection.LazyConnection.run(LazyConnection.java:96) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection$1.run(ProgressLoggingConnection.java:57) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:71) at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:55) at org.gradle.tooling.internal.consumer.connection.LoggingInitializerConnection.run(LoggingInitializerConnection.java:52) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$1.run(DefaultAsyncConnection.java:51) at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$2.run(DefaultAsyncConnection.java:69) at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) ... 1 more

    Users with the same issue

    derprogger
    derprogger7 times, last one,
    Unknown visitor1 times, last one,
    rp
    rp2 times, last one,
    raytest
    raytest2 times, last one,
    Unknown visitor1 times, last one,
    42 more bugmates