0 votes
569 views

I'm a newbie in OpenLCA and have problems creating new processes and product systems. Can anyone have a look at the log below and let me know what the problem was please? Many thanks for your help!

25645315JavaFX Application ThreadERRORorg.openlca.core.database.ProcessDaoError while inserting Process
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
in openLCA by (120 points)
by (120 points)
28462056 JavaFX Application Thread ERROR org.openlca.app.wizards.ProductSystemWizard Failed to create model
java.lang.reflect.InvocationTargetException
     at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:399)
     at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:977)
     at org.openlca.app.wizards.ProductSystemWizard.performFinish(ProductSystemWizard.java:60)
     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.editors.processes.ProcessToolbar.createSystem(ProcessToolbar.java:87)
     at org.openlca.app.editors.processes.InfoPage.lambda$0(InfoPage.java:85)
     at org.openlca.app.util.Controls$1.widgetSelected(Controls.java:64)
     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.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: java.lang.OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objects

1 Answer

0 votes
by (126k points)

Can you please validate the database? It could be that you have an error in formulas or other "strange things" in the process.

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'.

...