License for Vaadin TouchKit 4 not found (Windows 8)

Hi,

I recently ran into a problem, I can’t get me head around. Maybe one of you is able to help me.

I am using Vaadin 7.3.0 and furthermore the Vaadin Touchkit 4.0.0 rc1. Unfortunately I am not able to compile
the project anymore, getting the following error:

“License for Vaadin TouchKit 4 not found”


This only happens on my Windows 8 machine (not on mac).

Things I have tried to solve the problem:

  • add the licence file to my home directory "C:\Users\Stefan" (same path that I get with System.getProperty(“user.home”))
  • manually set the key as a System property
  • add the licence key as a parameter for Maven (-Dvaadin.touchkit.developer.license=LICENSE_CODE_HERE)

Nothing seems to help, and I hope to not be alone with this problem… I am very gratefull for anyone to push me in the right direction. Is there anything I might have missed?

Thank you very much!

Kind Regards,
Stefan

This is happening for us to! I was about to create a support ticket for it, but I was going to post to the forums, but you beat me to it. If we don’t get a reponse about this over the weekend, I will create a ticket for it.

Me too, except I’m on a mac, Eclipse Luna, Tomcat 8. This method was used to register the keys:

    // license keys
    public static void setLicenseKeys() {
        System.setProperty("vaadin.charts.developer.license", " -- my chart key -- ");
        System.setProperty("vaadin.touchkit.developer.license", " -- my touchkit key -- ");
        Logger.getGlobal().log(Level.INFO, "*** FOSS *** The license keys have been registered" );
    }

The logs say that the static method is being run when the webapp starts:

Sep 07, 2014 8:22:09 PM ca.demy.common.CommonConstants setLicenseKeys
INFO: *** FOSS *** The license keys have been registered

But trying to compile the widgetset results in:

----------------------------------------------------------------------------------------------------------------------
License for Vaadin TouchKit 4 not found. Go to vaadin.com/pro for more details.
----------------------------------------------------------------------------------------------------------------------

Charts work, recognizing the key OK, but touchkit 4.0.0.rc1 doesn’t. I haven’t tried adding the keys to the home directory because the in-code method is more convient in my use case.

So at least we know that it is not a Windows only problem. Unfortunately I did not find a solution over the weekend…

Hi,

System.setProperty("vaadin.charts.developer.license", " -- my chart key -- "); Regarding this one: The license check logic on TouchKit 4 has been changed so that it is
compile time
(instead of runtime). This makes more sense, but unfotunately the above in-code method does not work anymore. I suggest to put the code into home directory instead.

Hi,

Adding the licence file to home directory doesn’t work for me either, if that is what you mean.

Hmm, ok. That is what I ment. Does it give a different error or is it still the same problem?

Yes, the problem is still the same. As I stated in my original post above, I tried all possibilities, mentioned here https://vaadin.com/directory/help/installing-cval-license

I’m not realy sure why vaadin does not find the licence file in my home directory. Might it be a language mapping problem?
My home directory is “C:\Benutzer\Stefan” which
should
automatically be mapped to the english path “C:\Users\Stefan”.

@Sami. Putting the license in the users home directory is going to be a major pain for us as we have a very large development team. This issue is stopping us from upgrading to Vaadin 7.3.

By the way, I did try to add the license file to my users home directory on Windows 7 and it is still not working.

-Dan

Sorry to hear that. However, I talked to the product team and they are investigating the options. Sounds like Win7 issue plus that the license code installation into CI build system (Ant and Maven at least).

Will it help you guys if I open a ticket?

I can confirm that placing the license key in the home folder works on my mac. But I would value a key put somewhere in the WAR file, either in the Java code or on the project classpath. Placing various hidden files in each of the development, staging and deployment machines presents a maintenance vulnerability, as the files are subject to being forgotten or mishandled over time.

Thank you very much for your input, gentlemen! We will be fixing the issue on windows ASAP.

As for having the license key in the source code, here are the reasons for us not supporting that any more:

  • License keys are private, one per developer. Having them published in the source code, means that everyone on the team probably uses the same license key, when all are required to have their own key.
  • There is a risk that the license keys end up in public source code repositories
  • It’s harder to actually replace a license key committed to SCM with your own personal key

Basically it is hard to keep license keys private when you embed them in source code. This is a problem for us.

The current solution is that we allow you to provide the license key as a system property by defining it on the command line. So the basic use cases are

  • Developers place their own private keys in their home directories
  • On the CI server, the license key is given as a parameter to the build (passed in on the command line with -Dxxxx.developer.license=yyyy)

Hope this explains our decisions a bit better. I’ll happily discuss this more and gladly accept any improvement ideas!
/Jonatan

I have verified the issue, the workaround until we fix it in a new vaadin release is to set the license key via System.property:
-Dvaadin.touchkit.developer.license=xxxx

If you use maven to compile, you cannot set the system property with the -D parameter in the mvn command line but using the extraJvmArgs property in the pom.xml file, because maven forks when running vaadin plugin to compile your widgetset:

    <plugin>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-maven-plugin</artifactId>
            <configuration>
                ...
                <extraJvmArgs>-Xmx1024M -Dvaadin.touchkit.developer.license=XXX</extraJvmArgs>
            </configuration>
            ...
    </plugin>

or

  mvn -Dgwt.extraJvmArgs="-Dvaadin.touchkit.developer.license=XXX" clean package