RE: Deployment not working.

You could have accidentally some dependency scope as provided, although it should not be, or other maven issue. In Eclipse local use e.g. when using spring boot via run as Java application, the provided scoped jars are visible. Note though, vaadin-client parts must be scoped as provided, and tests as test, etc. So I would start by inspecting your pom.xml.

After all the issues trying to get vaadin to compile, we finally stripped the classpath back. Eclipse launches and works fine app comes up data comes in. You then deploy it and behold another issue :slight_smile:

Caused by: com.vaadin.server.ServiceException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘appUI’: Unsatisfied dependency expressed through field ‘mainView’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘mainView’: Unsatisfied dependency expressed through field ‘accountsMonitorView’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accountsMonitorViewImpl’: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: com.vaadin.ui.Grid.addComponentColumn(Lcom/vaadin/data/ValueProvider;)Lcom/vaadin/ui/Grid$Column;
at com.vaadin.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1516) ~[vaadin-server-8.0.7.jar!/:8.0.7]

at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1476) ~[vaadin-server-8.0.7.jar!/:8.0.7]

at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:381) ~[vaadin-server-8.0.7.jar!/:8.0.7]

how can it work in eclipse and then not via the packaged jar? ?

Okay not sure how this works with gradle. This came out of using the spring initialiser project

dependencies {
compile(‘com.vaadin:vaadin-spring-boot-starter’)
testCompile(‘org.springframework.boot:spring-boot-starter-test’)
compile “com.vaadin:vaadin-push:${vaadinVersion}”,
“com.vaadin:vaadin-themes:${vaadinVersion}”,
“org.springframework.security:spring-security-web:${springSecurityVersion}”,
“org.springframework.security:spring-security-core:${springSecurityVersion}”,
“org.springframework.security:spring-security-config:${springSecurityVersion}”,
“commons-dbcp:commons-dbcp:1.4”,
“mysql:mysql-connector-java:5.1.34”
testCompile(‘mysql:mysql-connector-java:5.1.34’)
}

Any thoughts on what this could be?

Hi,
I think you have some depedencies problem in your build script;
Grid.addComponentColumn method is present since vaadin 8.1 but, from the stacktrace, I can see that at runtime you are using 8.0.7.

Can you post the whoole gradle build script or the output of gradle dependecies?

This is the build.gradle

buildscript {
ext {
springBootVersion = ‘1.5.10.RELEASE’
}
repositories {
mavenCentral()
}
dependencies {
classpath(“org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}”)
classpath “org.jfrog.buildinfo:build-info-extractor-gradle:latest.release”
}
}

plugins {
id ‘java’
id ‘eclipse’
id ‘com.jfrog.artifactory’ version ‘3.0.1’
id ‘maven-publish’
id “fi.jasoft.plugin.vaadin” version “1.1.12”
}

apply plugin: ‘org.springframework.boot’

group = ‘com.app.riskmonitor’
sourceCompatibility = 1.8
ext.mainClass = ‘com.app.riskmonitor.RiskApplication’

repositories {
mavenCentral()
}

ext {
vaadinVersion = ‘8.3.0’
}

dependencies {
compile(‘com.vaadin:vaadin-spring-boot-starter’)
compile “com.vaadin:vaadin-push:${vaadinVersion}”,
“com.vaadin:vaadin-themes:${vaadinVersion}”,
“org.springframework.security:spring-security-web:${springSecurityVersion}”,
“org.springframework.security:spring-security-core:${springSecurityVersion}”,
“org.springframework.security:spring-security-config:${springSecurityVersion}”,
“commons-dbcp:commons-dbcp:1.4”,
“mysql:mysql-connector-java:5.1.34”
testCompile(‘org.springframework.boot:spring-boot-starter-test’)
testCompile(‘mysql:mysql-connector-java:5.1.34’)
}

dependencyManagement {
imports {
mavenBom “com.vaadin:vaadin-bom:${vaadinVersion}”
}
}

jar {
archiveName = archivesBaseName + ‘.war’
manifest {
attributes ‘Implementation-Version’: version
attributes ‘Main-Class’: mainClass
}
war.rootSpec.exclude “/logback.xml”
war.rootSpec.exclude “ansible”
war.rootSpec.exclude “sql”
war.rootSpec.exclude “project.install4j”
war.rootSpec.exclude “jetty”
}

Hi,
unfortunately the build script yuo posted doesn’t work for me; it seems there are missing settings.
Anyway, at first launch (using gradle 4.4) there was this warning on console

Using Gradle Vaadin Plugin 1.1.12
!! A newer version of the Gradle Vaadin plugin is available, please upgrade to 1.3.1 !!


The Gradle Vaadin plugin has changed id and has moved to a new location. This plugin
will no longer recieve any updates.

Please update the plugin by using the following statement in your build.gradle

plugins {
    id 'com.devsoap.plugin.vaadin' version '1.3.1'
}

Please see https://plugins.gradle.org/plugin/com.devsoap.plugin.vaadin for further
instructions of how to apply the new plugin to your build or visit the plugin wiki
page at https://github.com/johndevs/gradle-vaadin-plugin/wiki.

So I have modified it a bit the script:

  • used suggested plugin id 'com.devsoap.plugin.vaadin' version '1.3.1'
  • specified version 3.0.0 for vaadin-spring-boot-starter
    compile('com.vaadin:vaadin-spring-boot-starter:3.0.0')
  • removed vaadin-push and vaadin-themes compile dependencies
  • added configuration for vaadin gradle plugin
    vaadin { version '8.3.0' push true }

With this modification I was able to create a war with vaadin 8.3.0

HTH
Marco

Wow that is great. Looks to be working. When booting tho I am gettting this.

2018-02-09 10:10:29.511 ERROR 26991 — [ main]
o.a.cpr.DefaultAsyncSupportResolver : Real error: Unable to configure jsr356 at that stage. ServerContainer is null

java.lang.IllegalStateException: Unable to configure jsr356 at that stage. ServerContainer is null
at org.atmosphere.container.JSR356AsyncSupport.(JSR356AsyncSupport.java:51) ~[atmosphere-runtime-2.4.11.vaadin2.jar!/:2.4.11.vaadin2]

at org.atmosphere.container.JSR356AsyncSupport.<init>(JSR356AsyncSupport.java:40) ~[atmosphere-runtime-2.4.11.vaadin2.jar!/:2.4.11.vaadin2]

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_101]