String userId = "user";
ServletRequest request = page.getRequest();
EntityManager em = perUtils.createEntityManager();
em.getTransaction().begin();
Exceptions exc = new Exceptions(exceptionId);
Report report = new Report(exceptionId);
exc.setReportId(report);
Stacktrace stack = new Stacktrace(Utils.getNextId(Stacktrace.class));
Logfile logfile = new Logfile(userId, 0);
ProductVersion pVersion = new ProductVersion(Utils.getNextId(ProductVersion.class));
pVersion.setProductVersion("pVersion");
Nbversion version = new Nbversion(Utils.getNextId(Nbversion.class));
version.setVersion("version");
pVersion.setNbversionId(version);
logfile.setProductVersionId(pVersion);
exc.setLogfileId(logfile);
exc.setStacktrace(stack);
em.persist(version);
em.persist(pVersion);
em.persist(logfile);
em.persist(report);
em.persist(stack);