java.lang.reflect.InvocationTargetException

SpringSource Issue Tracker | Davide Cavestro | 3 years ago
  1. 0

    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.

    SpringSource Issue Tracker | 3 years ago | Davide Cavestro
    java.lang.reflect.InvocationTargetException
  2. 0

    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.

    SpringSource Issue Tracker | 3 years ago | Davide Cavestro
    java.lang.reflect.InvocationTargetException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  1. tyson925 1 times, last 1 month ago
  2. ajinkya_w 2 times, last 2 months ago
  3. Ajeet 8 times, last 3 months ago
  4. qavid 2 times, last 6 months ago
  5. Nikolay Rybak 11 times, last 6 months ago
2 more registered users
11 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    No message provided

    at java.io.File.<init>()
  2. Java RT
    Method.invoke
    1. java.io.File.<init>(File.java:222)
    2. java.lang.Package$1.run(Package.java:527)
    3. java.lang.Package.defineSystemPackage(Package.java:520)
    4. java.lang.Package.getSystemPackages(Package.java:511)
    5. java.lang.ClassLoader.getPackages(ClassLoader.java:1513)
    6. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    7. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    8. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    9. java.lang.reflect.Method.invoke(Method.java:597)
    9 frames
  3. Gradle Core
    FilteringClassLoader.<clinit>
    1. org.gradle.util.JavaMethod.invoke(JavaMethod.java:56)
    2. org.gradle.util.FilteringClassLoader.<clinit>(FilteringClassLoader.java:46)
    2 frames
  4. org.gradle.tooling
    DefaultAsyncConnection$2.run
    1. org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.createImplementationClassLoader(DefaultToolingImplementationLoader.java:87)
    2. org.gradle.tooling.internal.consumer.loader.DefaultToolingImplementationLoader.create(DefaultToolingImplementationLoader.java:53)
    3. org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:40)
    4. org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:43)
    5. org.gradle.tooling.internal.consumer.connection.LazyConnection.onStartAction(LazyConnection.java:122)
    6. org.gradle.tooling.internal.consumer.connection.LazyConnection.withConnection(LazyConnection.java:105)
    7. org.gradle.tooling.internal.consumer.connection.LazyConnection.run(LazyConnection.java:96)
    8. org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection$1.run(ProgressLoggingConnection.java:57)
    9. org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:71)
    10. org.gradle.tooling.internal.consumer.connection.ProgressLoggingConnection.run(ProgressLoggingConnection.java:55)
    11. org.gradle.tooling.internal.consumer.connection.LoggingInitializerConnection.run(LoggingInitializerConnection.java:52)
    12. org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$1.run(DefaultAsyncConnection.java:51)
    13. org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$2.run(DefaultAsyncConnection.java:69)
    13 frames
  5. Gradle Core
    DefaultExecutorFactory$StoppableExecutorImpl$1.run
    1. org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
    1 frame
  6. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
    3. java.lang.Thread.run(Thread.java:662)
    3 frames