Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Could not reset project classpath" with duplicate source folders #876

Open
mikera opened this issue Aug 25, 2016 · 0 comments
Open

"Could not reset project classpath" with duplicate source folders #876

mikera opened this issue Aug 25, 2016 · 0 comments
Milestone

Comments

@mikera
Copy link

mikera commented Aug 25, 2016

I ran into an issue getting "Could not reset project classpath" error with latest CCW on Neon.

The underlying excpetion in the Eclipse .log file was:

!ENTRY ccw.core 4 0 2016-08-25 09:54:45.030
!MESSAGE Unexpected exception while executing Job Configuring Leiningen classpath dependencies for project unilever-clj
!STACK 1
org.eclipse.core.runtime.CoreException: Could not reset project classpath
    at ccw.leiningen.nature$reset_project_build_path.invoke(nature.clj:147)
    at ccw.leiningen.nature$factory$reify__6746$fn__6750.invoke(nature.clj:167)
    at ccw.eclipse$workspace_job$fn__2956.invoke(eclipse.clj:774)
    at ccw.eclipse.proxy$org.eclipse.core.resources.WorkspaceJob$ff19274a.runInWorkspace(Unknown Source)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: Java Model Exception: Java Model Status [Build path contains duplicate entry: 'src/main/clojure' for project 'unilever-clj']
    at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:786)
    at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3097)
    at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3059)
    at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
    at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
    at ccw.leiningen.nature$reset_project_build_path.invoke(nature.clj:141)
    ... 5 more
!SUBENTRY 1 ccw.core 4 0 2016-08-25 09:54:45.031
!MESSAGE Could not reset project classpath
!STACK 1
Java Model Exception: Java Model Status [Build path contains duplicate entry: 'src/main/clojure' for project 'unilever-clj']
    at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:786)
    at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3097)
    at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3059)
    at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
    at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
    at ccw.leiningen.nature$reset_project_build_path.invoke(nature.clj:141)
    at ccw.leiningen.nature$factory$reify__6746$fn__6750.invoke(nature.clj:167)
    at ccw.eclipse$workspace_job$fn__2956.invoke(eclipse.clj:774)
    at ccw.eclipse.proxy$org.eclipse.core.resources.WorkspaceJob$ff19274a.runInWorkspace(Unknown Source)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!SUBENTRY 2 org.eclipse.jdt.core 4 977 2016-08-25 09:54:45.032
!MESSAGE Build path contains duplicate entry: 'src/main/clojure' for project 'unilever-clj'

I traced it down to the following two lines in the project.clj

  :source-paths ["src/main/clojure"]
  :test-paths ["src/main/clojure" "src/test/clojure"]

Removing the duplicate entry fixed the issue, however Leiningen doesn't complain with the same project.clj so it may be a sign of an underlying issue that needs fixing.

@laurentpetit laurentpetit added this to the 0.36.0 milestone Sep 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants