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

JAVA agent 部署之后,项目的groovy脚本初始化异常 #465

Open
3 tasks done
jieyunhu opened this issue Feb 14, 2023 · 2 comments
Open
3 tasks done

JAVA agent 部署之后,项目的groovy脚本初始化异常 #465

jieyunhu opened this issue Feb 14, 2023 · 2 comments

Comments

@jieyunhu
Copy link

jieyunhu commented Feb 14, 2023

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.
  • I am not looking for support or already pursued the available support channels without success.

Version

19.2

Installation Type

Official Docker Compose

Describe the details of the bug and the steps to reproduce it

项目是java类型的,但是支持groovy 脚本保存和执行的功能扩展,在部署java类型的 agent之后,项目之前功能正常的groovy脚本保存报错,通过查看项目日志发现,该部分项目日志显示识别groovy语义的过程变成了java的语义。
于是我们通过卸载agent,该功能正常恢复。所以,请问这种场景下有什么合适的解决方案吗?
JDK版本 :openjdk version "17.0.2"

package groovy.script.online
import groovy.util.logging.Slf4j
import *.*.*.timp.cescript.polyglot.ICallGroovy

@Slf4j
class Classtest2 extends SuperClasstest2 implements ICallGroovy {
    @Override
    java.lang.Object run(java.util.Map<String, Object> params) {
        return "OK";
    }
}

import java.util.Map
import java.util.HashMap
import java.util.LinkedHashMap
import java.util.List
import java.util.ArrayList


class SuperClasstest2 {

}

Additional Information

No response

Logs

2023-02-13 14:46:05.554 BaseHandlerExceptionResolver.java:128 - 错误堆栈信息: 
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script_3b622f2156713625d519fb2af51c319f.groovy: 9: Can't have an abstract method in a non-abstract class. The class 'groovy.script.online.ClassCATOR' must be declared abstract or the method 'java.lang.Object run(java.util.Map)' must be implemented.
 @ line 9, column 1.
   @Slf4j
   ^
@lostsnow
Copy link
Member

Currently agent does not have a special compatibility treatment for groovy, so incompatibilities may occur

@lostsnow
Copy link
Member

lostsnow commented Feb 15, 2023

If possible, you can provide a complete exception stack or a more complete reproduction of the code

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

2 participants