When I am trying to debug code snippet mentioned above in Eclipse it asks me to provide source code at debug time. I provided the zip file mentioned above. But them it throws an error that source not found.
Basically the PMF.class is compiled from PMF.java and in the source file I am not able to find any PMF.java class.
For setup I downloaded the ObjectDB zip file. Placed it in source code of my existing project. I added the Objectdb.jar file in build path. There were no compile time errors. I debugged following code
import java.util.Properties;
import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManager;
import javax.jdo.PersistenceManagerFactory;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Employee emp = new Employee("ALEX",0, "ABC.CORP");
Properties prop = new Properties();
prop.setProperty("javax.jdo.PersistenceManagerFactoryClass","com.objectdb.jdo.PMF");
prop.setProperty("javax.jdo.option.ConnectionUR","local.odb");
PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory(prop);
PersistenceManager pm = pmf.getPersistenceManager(); / <===
try {
pm.makePersistent(emp);
}
finally {
pm.close();
}
}
}
When I reach above statement in RED it asks me to mention the source path so I added file
objectdb-2.3.7_04\objectdb-2.3.7_04\src\jdo_2.2.zip as source code.
But then it throws Source not found error.
Please tell me if I am doing correct setup.