Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello ,
i have this exception ,im trying to connect to my system,userName and pass which i enter are correct ,but when i press ok to ligin,it throws this exception ,i use sql server,and i checked the jar file it is correct .
java.lang.ClassNotFoundException:
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)

thanks in advance

Java
@CallerSensitive
public static Class<!--?--> forName(String className) throws ClassNotFoundException {
    // 190 is..     
    return forName0(className, true,
    ClassLoader.getClassLoader(Reflection.getCallerClass()));
}

// getClassLoader method is 
    static ClassLoader getClassLoader(Class<!--?--> caller) {
    // This can be null if the VM is requesting it
    if (caller == null) {
        return null;
    }
    // Circumvent security check since this is package-private
    return caller.getClassLoader0();
}
Posted
Updated 25-Jun-15 0:45am
v2
Comments
Richard MacCutchan 25-Jun-15 6:07am    
Please show us the code at line 190, we cannot guess what it is trying to do.
Member 11752972 25-Jun-15 6:12am    
@CallerSensitive
public static Class forName(String className)
throws ClassNotFoundException {
190 is.. return forName0(className, true,
ClassLoader.getClassLoader(Reflection.getCallerClass()));
}

getClassLoader method is
static ClassLoader getClassLoader(Class caller) {
// This can be null if the VM is requesting it
if (caller == null) {
return null;
}
// Circumvent security check since this is package-private
return caller.getClassLoader0();
}
Richard MacCutchan 25-Jun-15 6:47am    
So one of those classes cannot be found; use your debugger to find out which one it is.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900