0

I am working on a Vaadin application bootstrapped with springBoot. When I tried to build the application this morning (without performing any changes since the last successful build), i got the following stacktrace:

Using Gradle Vaadin Plugin 0.10.5
:compileJava UP-TO-DATE
:vaadinUpdateWidgetset FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':vaadinUpdateWidgetset'.
> String index out of range: 1

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task     ':vaadinUpdateWidgetset'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
...
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 1
    at java_lang_String$replaceAll$2.call(Unknown Source)
    at fi.jasoft.plugin.tasks.UpdateWidgetsetTask.ensureWidgetPresent(UpdateWidgetsetTask.groovy:60)
    at fi.jasoft.plugin.tasks.UpdateWidgetsetTask.ensureWidgetPresent(UpdateWidgetsetTask.groovy)
    at fi.jasoft.plugin.tasks.UpdateWidgetsetTask$ensureWidgetPresent.callStatic(Unknown Source)
    at fi.jasoft.plugin.tasks.UpdateWidgetsetTask.run(UpdateWidgetsetTask.groovy:46)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)

BUILD FAILED

Total time: 9.743 secs
Exception in thread "Thread-3" java.lang.IllegalStateException: Shutdown in progress
    at java.lang.ApplicationShutdownHooks.remove(ApplicationShutdownHooks.java:82)
    at java.lang.Runtime.removeShutdownHook(Runtime.java:237)
    at java_lang_Runtime$removeShutdownHook$2.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
    at fi.jasoft.plugin.tasks.SuperDevModeTask$_closure1.doCall(SuperDevModeTask.groovy:44)
    at fi.jasoft.plugin.tasks.SuperDevModeTask$_closure1.doCall(SuperDevModeTask.groovy)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)
    at groovy.lang.Closure.call(Closure.java:426)
    at groovy.lang.Closure.call(Closure.java:420)
    at groovy.lang.Closure.run(Closure.java:507)
    at java.lang.Thread.run(Thread.java:722)

What could be the cause of this behaviour? I already tried to delete the build and widgetset folders, same result. Could this be an issue related to a recent dependency update? Thanks in advance!

ACB
  • 125
  • 8
  • 1
    "without performing any changes since the last successful build" is rarely true ;) please also add your relevant build files (e.g. build.gradle) – cfrick Jan 18 '16 at 12:55

2 Answers2

2

I'm a maven user, thus gradle isn't my forte. Nonetheless the stacktrace & sources suggest that the gradle-vaadin-plugin failed while generating the widgetset filename.

I can see that a new version of the plugin was released yesterday, and (perhaps I'm wrong) it may be a regression introduced with the fix for issue #218. I suspect you may be blindly inheriting the latest version, 0.10.5 released yesterday which includes the above mentioned fix, thus if possible, I'd suggest:

  • force an older version of the plugin, such as 0.10.4
  • try to open an issue on their tracker including details about your environment & configuration (and maybe a link to this question)

Note: this is perhaps better suited as a comment, but it does not fit in one

Morfic
  • 15,178
  • 3
  • 51
  • 61
  • Downgrading to version 0.10.4 indeed helped. As you said, it seems like the new version caused compatibility issues. I am going to post this problem to their tracker. Thanks! – ACB Jan 18 '16 at 14:18
  • @ACB great news, have fun – Morfic Jan 18 '16 at 14:22
0

This is caused by a bug in 0.10.5 in the gradle-vaadin-plugin.

This issue has been reported in https://github.com/johndevs/gradle-vaadin-plugin/issues/225 and it will be fixed in 0.10.6.

If you are experiencing this just downgrade to 0.10.4 by using the following url in your build.gradle

apply plugin: 'http://plugins.jasoft.fi/vaadin.plugin?version=0.10.4
John
  • 880
  • 7
  • 11