Import com.vaadin.addon.charts.Chart

Hello,

I wanted to use Vaadin Charts addon with trial license but got stuck with the following error in eclipse:

“Chart cannot be resolved to a type”. I cannot import it actually…

To be mentioned that I have downloaded a trial license and put the file “vaadin.charts.developer.license” in C:\Users<my_username>"…but still the same error occurs.

I have added the license key also to Windows->Preference-Java->Installed JREs->Edit->Default VM arguments:

-Dvaadin.charts.developer.license=LICENSE_KEY_VALUE

but no success.

All the other libraries from package “com.vaadin.addon.charts.model” work but for “Chart” it does not work.

Any clue please?

Hi,
Are you sure you have this dependency in your pom.xml?

        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-charts</artifactId>
            <version>4.0.0</version>
        </dependency>

Yes, the dependency is added. I have attached also pom.xml here. Any other check-ups?
32704.xml (5.32 KB)

Any other clues?

Btw. what do you mean imports don’t work? The code does not compile? What is the compilation error output?
As you have the dependency correctly set, maybe the dependency jars are corrupted. In that case mvn dependency:purge-local-repository and building again might help.

Hi,

Thanks for the suggested solution.

Eventually, I deleted the complete .m2/repository folder and updated the project with Maven again. It seems the repository was refreshed correctly now and the importing could be performed.