Upgrading to Vaadin 23.2.1 - java.net.MalformedURLException: Error at index 5

Viewed 54

After upgrading my Vaadin application from 23.1.x to 23.2.1 I encountered the following exception when I attempt to open the landing page:

    java.net.MalformedURLException: Error at index 5 in: "38593VAADIN"
    at java.base/java.net.URL.<init>(URL.java:679)
    at java.base/java.net.URL.<init>(URL.java:541)
    at java.base/java.net.URL.<init>(URL.java:488)
    at com.vaadin.base.devserver.AbstractDevServerRunner.prepareConnection(AbstractDevServerRunner.java:609)
    at com.vaadin.base.devserver.ViteHandler.prepareConnection(ViteHandler.java:153)
    at com.vaadin.base.devserver.AbstractDevServerRunner.serveDevModeRequest(AbstractDevServerRunner.java:707)
    at com.vaadin.flow.server.StaticFileServer.serveStaticResource(StaticFileServer.java:243)
    at com.vaadin.flow.server.VaadinServlet.serveStaticOrWebJarRequest(VaadinServlet.java:396)
    at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:351)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

One contributing factor to this, I believe, is that I have configured my Vaadin application to be co-hosted with other services. I.e. only serve specific URL patterns. Hence I have configured the Vaadin servlet like:

@WebServlet(urlPatterns = {"/ui/*","/VAADIN/*"}, name = "configurationServlet", asyncSupported = true)
public class WebAppConfigurationServlet extends VaadinServlet
{
}

If I change the servlet mapping to :

@WebServlet(urlPatterns = {"/*"}, name = "configurationServlet", asyncSupported = true)

It does work. However, it then breaks the rest of my application.

Does anyone perhaps have advice as to how to proceed? This certainly looks like a regression of sorts. But is there perhaps a better, more compatible, way for me to achieve this aim?

0 Answers
Related