SOLVED:
Hi, I’m running into a problem that I can’t seem to work around.
I have two JPA datasources:
- ds_employees
- ds_workplanitems
ds_employees = JPAContainerFactory.make(Employee.class,WorkforcePlanningUI.PERSISTENCE_UNIT);
ds_workplanitems = JPAContainerFactory.make(WorkPlanItem.class, WorkforcePlanningUI.PERSISTENCE_UNIT);
Both are constructed using the above JPAContainerFactories. Both have a char(10) key, and in both tables there is an entry with id=“20000022”.
If I want to retreive this record from the database, one works and one won’t:
Item employeeItem = ds_employees.getItem("20000022"); // Works
Item planItem = ds_workplanitems.getItem("20000022"); // Exception
The exception that I get is java.lang.reflect.InvocationTargetException.
I’ve tried numerous other things, like getting the first ItemId (works) en retreiving that with getItem, but to the same result. The tables in the database are not modelled differently.
Any help would be highly appreciated.