Data Import - can't save unique configuration

Hello,

I’m having trouble saving a configuration on that data import add-on. I get the following exception thrown after I select to save configuration for later reuse and then start the import (full log of the error is also attached):

com.haulmont.cuba.core.sys.ServiceInterceptor - Exception:
java.lang.IllegalStateException: During synchronization a new object was found through a relationship that was not marked cascade PERSIST: de.diedavids.cuba.dataimport.entity.UniqueConfiguration-634a9785-664f-e78d-e42f-96317c3bc974 [new]

serverLogDataImport.txt (22.6 KB)

I’m using platform version 7.0.4, is anyone else having this issue?

Thanks,
Chris

Hi,

i just gave it a try. For me everything worked:

50

Can you elaborate a little more when the error occured?

Bye
Mario

Hi,

Sorry for the late reply,

It looks like it should be working, I created a test project and made sure the add on link was right when adding it to the project this time and still got the same error. I’m not sure what may be going wrong, all I’m doing is going to the import wizard and following these steps
1.) select the file to upload (an excel file)
2.) select the test entity I created
3.) set it to direct attribute for type
4.) set the transaction strategy to per entity
5.) go to the unique configurations tab and create a policy to update existing entity
6.) go to the save configuration tab to check in the box to save for later use
7.) start the import
8.) import works until I click okay to finish the process which is when the error comes up

Here is my test project: DataImportTest.zip (381.7 KB)

Thanks,
Chris

Hi,

I got it to work, if I don’t create a unique configuration in the import wizard but still save for reuse then create the unique configurations I need after, it works.

Thanks,
Chris

Hi,

you are right, it is a bug. I just tried it not for the complete import wizard.

I created an issue here:

Hi,

Its resolved and once 0.9.0 is out (the next days) it should be gone.

Bye
Mario

Hi,

I’ve opened issue #146 before reading this thread. Seems to be same problem (save config).

Bye, Stef.

Hi @mario,

I got the same error at saving the configuration, but since I have my CUBA project at platform v 6.10.15, I can’t use data import version 0.9. Is there any chance to have this issue fixed for the 6.10 version too ? CUBA studio does not allow me to use any other version.

Thanks !!!

Alejandro

Hi @arapoport,

i’m not going to create a patch for the 6.x version. If you use it the way I showed above the import wizard should be fine: Data Import - can't save unique configuration - #2 от пользователя mario - CUBA.Platform

If you really need it, you can look at the changes I did fix unique configuration save in import wizard by mariodavid · Pull Request #139 · mariodavid/cuba-component-data-import · GitHub and pick and override the behavior in your project.

Studio only shows versions of the addons that match the CUBA version you are using in your application.

Cheers
Mario

1 Like

Great, it is enough with that workaround.

Hi @mario, I’ve just tried the latest version of the Data Import add-on (0.14.1), and I have the same error (constraint violation).
Maybe a regression?
I’ll investigate further, but I wanted to ask if you are already aware of this or not (the related issue is closed on GH, so maybe it’s a recent regression).

Thx
P.