question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deployment to WildFly 14.0.1 fails with IllegalArgumentException in net.bytebuddy.jar.asm.ClassVisitor constructor

See original GitHub issue

Description 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

https://github.com/vaadin/flow/blob/e0daeb2a8e99c3a4d4004a3958b667acfdaec3f6/flow-server/src/main/java/com/vaadin/flow/server/frontend/scanner/FrontendClassVisitor.java#L112

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:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jensgoecommented, Oct 2, 2019

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.

0reactions
mehdi-vaadincommented, Nov 22, 2019

@jensgoe @pahaloom I’m closing this issue for now. Please reopen it when you could check the effective bytebuddy version of your project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[WildFly 10 CR4] IllegalArgumentException when - JBoss.org
I get the following error when WildFly tries to deploy the sar: ... runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60].
Read more >
Illegal Argument Exception is thrown while deploying ear file ...
Basically I am migrating java 1.6 version to 1.8 for an application and trying to deploy it in JBOSS server.using Maven to build...
Read more >
APM Java agent v1.27.0+ instrumention errors on modulepath
Currently, APM Java agent v1.26.0 is attached successfully to a Spring Boot 2.6 application (JDK 17). This application has enabled Java ...
Read more >
[cas-user] Deployiment error on Wildfly 14.0.1- CAS 5.3.3
I excluded embedded tomcat and changed the app.server to blank. Deployment fails with following error: 14:58:14,539 ERROR [org.springframework.
Read more >
A log related problem was encountered while deploying wildfly
When I deploy, I get the following error. {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"mds-portal.war\".undertow-deployment" => "java.lang.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found