I solved the problem. Thanks to theMarceloR's post. First I created a class where I tested this :
public class main {
/**
* @param args
* @throws AuthenticationFault
*/
public static void main(String[] args) throws AuthenticationFault {
// TODO Auto-generated method stub
Class cls = org.alfresco.repo.security.authentication.AuthenticationException.class;
ProtectionDomain pDomain = cls.getProtectionDomain();
CodeSource cSource = pDomain.getCodeSource();
URL loc = cSource.getLocation();
System.out.println(loc);
}
After running the program, you will get the missing class in your library. This class is used by AuthenticationException. I got the error :
java.lang.ClassNotFoundException: org.alfresco.error.AlfrescoRuntimeException
Then I added the alfresco-core.jar that contains org.alfresco.error.AlfrescoRuntimeException into my classpath. I ran the Class again and everything worked fine.
I got that error many times and I've fixed it with this method.
Hope that Help !