I'm trying to run this code-->
import org.apache.cayenne.ObjectContext;
import org.apache.cayenne.access.DataContext;
public class Main {
/** * @param args */ public static void main(String[] args) { ObjectContext context = DataContext.createDataContext();
EmployeeInfo empInfo = (EmployeeInfo)context.newObject(EmployeeInfo.class); empInfo.setSalary("25000");
ContactInfo contactInfo = (ContactInfo)context.newObject(ContactInfo.class); contactInfo.setEmailId("[email protected]"); contactInfo.setPhoneNumber("9164304924");
context.commitChanges();
}
}
I get the following error at context.commitChanges(); line when i try to run the above code:
INFO: Opening connection: jdbc:mysql://127.0.0.1/EMPLOYEE Login: null Password: * Jan 29, 2010 4:21:18 PM org.apache.cayenne.access.QueryLogger logConnectFailure INFO: * Connecting: FAILURE.