Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macos M2 pro, spring-boot.version从2.5.13升级到2.7.5后打包报错 #5808

Closed
1 task
PeppaO opened this issue Aug 28, 2023 · 4 comments
Closed
1 task

Comments

@PeppaO
Copy link
Contributor

PeppaO commented Aug 28, 2023

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

spring-boot.version从2.5.13升级到2.7.5后打包报错

Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:


Just paste your stack trace here!

[INFO] seata-spring-boot-starter 1.6.1 .................... SUCCESS [ 0.166 s]
[INFO] apm-seata-skywalking-plugin 1.6.1 .................. FAILURE [ 0.056 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 42.193 s
[INFO] Finished at: 2023-08-28T13:54:23+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project apm-seata-skywalking-plugin: Compilation failure
[ERROR] 服务配置文件不正确, 或构造处理程序对象Invalid index时抛出异常错误
[ERROR]
[ERROR] -> [Help 1]
[ERROR]

Ⅲ. Describe what you expected to happen

spring-boot.version从2.5.13升级到2.7.5后打包报错,执行如下命令:
mvn clean install -Dmaven.test.skip=true -Prelease-seata

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. macos M2 pro
  2. seata 1.6.1 ,代码这里改成<spring-boot.version>2.7.5</spring-boot.version>
  3. mvn clean install -Dmaven.test.skip=true -Prelease-seata

Minimal yet complete reproducer code (or URL to code):

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • JDK version(e.g. java -version): openjdk version "1.8.0_382"
    OpenJDK Runtime Environment (Zulu 8.72.0.17-CA-macos-aarch64) (build 1.8.0_382-b05)
    OpenJDK 64-Bit Server VM (Zulu 8.72.0.17-CA-macos-aarch64) (build 25.382-b05, mixed mode)
  • Seata client/server version: 1.6.1
  • Database version: file
  • OS(e.g. uname -a):Darwin MacBook-Pro.local 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:58 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6020 arm64
  • Others:
@slievrly
Copy link
Member

ref #5613

@leizhiyuan
Copy link
Contributor

Please execute

mvn clean install -Dmaven.test.skip=true -Prelease-seata > error.log

and provide the complete error.log.

@leizhiyuan
Copy link
Contributor

after use

mvnDebug  clean install -Dmaven.test.skip=true -Prelease-seata -X

I debug the maven-compile-plugin, I found the problem may arises in the annotation processor

image

A simple solution is add the plugin to apm-seata-skywalking-plugin/pom.xml

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <parameters>true</parameters>
                    <compilerArgs>
                        <arg>-proc:none</arg>
                    </compilerArgs>
                </configuration>
            </plugin>

proc:none is the point , but I am not sure whether the functionality of skywalking is affected, so if one day, we must upgrade the version of springboot, we can do it like this. And just test the functionality of skywalking.

you can debug sun.misc.URLClassPath if you are interested

@leizhiyuan
Copy link
Contributor

link #5413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants