javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.3.v20180807-4be1041): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.apache.derby.shared.common.error.DerbySQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL181210195635090' defined on 'TBL_EXCHANGES'. Error Code: 20000 Call: INSERT INTO tbl_exchanges (id, resulting_amount_value, resulting_amount_formula, base_uncertainty, cost_formula, cost_value, f_default_provider, description, dq_entry, internal_id, avoided_product, is_input, distribution_type, parameter1_formula, parameter2_formula, parameter3_formula, parameter1_value, parameter2_value, parameter3_value, f_currency, f_flow, f_flow_property_factor, f_unit) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) bind => [23 parameters bound] Query: InsertObjectQuery(Exchange [flow=RootEntity [type=Flow, refId=7aba10a1-53bc-431d-9da6-8aaa526f43a8, name=Polyethylene terephthalate compound (PET)], input=false,amount=1.0, unit=Unit [id=1048, name=kg]]) at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:161) at org.openlca.core.database.BaseDao.insert(BaseDao.java:160) at org.openlca.core.database.RootEntityDao.insert(RootEntityDao.java:35) at org.openlca.core.database.RootEntityDao.insert(RootEntityDao.java:23) at org.openlca.app.wizards.AbstractWizard.performFinish(AbstractWizard.java:57) at org.openlca.app.wizards.ProcessWizard.performFinish(ProcessWizard.java:1) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:775) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:414) at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:622) at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3944) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3547) at org.eclipse.jface.window.Window.runEventLoop(Window.java:823) at org.eclipse.jface.window.Window.open(Window.java:799) at org.openlca.app.navigation.actions.CreateModelAction.run(CreateModelAction.java:81) at org.eclipse.jface.action.Action.runWithEvent(Action.java:474) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:568) at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:400) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3944) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3547) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:566) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.openlca.app.rcp.RcpApplication.start(RcpApplication.java:16) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:661) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597) at org.eclipse.equinox.launcher.Main.run(Main.java:1476) Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.3.v20180807-4be1041): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.apache.derby.shared.common.error.DerbySQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL181210195635090' defined on 'TBL_EXCHANGES'. Error Code: 20000 |