Skip to content

Quarkus 2.0.1 VerifyError:Bad access to protected data in invokevirtual #18510

Description

@ennishol

Describe the bug

Some of my tests (@QuarkusTest) fail with the following error:

[ERROR] com.ApiTest.method  Time elapsed: 0 s  <<< ERROR!
java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
Caused by: java.lang.RuntimeException: Failed to start quarkus
Caused by: java.lang.VerifyError:
Bad access to protected data in invokevirtual
Exception Details:
  Location:
    com/company/me/Bean_ClientProxy.isMethod()Z @43: invokevirtual
  Reason:
    Type 'com/company/me/Bean' (current frame, stack[0]) is not assignable to 'com/company/me/Bean_ClientProxy'
  Current Frame:
    bci: @43
    flags: { }
    locals: { 'com/company/me/Bean_ClientProxy', '[Z' }
    stack: { 'com/company/me/Bean' }
  Bytecode:
    ...
    ...
    ...
    
  Stackmap Table:
    append_frame(@14,Object[#610])
    same_frame(@29)

The Bean extends OtherAbstractBean which extends ParentAbstractBean which extends org.apache.camel.builder.RouteBuilder. The method in the error message (Bean_ClientProxy.isMethod) is a protected one and sometimes the test fails with another protected method.

The application seems to work fine, but @QuarkusTest is failing

Expected behavior

No Errors expected

To Reproduce

Unfortunately, I can't share the code and could not reproduce it in a demo project

Configuration

# Add your application.properties here, if applicable.

Environment (please complete the following information):

Output of uname -a or ver

Linux 5.8.0-59-generic #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)

Quarkus version or git rev

2.0.1.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: /opt/maven
Java version: 11.0.11, vendor: AdoptOpenJDK, runtime: /home/qk/.sdkman/candidates/java/11.0.11.hs-adpt
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.8.0-59-generic", arch: "amd64", family: "unix"

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/arcIssue related to ARC (dependency injection)kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions