Skip to content

[BUG] java 引入多个DUT包会导致覆盖冲突 #36

@miceforrat

Description

@miceforrat

Description

在java中,如果在一个项目中引入多个不同DUT的jar包会导致后引入的包的DUTUnifiedBase被前引入的包的DUTUnifiedBase覆盖

Steps to Reproduce

  1. 用picker指定打包语言为java,打包两个jar包
  2. 将两个jar包同时引入项目(这次触发bug时使用的构建工具是maven)
        <dependency>
            <groupId>com.ut</groupId>
            <artifactId>UT_F3Predecoder</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/UT_F3Predecoder-java.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>com.ut</groupId>
            <artifactId>UT_PreDecode</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/UT_PreDecode-java.jar</systemPath>
        </dependency>
  1. 搭建测试环境,分别构造两个UT
      UT_F3Predecoder dut1 = new UT_F3Predecoder();
      UT_Predecode dut2 = new UT_Predecode();
  1. 使用maven执行测试:mvn clean test

Expected Result

初始化正常完成

Actual Result

命令行报错:

[ERROR] Errors: 
[ERROR]   PredecodeTest.setUp:18 » UnsatisfiedLink 'long com.xspcomm.libUT_F3PredecoderJNI.new_DutUnifiedBase__SWIG_0()'

Screenshots

Environment

java11.0.25

maven apache-maven-3.9.9

debian12.0

Additional Information

Checklist

  • I have searched the existing issues
  • I have added the appropriate labels
  • I have reproduced the issue with the latest version
  • I have provided a detailed description of the bug
  • I have provided steps to reproduce the issue
  • I have included screenshots (if applicable)
  • I have provided the environment details (OS, version, etc.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions