java.lang.IllegalArgumentException: Could not load class MyRepository

SpringSource Issue Tracker | Tomasz Zarna | 4 years ago
  1. 0

    Create a new Spring project. Copy the following snippet to clipboard (from STS-2888): {code} public interface MyRepository<T, ID extends Serializable> extends JpaRepository<T, ID> { void sharedCustomMethod(ID id); } {code} Select the project and paste the clipboard content. => {code} java.lang.IllegalArgumentException: Could not load class MyRepository at org.springframework.ide.eclipse.data.jdt.core.RepositoryInformation.<init>(RepositoryInformation.java:94) at org.springframework.ide.eclipse.data.jdt.core.SpringDataCompilationParticipant.reconcile(SpringDataCompilationParticipant.java:61) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation$1.run(ReconcileWorkingCopyOperation.java:257) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.notifyParticipants(ReconcileWorkingCopyOperation.java:244) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:94) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:788) at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1247) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:126) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.access$0(JavaReconcilingStrategy.java:108) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy$1.run(JavaReconcilingStrategy.java:89) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:87) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.initialReconcile(JavaReconcilingStrategy.java:178) at org.eclipse.jdt.internal.ui.text.CompositeReconcilingStrategy.initialReconcile(CompositeReconcilingStrategy.java:114) at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.initialReconcile(JavaCompositeReconcilingStrategy.java:136) at org.eclipse.jface.text.reconciler.MonoReconciler.initialProcess(MonoReconciler.java:105) at org.eclipse.jdt.internal.ui.text.JavaReconciler.initialProcess(JavaReconciler.java:406) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:173) Caused by: java.lang.ClassNotFoundException: org.springframework.data.repository.Repository at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.springframework.ide.eclipse.data.jdt.core.RepositoryInformation.<init>(RepositoryInformation.java:91) ... 19 more {code}

    SpringSource Issue Tracker | 4 years ago | Tomasz Zarna
    java.lang.IllegalArgumentException: Could not load class MyRepository
  2. 0

    Create a new Spring project. Copy the following snippet to clipboard (from STS-2888): {code} public interface MyRepository<T, ID extends Serializable> extends JpaRepository<T, ID> { void sharedCustomMethod(ID id); } {code} Select the project and paste the clipboard content. => {code} java.lang.IllegalArgumentException: Could not load class MyRepository at org.springframework.ide.eclipse.data.jdt.core.RepositoryInformation.<init>(RepositoryInformation.java:94) at org.springframework.ide.eclipse.data.jdt.core.SpringDataCompilationParticipant.reconcile(SpringDataCompilationParticipant.java:61) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation$1.run(ReconcileWorkingCopyOperation.java:257) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.notifyParticipants(ReconcileWorkingCopyOperation.java:244) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:94) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:788) at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1247) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:126) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.access$0(JavaReconcilingStrategy.java:108) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy$1.run(JavaReconcilingStrategy.java:89) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:87) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.initialReconcile(JavaReconcilingStrategy.java:178) at org.eclipse.jdt.internal.ui.text.CompositeReconcilingStrategy.initialReconcile(CompositeReconcilingStrategy.java:114) at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.initialReconcile(JavaCompositeReconcilingStrategy.java:136) at org.eclipse.jface.text.reconciler.MonoReconciler.initialProcess(MonoReconciler.java:105) at org.eclipse.jdt.internal.ui.text.JavaReconciler.initialProcess(JavaReconciler.java:406) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:173) Caused by: java.lang.ClassNotFoundException: org.springframework.data.repository.Repository at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.springframework.ide.eclipse.data.jdt.core.RepositoryInformation.<init>(RepositoryInformation.java:91) ... 19 more {code}

    SpringSource Issue Tracker | 4 years ago | Tomasz Zarna
    java.lang.IllegalArgumentException: Could not load class MyRepository
  3. 0

    java not finding class in jar after successfully compiling with javac against same jar

    Stack Overflow | 2 years ago | Dunes
    java.lang.NoClassDefFoundError: com/google/caliper/runner/CaliperMain
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Code coverage: in standalone mode can get TestRun$1 class missing

    GitHub | 1 year ago | wknorr
    java.lang.NoClassDefFoundError: mockit/internal/state/TestRun$1
  6. 0

    Gentoo Forums :: View topic - I want to make Java OpenGL acceleration work in Java Applets

    gentoo.org | 1 year ago
    java.lang.NoClassDefFoundError: com/sun/gluegen/runtime/DynamicLookupHelper

  1. andyglick 2 times, last 3 days ago
  2. richard77 1 times, last 6 days ago
  3. musketyr 2 times, last 6 days ago
  4. michallos 2 times, last 6 days ago
  5. batwalrus76 2 times, last 6 days ago
67 more registered users
28 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.ClassNotFoundException

    org.springframework.data.repository.Repository

    at java.net.URLClassLoader$1.run()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader$1.run(Unknown Source)
    2. java.net.URLClassLoader$1.run(Unknown Source)
    3. java.security.AccessController.doPrivileged(Native Method)
    4. java.net.URLClassLoader.findClass(Unknown Source)
    5. java.lang.ClassLoader.loadClass(Unknown Source)
    6. java.lang.ClassLoader.loadClass(Unknown Source)
    6 frames
  3. org.springframework.ide
    SpringDataCompilationParticipant.reconcile
    1. org.springframework.ide.eclipse.data.jdt.core.RepositoryInformation.<init>(RepositoryInformation.java:91)
    2. org.springframework.ide.eclipse.data.jdt.core.SpringDataCompilationParticipant.reconcile(SpringDataCompilationParticipant.java:61)
    2 frames
  4. JDT Core
    ReconcileWorkingCopyOperation$1.run
    1. org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation$1.run(ReconcileWorkingCopyOperation.java:257)
    1 frame
  5. Eclipse Core
    SafeRunner.run
    1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    1 frame
  6. JDT Core
    CompilationUnit.reconcile
    1. org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.notifyParticipants(ReconcileWorkingCopyOperation.java:244)
    2. org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:94)
    3. org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
    4. org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:788)
    5. org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1247)
    5 frames
  7. Java Development Tools UI
    JavaReconcilingStrategy$1.run
    1. org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:126)
    2. org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.access$0(JavaReconcilingStrategy.java:108)
    3. org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy$1.run(JavaReconcilingStrategy.java:89)
    3 frames
  8. Eclipse Core
    SafeRunner.run
    1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    1 frame
  9. Java Development Tools UI
    JavaCompositeReconcilingStrategy.initialReconcile
    1. org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:87)
    2. org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.initialReconcile(JavaReconcilingStrategy.java:178)
    3. org.eclipse.jdt.internal.ui.text.CompositeReconcilingStrategy.initialReconcile(CompositeReconcilingStrategy.java:114)
    4. org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.initialReconcile(JavaCompositeReconcilingStrategy.java:136)
    4 frames
  10. JFace Text
    MonoReconciler.initialProcess
    1. org.eclipse.jface.text.reconciler.MonoReconciler.initialProcess(MonoReconciler.java:105)
    1 frame
  11. Java Development Tools UI
    JavaReconciler.initialProcess
    1. org.eclipse.jdt.internal.ui.text.JavaReconciler.initialProcess(JavaReconciler.java:406)
    1 frame
  12. JFace Text
    AbstractReconciler$BackgroundThread.run
    1. org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:173)
    1 frame