Deployment to WildFly 14.0.1 fails with IllegalArgumentException in net.bytebuddy.jar.asm.ClassVisitor constructor
See original GitHub issueDescription of the bug
We are porting an existing Vaadin 12 application to Vaadin 14. We started by running the P3 upgrade tool that failed due to #6208. After that we created a new project with Vaadin 14 starter and copied over semi-migrated files from the old project.
We were able to compile and package the project successfully after that, but deployment to WildFly 14.0.1 fails from IntelliJ with IllegalArgumentException
in net.bytebuddy.jar.asm.ClassVisitor
constructor.
The exception comes from
and the backtrace is as follows:
17:22:12,573 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 29) MSC000001: Failed to start service jboss.deployment.subunit."mapserver-mock-ear-with-mock-services.ear"."mapserver.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.subunit."mapserver-mock-ear-with-mock-services.ear"."mapserver.war".undertow-deployment: java.lang.RuntimeException: java.lang.IllegalArgumentException
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:252)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78)
... 8 more
Caused by: java.lang.IllegalArgumentException
at net.bytebuddy.jar.asm.ClassVisitor.<init>(Unknown Source)
at net.bytebuddy.jar.asm.ClassVisitor.<init>(Unknown Source)
at com.vaadin.flow.server.frontend.scanner.FrontendClassVisitor.<init>(FrontendClassVisitor.java:112)
at com.vaadin.flow.server.frontend.scanner.FrontendDependencies.visitClass(FrontendDependencies.java:495)
at com.vaadin.flow.server.frontend.scanner.FrontendDependencies.collectEndpoints(FrontendDependencies.java:285)
at com.vaadin.flow.server.frontend.scanner.FrontendDependencies.computeEndpoints(FrontendDependencies.java:273)
at com.vaadin.flow.server.frontend.scanner.FrontendDependencies.<init>(FrontendDependencies.java:151)
at com.vaadin.flow.server.frontend.NodeTasks.<init>(NodeTasks.java:315)
at com.vaadin.flow.server.frontend.NodeTasks.<init>(NodeTasks.java:41)
at com.vaadin.flow.server.frontend.NodeTasks$Builder.build(NodeTasks.java:147)
at com.vaadin.flow.server.startup.DevModeInitializer.initDevModeHandler(DevModeInitializer.java:248)
at com.vaadin.flow.server.startup.DevModeInitializer.onStartup(DevModeInitializer.java:164)
at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:203)
at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:185)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:250)
Minimal reproducible example
This is a commercial application, so we cannot publish the source publicly, but it is available privately upon request.
It is a multi-module Maven project that is packaged into an EAR. This setup worked flawlessly with Vaadin 12.
We use IntelliJ JBoss server run/debug configuration to deploy the application during development.
Using the IntelliJ debugger I found out that the exception happens while FrontendDependencies
scanner scans our PolymerTemplate
-based Vaadin view classes that have @Route
, @Tag
and @JsModule
annotations, for example:
@Route(value = "widget/full")
@Tag("widget-full-view")
@JsModule("./src/widget/widget-full-view.js")
public class WidgetFullView extends PolymerTemplate<WidgetViewModel> implements HasUrlParameter<String> {
...
Expected behavior
Deployment to WildFly 14.0.1 succeeds.
Actual behavior
Deployment to WildFly 14.0.1 fails with IllegalArgumentException
.
Versions
- Vaadin / Flow version: 14.0.1 / 8.0.2
- WildFly version: 14.0.1
- IntelliJ version: 2019.2
- Java version: jdk8u222-b10
- OS version: Windows 10
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
I started from the generated starter project that worked for me and applied step by step all my source code of my project. As i added a specific dependency to my pom.xml this error comes up. In my case it was the mockito library. So i updated the library from version 2.8.9 to 3.0.0. After that the error was gone. My guess is, that the ClassVisitor has some problems analyzing specific classes.
@jensgoe @pahaloom I’m closing this issue for now. Please reopen it when you could check the effective
bytebuddy
version of your project.