AppComponent DataImport migration to V7.01

Hi @mario.md.david
I am trying to migrate the DataImport add-on from platform version 6.x to 7.01. After I have chnaged to Vaadin version 8 and run “install AppComponent”, I got two exceptions.

  1. Commons pack lang: resolved by changing it to lang3 as below:
    import org.apache.commons.lang3.StringUtils

  2. I need help in the following error:

     > Task :dataimport-global:compileGroovy FAILED
     Note: Some input files use unchecked or unsafe operations.
     Note: Recompile with -Xlint:unchecked for details.
     startup failed:
     /Users/mak/Projects/appComponents v7/cuba-component-data-import-master/modules/global/src/de/diedavids/cuba/dataimport/converter/JsonImportDataConverter.groovy: 4: unable to resolve class groovy.json.JsonSlurper
      @ line 4, column 1.
        import groovy.json.JsonSlurper
        ^
     1 error
     FAILURE: Build failed with an exception.
     * What went wrong:
     Execution failed for task ':dataimport-global:compileGroovy'.
     > Compilation failed; see the compiler error output for details.

Hi mortoza,

point 2 is related to the breaking changes in Cuba7 Release Notes http://files.cuba-platform.com/cuba/release-notes/7.0/ - see point 5

You have to manually add the groovy-all in your build.gradle file.

Unfortunately you will get the next errors after that. The groovy test files will create errors.
You can try to temporarily remove these test files - this will prevent the new errors but I’m not sure if this solves the whole migration task.

Please let us all know if you get the app component running …

CU
Steven

hi,

what do you mean by that?

As said by steven, the dependencies changed in 7.0. They have to be replaced / re-added in case of groovy.

I assume you are working on a copy of the project directly. So why don’t you just create a fork of the project on Github, try to come up with the required changes and send a pull request. That would be awesome and help all the others that want to use the plugin as well…

If you are unsure how the pull request workflow in Github works: here’s a guide on how to easily create a pull request: https://hisham.hm/2016/01/01/how-to-make-a-pull-request-on-github-a-quick-tutorial/

We can work collaboratively on the PR to make the software work properly in CUBA 7.

Bye
Mario

Hi Mario,
Thank you, that’s a good idea. I shall send pull request in github and collaborate. I’m not a Github guy but will try!

Hi,

I started updating the addon to CUBA 7. In the github repo in the master branch, the support is already merged: https://github.com/mariodavid/cuba-component-data-import

NOTE: The support only includes the “legacy” screen templates (AbstractEditor / AbstractLookup) - not the new API.

You can download it, do a local ./gradlew install and then use the 0.8.0-SNAPSHOT version in your application.

Please test it so see anything that is not working. If everything is fine, I will do the release of 0.8.0

Hi,

a long awaited release: data-import 0.8.0 is finished - CUBA Platform 7.0 support (#135), define dynamic default values (#123), all possible through the new screen mixin functionality from CUBA 7. Check it out: https://github.com/mariodavid/cuba-component-data-import

1 Like

Awesome, thank you.