Hi,
I’m instantiating a new database through a UI page and when trying to submit the process I get the following error:
Submit error: { “exception”: “class org.bonitasoft.engine.exception.BonitaRuntimeException”, “message”: “USERNAME=lefloresg | javax.persistence.PersistenceException: org.hibernate.PropertyAccessException: could not get a field value by reflection getter of com.workcompanion.data.OVObjectives.persistenceId” }<
My objects are defined as follows:
- OVProfile
a. OVObjectives
i. ObjectiveDetails (Also an object)
ii. Username
iii. Quarter
b. OVProjects
i. ProjectDetails (Also an object)
ii. Username
iii. Quarter
The script says:
`//Initiate new profile
OVProfile newProfile = new OVProfile();
//Create list of new Objectives
List ObjList = new ArrayList ();
//Create list of new Projects
List ProjList = new ArrayList ();
String nPUName = initProfile.get(“uName”);
newProfile.setUserName(nPUName);
String npWPeriod = initProfile.get(“periodId”);
CommonWorkPeriod newWorkPeriod = commonWorkPeriodDAO.findByPeriodId(npWPeriod,0,1);
newProfile.setWorkPeriod(newWorkPeriod);
//Create Company Macro Objectives
List newMObjs = initProfile.get(“initMacroO”);
if (newMObjs!= null && newMObjs.size()>0){
for (Map line : newMObjs){
DetailMacroObjs macroObj = new DetailMacroObjs();
String macroOP = initProfile.get(“MOPriority”);
CommonPriority macroOPriority = commonPriorityDAO.findByPriorityId(macroOP,0,1);
macroObj.setMacroObjPriority(macroOPriority);
String macroOF = initProfile.get(“macroOFocus”);
CommonFocusTypes macroOFocus = commonFocusTypesDAO.findByFocusTypeId(macroOF,0,1);
macroObj.setMacroObjType(macroOFocus);
macroObj.setMacroObjDueDate(line.get(“MODue”));
macroObj.setMacroObjDescription(line.get(“MODesc”));
ObjList.add(macroObj);
}
newProfile.setObjectives(ObjList);
}
//Create initial Project list
List newProjects = initProfile.get(“initProjects”);
if (newProjects!= null && newProjects.size()>0){
for (Map line: newProjects){
DetailProjects projects = new DetailProjects();
String projP = initProfile.get(“pPriority”);
CommonPriority projPriority = commonPriorityDAO.findByPriorityId(projP,0,1);
projects.setProjectPriority(projPriority);
String projF = initProfile.get(“pFocus”);
CommonFocusTypes projFocus = commonFocusTypesDAO.findByFocusTypeId(projF,0,1);
projects.setProjectType(projFocus);
projects.setProjectDueDate(line.get(“pDue”));
projects.setProjectName(line.get(“pName”));
projects.setProjectDescription(line.get(“pDesc”));
ProjList.add(projects);
}
newProfile.setProjects(ProjList);
}
return newProfile;`
Could I also get a layman’s explanation about persistenceId’s?
Thank you, let me know if you need any other additional information.