java.lang.IllegalArgumentException: Project location doesn't exist

SpringSource Issue Tracker | Kevin Stembridge | 4 years ago
  1. 0

    Due to user error, we ended up with the gradle settings file for a given project pointing to a root project location that didn't exist. This prevented the project from building and caused a popup dialog to appear. The only error message in this dialog was "Project location doesn't exist". The error log showed a stack trace that pointed out where this error was coming from (stack trace pasted below). It took a long time for me to find out by browsing the Gradle source code what the missing location was. Could you change the error messages produced in the GradleProject class to provide more information. e.g. Gradle project location doesn't exist: location = [some/project/location] java.lang.IllegalArgumentException: Project location doesn't exist at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63) at org.springsource.ide.eclipse.gradle.core.GradleProject.<init>(GradleProject.java:121) at org.springsource.ide.eclipse.gradle.core.GradleProjectManager.getOrCreate(GradleProjectManager.java:60) at org.springsource.ide.eclipse.gradle.core.GradleCore.create(GradleCore.java:163) at org.springsource.ide.eclipse.gradle.core.GradleProject.getRootProject(GradleProject.java:948) at org.springsource.ide.eclipse.gradle.core.GradleProject.getModelProvider(GradleProject.java:524) at org.springsource.ide.eclipse.gradle.core.GradleProject.getGradleModel(GradleProject.java:512) at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer.isInitialized(GradleClassPathContainer.java:178) at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer.getDescription(GradleClassPathContainer.java:158) at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer.toString(GradleClassPathContainer.java:226) at java.lang.String.valueOf(String.java:2854) at java.lang.StringBuilder.append(StringBuilder.java:128) at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer.setJDTClassPathContainer(GradleClassPathContainer.java:201) at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClasspathContainerInitializer.initialize(GradleClasspathContainerInitializer.java:79) at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:2851) at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1880) at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3128) at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2698) at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2862) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1967) at org.eclipse.jdt.internal.core.JavaModelManager.determineIfOnClasspath(JavaModelManager.java:1014) at org.eclipse.jdt.internal.core.JavaModelManager.create(JavaModelManager.java:911) at org.eclipse.jdt.internal.core.JavaModelManager.create(JavaModelManager.java:841) at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:3013) at org.eclipse.jdt.internal.ui.navigator.JavaNavigatorContentProvider.convertToJavaElements(JavaNavigatorContentProvider.java:255) at org.eclipse.jdt.internal.ui.navigator.JavaNavigatorContentProvider.interceptRefresh(JavaNavigatorContentProvider.java:314) at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.interceptRefresh(SafeDelegateTreeContentProvider.java:247) at org.eclipse.ui.internal.navigator.NavigatorPipelineService$3.run(NavigatorPipelineService.java:188) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.navigator.NavigatorPipelineService.pipelineInterceptRefresh(NavigatorPipelineService.java:184) at org.eclipse.ui.internal.navigator.NavigatorPipelineService.interceptRefresh(NavigatorPipelineService.java:167) at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:342) at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:510) at org.eclipse.ui.internal.navigator.resources.workbench.ResourceExtensionContentProvider$3.run(ResourceExtensionContentProvider.java:294) at org.eclipse.ui.internal.navigator.resources.workbench.ResourceExtensionContentProvider.runUpdates(ResourceExtensionContentProvider.java:306) at org.eclipse.ui.internal.navigator.resources.workbench.ResourceExtensionContentProvider.access$1(ResourceExtensionContentProvider.java:303) at org.eclipse.ui.internal.navigator.resources.workbench.ResourceExtensionContentProvider$1.run(ResourceExtensionContentProvider.java:129) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3537) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3189)

    SpringSource Issue Tracker | 4 years ago | Kevin Stembridge
    java.lang.IllegalArgumentException: Project location doesn't exist
  2. 0

    Due to user error, we ended up with the gradle settings file for a given project pointing to a root project location that didn't exist. This prevented the project from building and caused a popup dialog to appear. The only error message in this dialog was "Project location doesn't exist". The error log showed a stack trace that pointed out where this error was coming from (stack trace pasted below). It took a long time for me to find out by browsing the Gradle source code what the missing location was. Could you change the error messages produced in the GradleProject class to provide more information. e.g. Gradle project location doesn't exist: location = [some/project/location] java.lang.IllegalArgumentException: Project location doesn't exist at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63) at org.springsource.ide.eclipse.gradle.core.GradleProject.<init>(GradleProject.java:121) at org.springsource.ide.eclipse.gradle.core.GradleProjectManager.getOrCreate(GradleProjectManager.java:60) at org.springsource.ide.eclipse.gradle.core.GradleCore.create(GradleCore.java:163) at org.springsource.ide.eclipse.gradle.core.GradleProject.getRootProject(GradleProject.java:948) at org.springsource.ide.eclipse.gradle.core.GradleProject.getModelProvider(GradleProject.java:524) at org.springsource.ide.eclipse.gradle.core.GradleProject.getGradleModel(GradleProject.java:512) at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer.isInitialized(GradleClassPathContainer.java:178) at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer.getDescription(GradleClassPathContainer.java:158) at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer.toString(GradleClassPathContainer.java:226) at java.lang.String.valueOf(String.java:2854) at java.lang.StringBuilder.append(StringBuilder.java:128) at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer.setJDTClassPathContainer(GradleClassPathContainer.java:201) at org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClasspathContainerInitializer.initialize(GradleClasspathContainerInitializer.java:79) at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:2851) at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1880) at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3128) at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2698) at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2862) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1967) at org.eclipse.jdt.internal.core.JavaModelManager.determineIfOnClasspath(JavaModelManager.java:1014) at org.eclipse.jdt.internal.core.JavaModelManager.create(JavaModelManager.java:911) at org.eclipse.jdt.internal.core.JavaModelManager.create(JavaModelManager.java:841) at org.eclipse.jdt.core.JavaCore.create(JavaCore.java:3013) at org.eclipse.jdt.internal.ui.navigator.JavaNavigatorContentProvider.convertToJavaElements(JavaNavigatorContentProvider.java:255) at org.eclipse.jdt.internal.ui.navigator.JavaNavigatorContentProvider.interceptRefresh(JavaNavigatorContentProvider.java:314) at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.interceptRefresh(SafeDelegateTreeContentProvider.java:247) at org.eclipse.ui.internal.navigator.NavigatorPipelineService$3.run(NavigatorPipelineService.java:188) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.navigator.NavigatorPipelineService.pipelineInterceptRefresh(NavigatorPipelineService.java:184) at org.eclipse.ui.internal.navigator.NavigatorPipelineService.interceptRefresh(NavigatorPipelineService.java:167) at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:342) at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:510) at org.eclipse.ui.internal.navigator.resources.workbench.ResourceExtensionContentProvider$3.run(ResourceExtensionContentProvider.java:294) at org.eclipse.ui.internal.navigator.resources.workbench.ResourceExtensionContentProvider.runUpdates(ResourceExtensionContentProvider.java:306) at org.eclipse.ui.internal.navigator.resources.workbench.ResourceExtensionContentProvider.access$1(ResourceExtensionContentProvider.java:303) at org.eclipse.ui.internal.navigator.resources.workbench.ResourceExtensionContentProvider$1.run(ResourceExtensionContentProvider.java:129) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3537) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3189)

    SpringSource Issue Tracker | 4 years ago | Kevin Stembridge
    java.lang.IllegalArgumentException: Project location doesn't exist
  3. 0

    Wrap JAR as OSGi Bundle Project fails on junit-dep-4.10.jar

    GitHub | 4 years ago | BryanHunt
    java.lang.IllegalArgumentException: Path for project must have only one segment.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    IllegalArgumentException occurs in RefreshTernProjectJob

    GitHub | 2 years ago | vrubezhny
    java.lang.IllegalArgumentException: Attempted to beginRule: R/, does not match outer scope rule: P/HelloCordova
  6. 0

    Model cannot be saved at AspectJ

    GitHub | 3 years ago | meinicke
    java.lang.IllegalArgumentException: Path must include project and resource name: /HelloWorld-AspectJ

    6 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.IllegalArgumentException

      Project location doesn't exist

      at org.eclipse.core.runtime.Assert.isLegal()
    2. Eclipse Core
      Assert.isLegal
      1. org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
      1 frame
    3. org.springsource.ide
      GradleClassPathContainer.toString
      1. org.springsource.ide.eclipse.gradle.core.GradleProject.<init>(GradleProject.java:121)
      2. org.springsource.ide.eclipse.gradle.core.GradleProjectManager.getOrCreate(GradleProjectManager.java:60)
      3. org.springsource.ide.eclipse.gradle.core.GradleCore.create(GradleCore.java:163)
      4. org.springsource.ide.eclipse.gradle.core.GradleProject.getRootProject(GradleProject.java:948)
      5. org.springsource.ide.eclipse.gradle.core.GradleProject.getModelProvider(GradleProject.java:524)
      6. org.springsource.ide.eclipse.gradle.core.GradleProject.getGradleModel(GradleProject.java:512)
      7. org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer.isInitialized(GradleClassPathContainer.java:178)
      8. org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer.getDescription(GradleClassPathContainer.java:158)
      9. org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer.toString(GradleClassPathContainer.java:226)
      9 frames
    4. Java RT
      StringBuilder.append
      1. java.lang.String.valueOf(String.java:2854)
      2. java.lang.StringBuilder.append(StringBuilder.java:128)
      2 frames
    5. org.springsource.ide
      GradleClasspathContainerInitializer.initialize
      1. org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClassPathContainer.setJDTClassPathContainer(GradleClassPathContainer.java:201)
      2. org.springsource.ide.eclipse.gradle.core.classpathcontainer.GradleClasspathContainerInitializer.initialize(GradleClasspathContainerInitializer.java:79)
      2 frames
    6. JDT Core
      JavaCore.create
      1. org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:2851)
      2. org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1880)
      3. org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3128)
      4. org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2698)
      5. org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2862)
      6. org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1967)
      7. org.eclipse.jdt.internal.core.JavaModelManager.determineIfOnClasspath(JavaModelManager.java:1014)
      8. org.eclipse.jdt.internal.core.JavaModelManager.create(JavaModelManager.java:911)
      9. org.eclipse.jdt.internal.core.JavaModelManager.create(JavaModelManager.java:841)
      10. org.eclipse.jdt.core.JavaCore.create(JavaCore.java:3013)
      10 frames
    7. Java Development Tools UI
      JavaNavigatorContentProvider.interceptRefresh
      1. org.eclipse.jdt.internal.ui.navigator.JavaNavigatorContentProvider.convertToJavaElements(JavaNavigatorContentProvider.java:255)
      2. org.eclipse.jdt.internal.ui.navigator.JavaNavigatorContentProvider.interceptRefresh(JavaNavigatorContentProvider.java:314)
      2 frames
    8. Common Navigator View
      NavigatorPipelineService$3.run
      1. org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.interceptRefresh(SafeDelegateTreeContentProvider.java:247)
      2. org.eclipse.ui.internal.navigator.NavigatorPipelineService$3.run(NavigatorPipelineService.java:188)
      2 frames
    9. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    10. Common Navigator View
      CommonViewer.refresh
      1. org.eclipse.ui.internal.navigator.NavigatorPipelineService.pipelineInterceptRefresh(NavigatorPipelineService.java:184)
      2. org.eclipse.ui.internal.navigator.NavigatorPipelineService.interceptRefresh(NavigatorPipelineService.java:167)
      3. org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:342)
      4. org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:510)
      4 frames
    11. Navigator Workbench Components
      ResourceExtensionContentProvider$1.run
      1. org.eclipse.ui.internal.navigator.resources.workbench.ResourceExtensionContentProvider$3.run(ResourceExtensionContentProvider.java:294)
      2. org.eclipse.ui.internal.navigator.resources.workbench.ResourceExtensionContentProvider.runUpdates(ResourceExtensionContentProvider.java:306)
      3. org.eclipse.ui.internal.navigator.resources.workbench.ResourceExtensionContentProvider.access$1(ResourceExtensionContentProvider.java:303)
      4. org.eclipse.ui.internal.navigator.resources.workbench.ResourceExtensionContentProvider$1.run(ResourceExtensionContentProvider.java:129)
      4 frames
    12. RWT
      Display.readAndDispatch
      1. org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
      2. org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
      3. org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3537)
      4. org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3189)
      4 frames