+2 votes
1.0k views

Hi, I have tried to import all three Ecoinvent files (unit) into the same database to be able to switch between allocation types globally.

It worked fine for cut-off and APOS, but when trying to import consequential I allways end up with an error. Can you help me debugg this (copied from the log file):

5305325ModalContextERRORorg.openlca.core.database.ProcessDaoError while inserting Process
javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.4.v20160829-44060b6): org.eclipse.persistence.exceptions.DatabaseException 
    Internal Exception: java.sql.SQLDataException: A truncation error was encountered trying to shrink VARCHAR 'market for transport, freight, lorry with refrigeration mach&' to length 255. 
    Error Code: 20000 
    Call: INSERT INTO tbl_processes (id, default_allocation_method, description, dq_entry, infrastructure_process, last_change, last_internal_id, name, process_type, ref_id, version, f_category, f_currency, f_process_doc, f_dq_system, f_exchange_dq_system, f_location, f_quantitative_reference, f_social_dq_system) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 
     bind => [19 parameters bound] 
    Query: InsertObjectQuery(RootEntity [type=Process, refId=0926e49d-9b90-3192-a00d-5590a7db8868, name=market for transport, freight, lorry with refrigeration machine, 3.5-7.5 ton, EURO6, carbon dioxide, liquid refr(...)_13 | transport, freight, lorry with refrigeration machine, 3.5-7.5 ton, EURO6, carbon dioxide, liquid refrigerant, freezing | Consequential, U]) 
     at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:159)
 

... and alot of more information, followed by a second error saying: "Failed to import processes" 

But this later is no doubt a consequence of the first one.

I am using the precomiled openLCA 1.7.0 from your website on Arch linux distribution, if you need to know.

Thanks

in openLCA by (230 points)
edited by
by (230 points)
Here's the md5sum for my file so you can check that it isn't corrupt before you start digging:
b8fc5a659db46ac59d514bdd09b80d50  ecoinvent_34_conseq_unit

1 Answer

+2 votes
by (8.9k points)
selected by
 
Best answer
Some of the processes in the consequential database have longer names. We modified the database schema for the consequential database temporarily to support these names prior to releasing a new openLCA version, that will support longer names by default.

Therefore you will need to start with the consequential database (which supports longer names) and import APOS and cutoff into it. This way it should work.
by (230 points)
Thanks, I haven't tried yet, but it makes sense. I'll update if it don't work
...