JUNIT Eclipse - java.lang.ClassNotFoundException

0

All my tests using JUNIT do not work anymore. I tried unhappily removing all / bin and some other files from the .project .classpath configuration. Okay so far was a lot of bullshit, then tried to create another project and only pass the classes but I realized that JUNIT does not work on any project.

Does anyone have any ideas? GITHUB

Class:

package br.test;

import org.junit.Test;

public class TestMotosPersist {


    @Test
    public void criaMotos(){
        int a = 1;
    }
}

Errors:

TestMotosPersist [JUnit]    
    org.eclipse.jdt.internal.junit.runner.RemoteTestRunner at localhost:60874   
        Thread [main] (Suspended (exception ClassNotFoundException))    
            owns: Object  (id=22)   
            owns: Object  (id=23)   
            URLClassLoader$1.run() line: 366    
            URLClassLoader$1.run() line: 355    
            AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]   
            Launcher$ExtClassLoader(URLClassLoader).findClass(String) line: 354 
            Launcher$ExtClassLoader(ClassLoader).loadClass(String, boolean) line: 425   
            Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: 412   
            Launcher$AppClassLoader.loadClass(String, boolean) line: 308    
            Launcher$AppClassLoader(ClassLoader).loadClass(String) line: 358    
            LauncherHelper.checkAndLoadMain(boolean, int, String) line: 482 
    /usr/lib/jvm/java-7-openjdk-amd64/bin/java (07/05/2015 21:58:01)    

This happens in all tests in any project, I have tried to reassemble project, restart eclipse..etc

Who wants to see the full source GITHUB

    
asked by anonymous 08.05.2015 / 03:18

1 answer

0

I was able to solve it, it was not the best solution I could.

The mess I made with eclipse was in the .metadata file that is hidden in the workspace folder (if you use the default folder).

To view the file Press ctrl + H in ubuntu and windows you have the option to show hidden in the folder configuration

Removing the folder, Eclipse has reconfigured everything and returned to work. This problem was not good about Java, but configuration of eclipse. So sorry, I know this runs out of the OS scope, but I did not know.

    
08.05.2015 / 20:33