kandi background
Explore Kits

license-check | Make sure your Maven dependencies | Build Tool library

 by   mrice Java Version: Current License: MIT

 by   mrice Java Version: Current License: MIT

Download this library from

kandi X-RAY | license-check Summary

license-check is a Java library typically used in Utilities, Build Tool, Maven applications. license-check has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. However license-check has 3 bugs. You can download it from GitHub, Maven.
Current version: 0.5.3 (Sep 5, 2015). License-check looks at each dependency and runs a query against your Maven respository to see if the dependency declares a license that it recognizes. If not, then your build will fail. (Don’t worry if you’re hoping for a different result, there’s a way around this if your dependency isn’t clear on its licensing. See the configuration options below.). Isn’t there already something like this?.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • license-check has a low active ecosystem.
  • It has 32 star(s) with 20 fork(s). There are 2 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 13 open issues and 4 have been closed. On average issues are closed in 200 days. There are 10 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of license-check is current.
license-check Support
Best in #Build Tool
Average in #Build Tool
license-check Support
Best in #Build Tool
Average in #Build Tool

quality kandi Quality

  • license-check has 3 bugs (1 blocker, 0 critical, 2 major, 0 minor) and 26 code smells.
license-check Quality
Best in #Build Tool
Average in #Build Tool
license-check Quality
Best in #Build Tool
Average in #Build Tool

securitySecurity

  • license-check has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • license-check code analysis shows 0 unresolved vulnerabilities.
  • There are 1 security hotspots that need review.
license-check Security
Best in #Build Tool
Average in #Build Tool
license-check Security
Best in #Build Tool
Average in #Build Tool

license License

  • license-check is licensed under the MIT License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
license-check License
Best in #Build Tool
Average in #Build Tool
license-check License
Best in #Build Tool
Average in #Build Tool

buildReuse

  • license-check releases are not available. You will need to build from source code and install.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • It has 546 lines of code, 21 functions and 4 files.
  • It has high code complexity. Code complexity directly impacts maintainability of the code.
license-check Reuse
Best in #Build Tool
Average in #Build Tool
license-check Reuse
Best in #Build Tool
Average in #Build Tool
Top functions reviewed by kandi - BETA

kandi has reviewed license-check and discovered the below as its top functions. This is intended to give you an instant insight into license-check implemented functionality, and help decide if they suit your requirements.

  • Executes the mojo .
    • Load the licenses .
      • Recursive method to find the license name for the given artifact .
        • Read the pom contents from a file .
          • Retrieve an artifact .
            • Sets the Code .
              • Gets the status code .
                • Gets the license name
                  • Set the license name
                    • Gets the regular expression .

                      Get all kandi verified functions for this library.

                      Get all kandi verified functions for this library.

                      license-check Key Features

                      Make sure your Maven dependencies have declared, recognized open source licenses

                      default

                      copy iconCopydownload iconDownload
                      For now, **license-check** just checks to make sure that your Maven dependencies have a license declared in their POM
                      files and that you aren't including a license on your project's blacklist. There's more on the horizon but this is an
                      early release.
                      
                      How it works

                      How to use Vaadin FLOW server-push with Spring Boot

                      copy iconCopydownload iconDownload
                      Found app shell configuration annotations in non `AppShellConfigurator` classes.
                      Please create a custom class implementing `AppShellConfigurator` and move the following annotations to it:
                        - @Push from net.cbsolution.chameleon.ui.views.AlertView
                      

                      Parse JSON to multiple Typescript objects

                      copy iconCopydownload iconDownload
                      for (const value of Object.values(data)) {
                        this.dataSource.data.push(this.encodeLicenseData(value));
                      }
                      
                      interface Package {
                        licenses: string;
                        repository: string;
                        publisher: string;
                        name: string;
                        version: string;
                        description: string;
                        licenseFile: string;
                        licenseText: string;
                        path: string;
                      }
                      
                      interface PackageMap {
                        [key:string]: Package
                      }
                      
                      const data: PackageMap = JSON.parse(json); // Assume json refers to your data structure
                      const keys: string[] = Object.keys(data);
                      
                      keys.forEach(key => console.log(key, data[key]));
                      
                      interface Package {
                        licenses: string;
                        repository: string;
                        publisher: string;
                        name: string;
                        version: string;
                        description: string;
                        licenseFile: string;
                        licenseText: string;
                        path: string;
                      }
                      
                      interface PackageMap {
                        [key:string]: Package
                      }
                      
                      const data: PackageMap = JSON.parse(json); // Assume json refers to your data structure
                      const keys: string[] = Object.keys(data);
                      
                      keys.forEach(key => console.log(key, data[key]));
                      

                      Automating the license checking in gitlab CI/CD pipeline

                      copy iconCopydownload iconDownload
                        "scripts": {
                          "start": "...",
                          "build": "...",
                          "validate_licenses": " node validate_licenses.js"
                        }
                      
                      npm run validate_licenses
                      
                      const { exec } = require("child_process");
                      const license_checker = require('license-checker')
                      var fs = require('fs');
                      
                      exec("license-checker --json > ./license.json", (error, stdout, stderr) => {
                          if (error) {
                              console.log(`error: ${error.message}`);  return;
                          }
                          if (stderr) {
                              console.log(`stderr: ${stderr}`);return;
                          }
                          console.log(`json created`);
                          parseJsonLicenses();
                      });
                      
                      function parseJsonLicenses(){
                        var licenses = JSON.parse(fs.readFileSync('/license.json', 'utf8'));
                        //iterate licenses and fail if exist one licence differet of MIT
                        for(var npmModule in licenses){
                         if(licenses[npmModule].licenses != 'MIT')
                           throw new Error(npmModule+' has a not allowed license');
                        }  
                      }
                      
                      var checker = require('license-checker');
                      var config = {
                        start: '.' ,
                        onlyAllow: 'MIT'
                      };
                      checker.init(config, function(json, err) {
                          if (err) {
                              throw new Error(err);
                          } else {
                              console.log (JSON.stringify (json))
                          }
                      });
                      
                      Package "@csstools/convert-colors@1.4.0" is licensed under "CC0-1.0" which is not permitted by the --onlyAllow flag. Exiting.
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - ./validate_licenses.sh
                      
                      > license-checker --summary
                      
                      ├─ MIT: 949
                      ├─ ISC: 115
                      ├─ BSD-2-Clause: 24
                      ├─ CC0-1.0: 23
                      ├─ BSD-3-Clause: 18
                      ├─ Apache-2.0: 18
                      ├─ CC-BY-4.0: 2
                      ├─ BSD*: 2
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - node validate_licenses.js
                      
                        "scripts": {
                          "start": "...",
                          "build": "...",
                          "validate_licenses": " node validate_licenses.js"
                        }
                      
                      npm run validate_licenses
                      
                      const { exec } = require("child_process");
                      const license_checker = require('license-checker')
                      var fs = require('fs');
                      
                      exec("license-checker --json > ./license.json", (error, stdout, stderr) => {
                          if (error) {
                              console.log(`error: ${error.message}`);  return;
                          }
                          if (stderr) {
                              console.log(`stderr: ${stderr}`);return;
                          }
                          console.log(`json created`);
                          parseJsonLicenses();
                      });
                      
                      function parseJsonLicenses(){
                        var licenses = JSON.parse(fs.readFileSync('/license.json', 'utf8'));
                        //iterate licenses and fail if exist one licence differet of MIT
                        for(var npmModule in licenses){
                         if(licenses[npmModule].licenses != 'MIT')
                           throw new Error(npmModule+' has a not allowed license');
                        }  
                      }
                      
                      var checker = require('license-checker');
                      var config = {
                        start: '.' ,
                        onlyAllow: 'MIT'
                      };
                      checker.init(config, function(json, err) {
                          if (err) {
                              throw new Error(err);
                          } else {
                              console.log (JSON.stringify (json))
                          }
                      });
                      
                      Package "@csstools/convert-colors@1.4.0" is licensed under "CC0-1.0" which is not permitted by the --onlyAllow flag. Exiting.
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - ./validate_licenses.sh
                      
                      > license-checker --summary
                      
                      ├─ MIT: 949
                      ├─ ISC: 115
                      ├─ BSD-2-Clause: 24
                      ├─ CC0-1.0: 23
                      ├─ BSD-3-Clause: 18
                      ├─ Apache-2.0: 18
                      ├─ CC-BY-4.0: 2
                      ├─ BSD*: 2
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - node validate_licenses.js
                      
                        "scripts": {
                          "start": "...",
                          "build": "...",
                          "validate_licenses": " node validate_licenses.js"
                        }
                      
                      npm run validate_licenses
                      
                      const { exec } = require("child_process");
                      const license_checker = require('license-checker')
                      var fs = require('fs');
                      
                      exec("license-checker --json > ./license.json", (error, stdout, stderr) => {
                          if (error) {
                              console.log(`error: ${error.message}`);  return;
                          }
                          if (stderr) {
                              console.log(`stderr: ${stderr}`);return;
                          }
                          console.log(`json created`);
                          parseJsonLicenses();
                      });
                      
                      function parseJsonLicenses(){
                        var licenses = JSON.parse(fs.readFileSync('/license.json', 'utf8'));
                        //iterate licenses and fail if exist one licence differet of MIT
                        for(var npmModule in licenses){
                         if(licenses[npmModule].licenses != 'MIT')
                           throw new Error(npmModule+' has a not allowed license');
                        }  
                      }
                      
                      var checker = require('license-checker');
                      var config = {
                        start: '.' ,
                        onlyAllow: 'MIT'
                      };
                      checker.init(config, function(json, err) {
                          if (err) {
                              throw new Error(err);
                          } else {
                              console.log (JSON.stringify (json))
                          }
                      });
                      
                      Package "@csstools/convert-colors@1.4.0" is licensed under "CC0-1.0" which is not permitted by the --onlyAllow flag. Exiting.
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - ./validate_licenses.sh
                      
                      > license-checker --summary
                      
                      ├─ MIT: 949
                      ├─ ISC: 115
                      ├─ BSD-2-Clause: 24
                      ├─ CC0-1.0: 23
                      ├─ BSD-3-Clause: 18
                      ├─ Apache-2.0: 18
                      ├─ CC-BY-4.0: 2
                      ├─ BSD*: 2
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - node validate_licenses.js
                      
                        "scripts": {
                          "start": "...",
                          "build": "...",
                          "validate_licenses": " node validate_licenses.js"
                        }
                      
                      npm run validate_licenses
                      
                      const { exec } = require("child_process");
                      const license_checker = require('license-checker')
                      var fs = require('fs');
                      
                      exec("license-checker --json > ./license.json", (error, stdout, stderr) => {
                          if (error) {
                              console.log(`error: ${error.message}`);  return;
                          }
                          if (stderr) {
                              console.log(`stderr: ${stderr}`);return;
                          }
                          console.log(`json created`);
                          parseJsonLicenses();
                      });
                      
                      function parseJsonLicenses(){
                        var licenses = JSON.parse(fs.readFileSync('/license.json', 'utf8'));
                        //iterate licenses and fail if exist one licence differet of MIT
                        for(var npmModule in licenses){
                         if(licenses[npmModule].licenses != 'MIT')
                           throw new Error(npmModule+' has a not allowed license');
                        }  
                      }
                      
                      var checker = require('license-checker');
                      var config = {
                        start: '.' ,
                        onlyAllow: 'MIT'
                      };
                      checker.init(config, function(json, err) {
                          if (err) {
                              throw new Error(err);
                          } else {
                              console.log (JSON.stringify (json))
                          }
                      });
                      
                      Package "@csstools/convert-colors@1.4.0" is licensed under "CC0-1.0" which is not permitted by the --onlyAllow flag. Exiting.
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - ./validate_licenses.sh
                      
                      > license-checker --summary
                      
                      ├─ MIT: 949
                      ├─ ISC: 115
                      ├─ BSD-2-Clause: 24
                      ├─ CC0-1.0: 23
                      ├─ BSD-3-Clause: 18
                      ├─ Apache-2.0: 18
                      ├─ CC-BY-4.0: 2
                      ├─ BSD*: 2
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - node validate_licenses.js
                      
                        "scripts": {
                          "start": "...",
                          "build": "...",
                          "validate_licenses": " node validate_licenses.js"
                        }
                      
                      npm run validate_licenses
                      
                      const { exec } = require("child_process");
                      const license_checker = require('license-checker')
                      var fs = require('fs');
                      
                      exec("license-checker --json > ./license.json", (error, stdout, stderr) => {
                          if (error) {
                              console.log(`error: ${error.message}`);  return;
                          }
                          if (stderr) {
                              console.log(`stderr: ${stderr}`);return;
                          }
                          console.log(`json created`);
                          parseJsonLicenses();
                      });
                      
                      function parseJsonLicenses(){
                        var licenses = JSON.parse(fs.readFileSync('/license.json', 'utf8'));
                        //iterate licenses and fail if exist one licence differet of MIT
                        for(var npmModule in licenses){
                         if(licenses[npmModule].licenses != 'MIT')
                           throw new Error(npmModule+' has a not allowed license');
                        }  
                      }
                      
                      var checker = require('license-checker');
                      var config = {
                        start: '.' ,
                        onlyAllow: 'MIT'
                      };
                      checker.init(config, function(json, err) {
                          if (err) {
                              throw new Error(err);
                          } else {
                              console.log (JSON.stringify (json))
                          }
                      });
                      
                      Package "@csstools/convert-colors@1.4.0" is licensed under "CC0-1.0" which is not permitted by the --onlyAllow flag. Exiting.
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - ./validate_licenses.sh
                      
                      > license-checker --summary
                      
                      ├─ MIT: 949
                      ├─ ISC: 115
                      ├─ BSD-2-Clause: 24
                      ├─ CC0-1.0: 23
                      ├─ BSD-3-Clause: 18
                      ├─ Apache-2.0: 18
                      ├─ CC-BY-4.0: 2
                      ├─ BSD*: 2
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - node validate_licenses.js
                      
                        "scripts": {
                          "start": "...",
                          "build": "...",
                          "validate_licenses": " node validate_licenses.js"
                        }
                      
                      npm run validate_licenses
                      
                      const { exec } = require("child_process");
                      const license_checker = require('license-checker')
                      var fs = require('fs');
                      
                      exec("license-checker --json > ./license.json", (error, stdout, stderr) => {
                          if (error) {
                              console.log(`error: ${error.message}`);  return;
                          }
                          if (stderr) {
                              console.log(`stderr: ${stderr}`);return;
                          }
                          console.log(`json created`);
                          parseJsonLicenses();
                      });
                      
                      function parseJsonLicenses(){
                        var licenses = JSON.parse(fs.readFileSync('/license.json', 'utf8'));
                        //iterate licenses and fail if exist one licence differet of MIT
                        for(var npmModule in licenses){
                         if(licenses[npmModule].licenses != 'MIT')
                           throw new Error(npmModule+' has a not allowed license');
                        }  
                      }
                      
                      var checker = require('license-checker');
                      var config = {
                        start: '.' ,
                        onlyAllow: 'MIT'
                      };
                      checker.init(config, function(json, err) {
                          if (err) {
                              throw new Error(err);
                          } else {
                              console.log (JSON.stringify (json))
                          }
                      });
                      
                      Package "@csstools/convert-colors@1.4.0" is licensed under "CC0-1.0" which is not permitted by the --onlyAllow flag. Exiting.
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - ./validate_licenses.sh
                      
                      > license-checker --summary
                      
                      ├─ MIT: 949
                      ├─ ISC: 115
                      ├─ BSD-2-Clause: 24
                      ├─ CC0-1.0: 23
                      ├─ BSD-3-Clause: 18
                      ├─ Apache-2.0: 18
                      ├─ CC-BY-4.0: 2
                      ├─ BSD*: 2
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - node validate_licenses.js
                      
                        "scripts": {
                          "start": "...",
                          "build": "...",
                          "validate_licenses": " node validate_licenses.js"
                        }
                      
                      npm run validate_licenses
                      
                      const { exec } = require("child_process");
                      const license_checker = require('license-checker')
                      var fs = require('fs');
                      
                      exec("license-checker --json > ./license.json", (error, stdout, stderr) => {
                          if (error) {
                              console.log(`error: ${error.message}`);  return;
                          }
                          if (stderr) {
                              console.log(`stderr: ${stderr}`);return;
                          }
                          console.log(`json created`);
                          parseJsonLicenses();
                      });
                      
                      function parseJsonLicenses(){
                        var licenses = JSON.parse(fs.readFileSync('/license.json', 'utf8'));
                        //iterate licenses and fail if exist one licence differet of MIT
                        for(var npmModule in licenses){
                         if(licenses[npmModule].licenses != 'MIT')
                           throw new Error(npmModule+' has a not allowed license');
                        }  
                      }
                      
                      var checker = require('license-checker');
                      var config = {
                        start: '.' ,
                        onlyAllow: 'MIT'
                      };
                      checker.init(config, function(json, err) {
                          if (err) {
                              throw new Error(err);
                          } else {
                              console.log (JSON.stringify (json))
                          }
                      });
                      
                      Package "@csstools/convert-colors@1.4.0" is licensed under "CC0-1.0" which is not permitted by the --onlyAllow flag. Exiting.
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - ./validate_licenses.sh
                      
                      > license-checker --summary
                      
                      ├─ MIT: 949
                      ├─ ISC: 115
                      ├─ BSD-2-Clause: 24
                      ├─ CC0-1.0: 23
                      ├─ BSD-3-Clause: 18
                      ├─ Apache-2.0: 18
                      ├─ CC-BY-4.0: 2
                      ├─ BSD*: 2
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - node validate_licenses.js
                      
                        "scripts": {
                          "start": "...",
                          "build": "...",
                          "validate_licenses": " node validate_licenses.js"
                        }
                      
                      npm run validate_licenses
                      
                      const { exec } = require("child_process");
                      const license_checker = require('license-checker')
                      var fs = require('fs');
                      
                      exec("license-checker --json > ./license.json", (error, stdout, stderr) => {
                          if (error) {
                              console.log(`error: ${error.message}`);  return;
                          }
                          if (stderr) {
                              console.log(`stderr: ${stderr}`);return;
                          }
                          console.log(`json created`);
                          parseJsonLicenses();
                      });
                      
                      function parseJsonLicenses(){
                        var licenses = JSON.parse(fs.readFileSync('/license.json', 'utf8'));
                        //iterate licenses and fail if exist one licence differet of MIT
                        for(var npmModule in licenses){
                         if(licenses[npmModule].licenses != 'MIT')
                           throw new Error(npmModule+' has a not allowed license');
                        }  
                      }
                      
                      var checker = require('license-checker');
                      var config = {
                        start: '.' ,
                        onlyAllow: 'MIT'
                      };
                      checker.init(config, function(json, err) {
                          if (err) {
                              throw new Error(err);
                          } else {
                              console.log (JSON.stringify (json))
                          }
                      });
                      
                      Package "@csstools/convert-colors@1.4.0" is licensed under "CC0-1.0" which is not permitted by the --onlyAllow flag. Exiting.
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - ./validate_licenses.sh
                      
                      > license-checker --summary
                      
                      ├─ MIT: 949
                      ├─ ISC: 115
                      ├─ BSD-2-Clause: 24
                      ├─ CC0-1.0: 23
                      ├─ BSD-3-Clause: 18
                      ├─ Apache-2.0: 18
                      ├─ CC-BY-4.0: 2
                      ├─ BSD*: 2
                      
                      test:
                          stage: test
                          script:
                              - echo 'starting licenses validation'
                              - node validate_licenses.js
                      

                      How to print the licenses used in my project using Go Modules?

                      copy iconCopydownload iconDownload
                      go get -v github.com/google/go-licenses
                      go build github.com/google/go-licenses
                      ./go-licenses csv .
                      
                      package main
                      
                      import (
                          "encoding/json"
                          "fmt"
                          log "github.com/sirupsen/logrus"
                      )
                      
                      func main() {
                          log.Warn("Warn")
                          foo := make(map[string]bool)
                          foo["bar"] = true
                          j, _ := json.MarshalIndent(foo, " ", " ")
                          fmt.Println(string(j))
                      }
                      
                      me@dattan:~/testing/blabla$ go mod init example.com/test
                      go: creating new go.mod: module example.com/test
                      me@dattan:~/testing/blabla$ go build
                      go: finding module for package github.com/sirupsen/logrus
                      go: downloading github.com/sirupsen/logrus v1.5.0
                      go: found github.com/sirupsen/logrus in github.com/sirupsen/logrus v1.5.0
                      go: downloading golang.org/x/sys v0.0.0-20190422165155-953cdadca894
                      me@dattan:~/testing/blabla$ go get -v github.com/google/go-licenses
                      go: downloading github.com/google/go-licenses v0.0.0-20200227160636-0fa8c766a591
                      ... [lots of downloads, that's why -v to see it's not dead]
                      github.com/google/go-licenses
                      me@dattan:~/testing/blabla$ go build github.com/google/go-licenses
                      me@dattan:~/testing/blabla$ ./go-licenses csv .
                      E0406 23:03:48.578291   32389 library.go:108] Failed to find license for example.com/test: no file/directory matching regexp "^(LICEN(S|C)E|COPYING|README|NOTICE)(\\..+)?$" found for /home/me/testing/blabla
                      E0406 23:03:48.627889   32389 csv.go:84] Error discovering URL for "/home/me/go/pkg/mod/golang.org/x/sys@v0.0.0-20191119060738-e882bf8e40c2/LICENSE":
                      - unsupported package host "golang.org" for "golang.org/x/sys/unix"
                      example.com/test,Unknown,Unknown
                      github.com/sirupsen/logrus,https://github.com/sirupsen/logrus/blob/master/LICENSE,MIT
                      golang.org/x/sys/unix,Unknown,BSD-3-Clause
                      
                      go build ./... 
                      ./go-licenses csv ./...
                      
                      go get -v github.com/google/go-licenses
                      go build github.com/google/go-licenses
                      ./go-licenses csv .
                      
                      package main
                      
                      import (
                          "encoding/json"
                          "fmt"
                          log "github.com/sirupsen/logrus"
                      )
                      
                      func main() {
                          log.Warn("Warn")
                          foo := make(map[string]bool)
                          foo["bar"] = true
                          j, _ := json.MarshalIndent(foo, " ", " ")
                          fmt.Println(string(j))
                      }
                      
                      me@dattan:~/testing/blabla$ go mod init example.com/test
                      go: creating new go.mod: module example.com/test
                      me@dattan:~/testing/blabla$ go build
                      go: finding module for package github.com/sirupsen/logrus
                      go: downloading github.com/sirupsen/logrus v1.5.0
                      go: found github.com/sirupsen/logrus in github.com/sirupsen/logrus v1.5.0
                      go: downloading golang.org/x/sys v0.0.0-20190422165155-953cdadca894
                      me@dattan:~/testing/blabla$ go get -v github.com/google/go-licenses
                      go: downloading github.com/google/go-licenses v0.0.0-20200227160636-0fa8c766a591
                      ... [lots of downloads, that's why -v to see it's not dead]
                      github.com/google/go-licenses
                      me@dattan:~/testing/blabla$ go build github.com/google/go-licenses
                      me@dattan:~/testing/blabla$ ./go-licenses csv .
                      E0406 23:03:48.578291   32389 library.go:108] Failed to find license for example.com/test: no file/directory matching regexp "^(LICEN(S|C)E|COPYING|README|NOTICE)(\\..+)?$" found for /home/me/testing/blabla
                      E0406 23:03:48.627889   32389 csv.go:84] Error discovering URL for "/home/me/go/pkg/mod/golang.org/x/sys@v0.0.0-20191119060738-e882bf8e40c2/LICENSE":
                      - unsupported package host "golang.org" for "golang.org/x/sys/unix"
                      example.com/test,Unknown,Unknown
                      github.com/sirupsen/logrus,https://github.com/sirupsen/logrus/blob/master/LICENSE,MIT
                      golang.org/x/sys/unix,Unknown,BSD-3-Clause
                      
                      go build ./... 
                      ./go-licenses csv ./...
                      
                      go get -v github.com/google/go-licenses
                      go build github.com/google/go-licenses
                      ./go-licenses csv .
                      
                      package main
                      
                      import (
                          "encoding/json"
                          "fmt"
                          log "github.com/sirupsen/logrus"
                      )
                      
                      func main() {
                          log.Warn("Warn")
                          foo := make(map[string]bool)
                          foo["bar"] = true
                          j, _ := json.MarshalIndent(foo, " ", " ")
                          fmt.Println(string(j))
                      }
                      
                      me@dattan:~/testing/blabla$ go mod init example.com/test
                      go: creating new go.mod: module example.com/test
                      me@dattan:~/testing/blabla$ go build
                      go: finding module for package github.com/sirupsen/logrus
                      go: downloading github.com/sirupsen/logrus v1.5.0
                      go: found github.com/sirupsen/logrus in github.com/sirupsen/logrus v1.5.0
                      go: downloading golang.org/x/sys v0.0.0-20190422165155-953cdadca894
                      me@dattan:~/testing/blabla$ go get -v github.com/google/go-licenses
                      go: downloading github.com/google/go-licenses v0.0.0-20200227160636-0fa8c766a591
                      ... [lots of downloads, that's why -v to see it's not dead]
                      github.com/google/go-licenses
                      me@dattan:~/testing/blabla$ go build github.com/google/go-licenses
                      me@dattan:~/testing/blabla$ ./go-licenses csv .
                      E0406 23:03:48.578291   32389 library.go:108] Failed to find license for example.com/test: no file/directory matching regexp "^(LICEN(S|C)E|COPYING|README|NOTICE)(\\..+)?$" found for /home/me/testing/blabla
                      E0406 23:03:48.627889   32389 csv.go:84] Error discovering URL for "/home/me/go/pkg/mod/golang.org/x/sys@v0.0.0-20191119060738-e882bf8e40c2/LICENSE":
                      - unsupported package host "golang.org" for "golang.org/x/sys/unix"
                      example.com/test,Unknown,Unknown
                      github.com/sirupsen/logrus,https://github.com/sirupsen/logrus/blob/master/LICENSE,MIT
                      golang.org/x/sys/unix,Unknown,BSD-3-Clause
                      
                      go build ./... 
                      ./go-licenses csv ./...
                      
                      go get -v github.com/google/go-licenses
                      go build github.com/google/go-licenses
                      ./go-licenses csv .
                      
                      package main
                      
                      import (
                          "encoding/json"
                          "fmt"
                          log "github.com/sirupsen/logrus"
                      )
                      
                      func main() {
                          log.Warn("Warn")
                          foo := make(map[string]bool)
                          foo["bar"] = true
                          j, _ := json.MarshalIndent(foo, " ", " ")
                          fmt.Println(string(j))
                      }
                      
                      me@dattan:~/testing/blabla$ go mod init example.com/test
                      go: creating new go.mod: module example.com/test
                      me@dattan:~/testing/blabla$ go build
                      go: finding module for package github.com/sirupsen/logrus
                      go: downloading github.com/sirupsen/logrus v1.5.0
                      go: found github.com/sirupsen/logrus in github.com/sirupsen/logrus v1.5.0
                      go: downloading golang.org/x/sys v0.0.0-20190422165155-953cdadca894
                      me@dattan:~/testing/blabla$ go get -v github.com/google/go-licenses
                      go: downloading github.com/google/go-licenses v0.0.0-20200227160636-0fa8c766a591
                      ... [lots of downloads, that's why -v to see it's not dead]
                      github.com/google/go-licenses
                      me@dattan:~/testing/blabla$ go build github.com/google/go-licenses
                      me@dattan:~/testing/blabla$ ./go-licenses csv .
                      E0406 23:03:48.578291   32389 library.go:108] Failed to find license for example.com/test: no file/directory matching regexp "^(LICEN(S|C)E|COPYING|README|NOTICE)(\\..+)?$" found for /home/me/testing/blabla
                      E0406 23:03:48.627889   32389 csv.go:84] Error discovering URL for "/home/me/go/pkg/mod/golang.org/x/sys@v0.0.0-20191119060738-e882bf8e40c2/LICENSE":
                      - unsupported package host "golang.org" for "golang.org/x/sys/unix"
                      example.com/test,Unknown,Unknown
                      github.com/sirupsen/logrus,https://github.com/sirupsen/logrus/blob/master/LICENSE,MIT
                      golang.org/x/sys/unix,Unknown,BSD-3-Clause
                      
                      go build ./... 
                      ./go-licenses csv ./...
                      

                      Community Discussions

                      Trending Discussions on license-check
                      • How to use Vaadin FLOW server-push with Spring Boot
                      • Parse JSON to multiple Typescript objects
                      • Automating the license checking in gitlab CI/CD pipeline
                      • How to print the licenses used in my project using Go Modules?
                      • Sonarqube - how to enable license-checker for Kotlin projects?
                      Trending Discussions on license-check

                      QUESTION

                      How to use Vaadin FLOW server-push with Spring Boot

                      Asked 2021-Jun-22 at 07:45

                      When I use the @Push annotation on a view I get the following exception (JDK 16, Vaadin 19.0.7, Spring boot 2.4.7):

                      org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
                          at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:162) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:577) ~[spring-context-5.3.8.jar:5.3.8]
                          at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:771) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:763) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:438) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.run(SpringApplication.java:339) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1329) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1318) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at net.cbsolution.chameleon.ChameleonApplication.main(ChameleonApplication.java:10) ~[classes/:na]
                          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
                          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[na:na]
                          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
                          at java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]
                          at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                      Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
                          at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:142) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:104) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:450) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:199) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:181) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:159) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          ... 14 common frames omitted
                      Caused by: java.lang.IllegalStateException: StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[] failed to start
                          at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.rethrowDeferredStartupExceptions(TomcatWebServer.java:187) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          ... 19 common frames omitted
                      
                      

                      What shall I do to use server push with Spring boot? Can anybody point a working example?

                      Here is the complete log:

                        .   ____          _            __ _ _
                       /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
                      ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
                       \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
                        '  |____| .__|_| |_|_| |_\__, | / / / /
                       =========|_|==============|___/=/_/_/_/
                       :: Spring Boot ::       (v2.4.7-SNAPSHOT)
                      
                      2021-06-20 18:59:24.644  INFO 33309 --- [  restartedMain] n.c.chameleon.ChameleonApplication       : Starting ChameleonApplication using Java 16 on franco-HP-ZBook-15-G5 with PID 33309 (/home/franco/projects/chameleon/target/classes started by franco in /home/franco/projects/chameleon)
                      2021-06-20 18:59:24.646  INFO 33309 --- [  restartedMain] n.c.chameleon.ChameleonApplication       : No active profile set, falling back to default profiles: default
                      2021-06-20 18:59:24.672  INFO 33309 --- [  restartedMain] o.s.b.devtools.restart.ChangeableUrls    : The Class-Path manifest attribute in /home/franco/.m2/repository/com/vaadin/license-checker/1.2.0/license-checker-1.2.0.jar referenced one or more files that do not exist: file:/home/franco/.m2/repository/com/vaadin/license-checker/1.2.0/gwt-elemental-2.8.2.vaadin2.jar,file:/home/franco/.m2/repository/com/vaadin/license-checker/1.2.0/oshi-core-5.5.0.jar,file:/home/franco/.m2/repository/com/vaadin/license-checker/1.2.0/jna-5.7.0.jar,file:/home/franco/.m2/repository/com/vaadin/license-checker/1.2.0/jna-platform-5.7.0.jar,file:/home/franco/.m2/repository/com/vaadin/license-checker/1.2.0/slf4j-api-1.7.30.jar
                      2021-06-20 18:59:24.672  INFO 33309 --- [  restartedMain] o.s.b.devtools.restart.ChangeableUrls    : The Class-Path manifest attribute in /home/franco/.m2/repository/com/oracle/database/jdbc/ojdbc8/19.8.0.0/ojdbc8-19.8.0.0.jar referenced one or more files that do not exist: file:/home/franco/.m2/repository/com/oracle/database/jdbc/ojdbc8/19.8.0.0/oraclepki.jar
                      2021-06-20 18:59:24.672  INFO 33309 --- [  restartedMain] o.s.b.devtools.restart.ChangeableUrls    : The Class-Path manifest attribute in /home/franco/.m2/repository/com/cronutils/cron-utils/9.1.5/cron-utils-9.1.5.jar referenced one or more files that do not exist: file:/home/franco/.m2/repository/com/cronutils/cron-utils/9.1.5/slf4j-api-1.7.30.jar,file:/home/franco/.m2/repository/com/cronutils/cron-utils/9.1.5/javax.el-3.0.0.jar
                      2021-06-20 18:59:24.672  INFO 33309 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
                      2021-06-20 18:59:24.672  INFO 33309 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
                      2021-06-20 18:59:25.095  INFO 33309 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
                      2021-06-20 18:59:25.130  INFO 33309 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 32 ms. Found 6 JPA repository interfaces.
                      2021-06-20 18:59:25.471  INFO 33309 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
                      2021-06-20 18:59:25.475  INFO 33309 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
                      2021-06-20 18:59:25.475  INFO 33309 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.46]
                      2021-06-20 18:59:25.525  INFO 33309 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
                      2021-06-20 18:59:25.525  INFO 33309 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 853 ms
                      2021-06-20 18:59:25.574  INFO 33309 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
                      2021-06-20 18:59:25.734  INFO 33309 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
                      2021-06-20 18:59:25.737  INFO 33309 --- [  restartedMain] o.s.b.a.h2.H2ConsoleAutoConfiguration    : H2 console available at '/h2-console'. Database available at 'jdbc:postgresql://localhost:5432/chameleon'
                      2021-06-20 18:59:25.841  INFO 33309 --- [  restartedMain] c.v.f.s.VaadinServletContextInitializer  : Search for VaadinAppShell took 17 ms
                      2021-06-20 18:59:25.843  INFO 33309 --- [  restartedMain] c.v.f.s.s.VaadinAppShellInitializer      : Using net.cbsolution.chameleon.MyAppShellConfigurator class for configuring `index.html` response
                      2021-06-20 18:59:25.848 ERROR 33309 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Exception sending context initialized event to listener instance of class [com.vaadin.flow.spring.VaadinServletContextInitializer$CompositeServletContextListener]
                      
                      java.lang.RuntimeException: Unable to initialize com.vaadin.flow.spring.VaadinServletContextInitializer$VaadinAppShellContextListener
                          at com.vaadin.flow.spring.VaadinServletContextInitializer$FailFastServletContextListener.contextInitialized(VaadinServletContextInitializer.java:192) ~[vaadin-spring-16.0.1.jar:na]
                          at com.vaadin.flow.spring.VaadinServletContextInitializer$CompositeServletContextListener.lambda$contextInitialized$0(VaadinServletContextInitializer.java:209) ~[vaadin-spring-16.0.1.jar:na]
                          at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) ~[na:na]
                          at com.vaadin.flow.spring.VaadinServletContextInitializer$CompositeServletContextListener.contextInitialized(VaadinServletContextInitializer.java:209) ~[vaadin-spring-16.0.1.jar:na]
                          at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4714) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5172) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
                          at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) ~[na:na]
                          at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:829) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
                          at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) ~[na:na]
                          at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.apache.catalina.startup.Tomcat.start(Tomcat.java:486) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
                          at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:123) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:104) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:450) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:199) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:181) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:159) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:577) ~[spring-context-5.3.8.jar:5.3.8]
                          at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:771) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:763) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:438) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.run(SpringApplication.java:339) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1329) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1318) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at net.cbsolution.chameleon.ChameleonApplication.main(ChameleonApplication.java:10) ~[classes/:na]
                          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
                          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[na:na]
                          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
                          at java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]
                          at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                      Caused by: com.vaadin.flow.server.InvalidApplicationConfigurationException: 
                      
                      Found app shell configuration annotations in non `AppShellConfigurator` classes.
                      Please create a custom class implementing `AppShellConfigurator` and move the following annotations to it:
                          - @Push from net.cbsolution.chameleon.ui.views.AlertView
                      
                          at com.vaadin.flow.server.startup.VaadinAppShellInitializer.init(VaadinAppShellInitializer.java:157) ~[flow-server-6.0.8.jar:6.0.8]
                          at com.vaadin.flow.server.startup.VaadinAppShellInitializer.init(VaadinAppShellInitializer.java:94) ~[flow-server-6.0.8.jar:6.0.8]
                          at com.vaadin.flow.spring.VaadinServletContextInitializer$VaadinAppShellContextListener.failFastContextInitialized(VaadinServletContextInitializer.java:550) ~[vaadin-spring-16.0.1.jar:na]
                          at com.vaadin.flow.spring.VaadinServletContextInitializer$FailFastServletContextListener.contextInitialized(VaadinServletContextInitializer.java:188) ~[vaadin-spring-16.0.1.jar:na]
                          ... 47 common frames omitted
                      
                      2021-06-20 18:59:25.848 ERROR 33309 --- [  restartedMain] o.apache.catalina.core.StandardContext   : One or more listeners failed to start. Full details will be found in the appropriate container log file
                      2021-06-20 18:59:25.849 ERROR 33309 --- [  restartedMain] o.apache.catalina.core.StandardContext   : Context [] startup failed due to previous errors
                      2021-06-20 18:59:25.852  WARN 33309 --- [  restartedMain] o.a.c.loader.WebappClassLoaderBase       : The web application [ROOT] appears to have started a thread named [HikariPool-1 housekeeper] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
                       java.base@16/jdk.internal.misc.Unsafe.park(Native Method)
                       java.base@16/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)
                       java.base@16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1661)
                       java.base@16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
                       java.base@16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
                       java.base@16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1056)
                       java.base@16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1116)
                       java.base@16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
                       java.base@16/java.lang.Thread.run(Thread.java:831)
                      2021-06-20 18:59:25.853  WARN 33309 --- [  restartedMain] o.a.c.loader.WebappClassLoaderBase       : The web application [ROOT] appears to have started a thread named [HikariPool-1 connection adder] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
                       java.base@16/java.lang.String.equals(String.java:1027)
                       java.base@16/sun.security.ssl.CipherSuite.nameOf(CipherSuite.java:898)
                       java.base@16/sun.security.ssl.SSLAlgorithmDecomposer.decompose(SSLAlgorithmDecomposer.java:262)
                       java.base@16/sun.security.util.AbstractAlgorithmConstraints.checkAlgorithm(AbstractAlgorithmConstraints.java:99)
                       java.base@16/sun.security.util.DisabledAlgorithmConstraints.permits(DisabledAlgorithmConstraints.java:140)
                       java.base@16/sun.security.ssl.SSLAlgorithmConstraints.permits(SSLAlgorithmConstraints.java:164)
                       java.base@16/sun.security.ssl.SSLAlgorithmConstraints.permits(SSLAlgorithmConstraints.java:154)
                       java.base@16/sun.security.ssl.HandshakeContext.isActivatable(HandshakeContext.java:550)
                       java.base@16/sun.security.ssl.HandshakeContext.getActiveCipherSuites(HandshakeContext.java:339)
                       java.base@16/sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:185)
                       java.base@16/sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:98)
                       java.base@16/sun.security.ssl.TransportContext.kickstart(TransportContext.java:238)
                       java.base@16/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:434)
                       java.base@16/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:412)
                       app//org.postgresql.ssl.MakeSSL.convert(MakeSSL.java:41)
                       app//org.postgresql.core.v3.ConnectionFactoryImpl.enableSSL(ConnectionFactoryImpl.java:534)
                       app//org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:149)
                       app//org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:213)
                       app//org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:51)
                       app//org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:223)
                       app//org.postgresql.Driver.makeConnection(Driver.java:465)
                       app//org.postgresql.Driver.connect(Driver.java:264)
                       app//com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
                       app//com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:358)
                       app//com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
                       app//com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:477)
                       app//com.zaxxer.hikari.pool.HikariPool.access$100(HikariPool.java:71)
                       app//com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:725)
                       app//com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:711)
                       java.base@16/java.util.concurrent.FutureTask.run(FutureTask.java:264)
                       java.base@16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
                       java.base@16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
                       java.base@16/java.lang.Thread.run(Thread.java:831)
                      2021-06-20 18:59:25.870  INFO 33309 --- [  restartedMain] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
                      2021-06-20 18:59:25.872  WARN 33309 --- [  restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
                      2021-06-20 18:59:25.873  INFO 33309 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
                      2021-06-20 18:59:25.878  INFO 33309 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
                      2021-06-20 18:59:25.885  INFO 33309 --- [  restartedMain] ConditionEvaluationReportLoggingListener : 
                      
                      Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
                      2021-06-20 18:59:25.895 ERROR 33309 --- [  restartedMain] o.s.boot.SpringApplication               : Application run failed
                      
                      org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
                          at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:162) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:577) ~[spring-context-5.3.8.jar:5.3.8]
                          at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:771) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:763) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:438) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.run(SpringApplication.java:339) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1329) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1318) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at net.cbsolution.chameleon.ChameleonApplication.main(ChameleonApplication.java:10) ~[classes/:na]
                          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
                          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[na:na]
                          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
                          at java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]
                          at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                      Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
                          at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:142) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:104) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:450) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:199) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:181) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:159) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          ... 14 common frames omitted
                      Caused by: java.lang.IllegalStateException: StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[] failed to start
                          at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.rethrowDeferredStartupExceptions(TomcatWebServer.java:187) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[spring-boot-2.4.7-20210610.075414-42.jar:2.4.7-SNAPSHOT]
                          ... 19 common frames omitted
                      
                      
                      Process finished with exit code 0
                      
                      

                      And here is MyAppShellConfigurator:

                      package net.cbsolution.chameleon;
                      
                      import com.vaadin.flow.component.page.AppShellConfigurator;
                      import com.vaadin.flow.component.page.Push;
                      
                      @Push
                      public class MyAppShellConfigurator implements AppShellConfigurator {
                      }
                      
                      

                      ANSWER

                      Answered 2021-Jun-22 at 07:45

                      You must add annotation for the "whole" application (which @Push is) to your central configuration place (which is the class implementing AppShellConfigurator). As the error states:

                      Found app shell configuration annotations in non `AppShellConfigurator` classes.
                      Please create a custom class implementing `AppShellConfigurator` and move the following annotations to it:
                        - @Push from net.cbsolution.chameleon.ui.views.AlertView
                      

                      Remove @Push from net.cbsolution.chameleon.ui.views.AlertView (as it's already set on your MyAppShellConfigurator as seen in your code paste).

                      Source https://stackoverflow.com/questions/68047352

                      Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                      Vulnerabilities

                      No vulnerabilities reported

                      Install license-check

                      You can download it from GitHub, Maven.
                      You can use license-check like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the license-check component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

                      Support

                      For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

                      DOWNLOAD this Library from

                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      Explore Related Topics

                      Share this Page

                      share link
                      Consider Popular Build Tool Libraries
                      Try Top Libraries by mrice
                      Compare Build Tool Libraries with Highest Support
                      Compare Build Tool Libraries with Highest Quality
                      Compare Build Tool Libraries with Highest Security
                      Compare Build Tool Libraries with Permissive License
                      Compare Build Tool Libraries with Highest Reuse
                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      • © 2022 Open Weaver Inc.