Documentation

Documentation versions (currently viewingVaadin 23)

You are viewing documentation for Vaadin 23. View latest documentation

License Validation and Troubleshooting

How commercial product license validation works, and how to get and use license keys.

Vaadin core includes an extensive set of technologies and components that are free to use. Vaadin core is available under the terms of the Apache License 2.0, which allows you to use the included technologies and components in any project, even commercially. Vaadin 23.5.0 and later versions in the 23.x series are in an extended commercial maintenance phase.

You need a commercial license only if you use one of the commercial components (such as, Vaadin Charts), tools (such as, Vaadin TestBench), or an extended commercial maintenance version. If your project includes such components, tools, or versions, a commercial license is needed for development and to build the production application.

In general, you don’t need a license after deploying an application to production. The only exception is Collaboration Kit, which requires a license for production use, and it’s priced per end user. See Collaboration Kit documentation for details.

License Validation on a Local Machine

On a local machine, the licenses for commercial components and tools are checked automatically using your Vaadin account. The first time you use a commercial component or tool, you are asked to log in to vaadin.com to validate your license.

Once validated, you can continue developing your project. Under the hood, a license key is created on your machine in the following location:

Source code
filesystem
%userprofile%\.vaadin\proKey
filesystem
filesystem
filesystem

Offline License Key

If your local development environment is offline and can’t reach vaadin.com, you need to download an offline license key.

Each offline license key is tied to a machine ID, in the form of mid-xxxxxxxx-xxxxxxxx (legacy) or mid2-xxxxxxxx-xxxxxxxx (the V2 key), that you submit to vaadin.com/myaccount/licenses to download an offline license key.

Once you have downloaded the offlineKey or offlineKeyV2 file (remove any .txt suffix), you should place it in your home directory:

Source code
filesystem
%userprofile%\.vaadin\offlineKey
%userprofile%\.vaadin\offlineKeyV2
filesystem
filesystem
filesystem
Note

Vaadin 23.6.12 adds support for the mid2/offlineKeyV2 key format. Earlier 23.x versions support only the legacy mid/offlineKey format. Versions that support the V2 key still also accept the legacy key.

Machine ID

You can find your machine ID in the logs when you try to use a commercial component or tool offline without an existing license key. On Vaadin 23.6.12 and later, the logs show a mid2 machine ID; the command below prints the legacy mid.

You can also get your machine ID by running the following commands on your machine:

Source code
terminal
mvn dependency:get -Dartifact=com.vaadin:license-checker-machineid:1.8.1
java -jar %userprofile%\.m2\repository\com\vaadin\license-checker-machineid\1.8.1\license-checker-machineid-1.8.1.jar
terminal
terminal
terminal

License Validation on a CI/CD or Build Server

For CI/CD/build servers, you need to download a server license key. Server license keys can only be used for production builds. You can download a server license key (an offlineKey file) from vaadin.com/myaccount/licenses.

You should place the offlineKey file in the home directory of the CI server:

Source code
filesystem
%userprofile%\.vaadin\offlineKey
filesystem
filesystem
filesystem

You can also give the license key using the vaadin.offlineKey system property or the VAADIN_OFFLINE_KEY environment variable. Copy the license key string value from the offlineKey file.

Source code
terminal
mvn -Dvaadin.offlineKey=[contents of offlineKey file here] ...
terminal
terminal
terminal

Validation on Production Server

Applications built using the newer Vaadin Extended Maintenance releases will also check the license key when the application starts in production mode. If the license key is not found, or if the check fails due to an expired key, or if the key does not include Extended Maintenance access, an error will be logged. This is not a blocking license check, so the application will still start. When you provide a valid license key by using the vaadin.offlineKey system property or the VAADIN_OFFLINE_KEY environment variable, the error will not be logged.

Vaadin Enterprise Edition releases check the license key when the application starts in production mode. This runtime check accepts a server license key, and a distribution key embedded in the application. A key that allows only development is rejected.

Distribution Key

If you ship an application built with Vaadin to your own customers, who run it on their own servers, you can embed a distribution key in the application. The application then passes runtime license checks without your customers having to install a license key.

Distribution keys aren’t available for download from your Vaadin account. Vaadin issues them on request, for subscriptions that cover shipping applications to your own customers. To request a key, contact your Vaadin account manager or customer success manager, or contact Vaadin if you don’t have one. If you run the application only on your own servers, you don’t need a distribution key; use a server license key instead.

A distribution key works differently from the other license keys:

  • It’s only valid for running an application. Development and production builds ignore it, and behave as if no key were present, so you still need a license key of your own to build the application.

  • It’s only read from inside the application. A distribution key placed in the .vaadin directory, or given in the vaadin.offlineKey system property or the VAADIN_OFFLINE_KEY environment variable, is ignored. This way, a key in your test environment can’t hide that the key is missing from the application you ship.

  • It isn’t tied to a machine ID, so the application runs on any server.

  • It’s validated offline only. The application never contacts vaadin.com to validate it, so it runs on servers without internet access.

To embed the key, add the key file to the application as a resource at META-INF/vaadin-distribution-key. This is a file, not a directory, and the name is case-sensitive. In a Maven or Gradle project, place the file here:

Source code
filesystem
src/main/resources/META-INF/vaadin-distribution-key

When the application starts and validates the key, it logs which license it’s using:

Source code
text
Using distribution license registered to Example Corp.

The message names only the account that the key is registered to, because your customers can read the application logs. For the same reason, the application doesn’t log renewal reminders for a distribution key. To replace a key that’s about to expire, embed a new key and ship a new version of the application.

Tip

A server license key also passes runtime checks, and is used before the distribution key. To verify that the distribution key is included in the application you ship, run the application on a machine that has no other license key, and check the log message above.

Troubleshooting

I Get A Trial Message Although I Have A Valid License

Verify that you have a valid license by going to vaadin.com/pro/validate-license. If not, either your company’s license administrator hasn’t yet assigned a seat for you, or the license is no longer valid.

SSLHandshakeException with Multiplatform Runtime

This is a known error in SSLHandshakeException reported by users of WebSphere Liberty and WildFly in Docker. See the following discussion for more details: vaadin.com/forum/t/running-mpr-project-on-websphere-liberty-fails-with-suncertpathbuilderexcep/160675.

I See "Detected an Offline License Version 1, but Version 2 is Required"

In Vaadin 23.6.12 and later, this message can appear even when you have a valid version 1 offline key (mid-xxxxxxxx-xxxxxxxx) installed. It’s shown when the License Checker can’t compute this machine’s version 1 machine ID.

The mid machine ID is derived from hardware details through the OSHI library and its native JNA component. If the JNA native library (for example, jna.dll on Windows) is blocked — commonly by antivirus or endpoint-security software — or otherwise fails to load, the version 1 machine ID can’t be generated, and this message is shown instead of the real error.

Re-run the build with debug logging (mvn -X or ./gradlew --debug) and look for a Failed to generate v1 Machine ID entry to confirm the cause. Then either resolve the JNA or native-library problem, or switch to a version 2 offline key (mid2-xxxxxxxx-xxxxxxxx), which doesn’t rely on OSHI or JNA — download it from vaadin.com/myaccount/licenses.

I See "Ignoring the Distribution Key Found in …​"

This message means that a distribution key was placed in the .vaadin directory, or given in the vaadin.offlineKey system property or the VAADIN_OFFLINE_KEY environment variable. A distribution key is only used when it’s embedded in the application, at META-INF/vaadin-distribution-key. Move the key there, and use a server license key for builds.

See Distribution Key for details.

You can contact license@vaadin.com for further help.

D56655EB-4310-49FF-8A81-E790235E1420