Error running 14.1.0 with vertx:3.8.5
Closed this issue · 9 comments
I am getting an error if I try to run vertx-vaadin 14.1.0
with vertx:3.8.5
and vaadin:14.1.18
. vertx:3.8.3
is working fine. I am not sure what the actual reason is, so i appended the stack trace. The error is occurring directly on first site open.
vaadin-vertx-error-3.8.5.txt
The same error is occurring if I try to start the verticle by code with IntelliJ and not the vertx-maven-plugin on vertx:3.8.3
.
Code simply is (kotlin):
fun main() {
val vertx = Vertx.vertx()
vertx.deployVerticle(UIVerticle::class.java.canonicalName)
}
and then run this main method with IntelliJ.
StringIndexOutOfBoundsException
is due to a change on RoutingContextWrapper
introduced by vertx 3.8.4.
In 3.8.3 and earlier mountpoint
for / path was an empty string, whereas from 3.8.4 is returns /.
I think this can easily be fixed in vertx-vaadin in a way that it will work for 3.8.3 and 3.8.4+
ClassCastException
is due to an explicit cast in BootstrapUtils
; this happens only on navigation errors, when a route is not found.
This may be a little bit harder to fix,since failing method is static; perhaps an issue may be opened on vaadin.
I have not yet tried to replicate the error from IntelliJ without vertx-maven-plugin; will do ASAP
Ok, so I will stay on 3.8.3 until the fix is applied.
The ClassCastException should not occur on "correct" application use. The default route '/' is defined correctly. I think this only happens due to the routing error mentioned earlier because no route can be resolved correctly. This is also the reason why both occur together.
The problem with IntelliJ seems to be project-related because in another project everything works as it should. But I currently can't find the problem.
Published 14.1.1-SNAPSHOT on bintray if you want to give it a try.
It works for me with vertx 3.8.3, 3.8.4 and 3.8.5
It works on all projects (only tested 3.8.5) with maven-vertx-plugin. The problem with IntelliJ run is still in my project. The problem is also occurring in the vertx-vaadin-samples project with the current SNAPSHOT version. The only connection I can see is that both projects are multi-module-projects. The project without the problem is a "normal" maven project.
I found the error. It was a bit multi-module related. On pressing play the working dir is by default empty for the IntelliJ configuration and it is resolved to the main directory. In multi-module, it is actually the MODULE_WORKING_DIR
. After fixing the configuration everything works fine!
So thank you again for your really phenomenal response time! If I find more bugs in the next weeks while working with your library, I will let you know!
Great! Thank you for the precious feedback.
Are you ok to work with the snapshot version for the next weeks?
I would like to do more tests before publishing next stable version.
Yes, I'm fine with that. The code will not go to production in the next weeks.