[Bug]: Linkage error when loading interface implementation of a compiler plugin from a Ballerina Tool #41957
Labels
Area/CLI
Ballerina CLI related issues.
Reason/Complex
Issue occurred due to complex scenario.
Team/DevTools
Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs )
Type/Bug
Milestone
Description
When a Ballerina compiler plugin implements an interface from a Ballerina tool, an attempt to load this interface implementation through the Ballerina tool using
URLClassLoader
with the parent class loader set asCustomToolClassLoader
, and employingServiceLoader
, it results in ajava.lang.LinkageError
. The error specifically points to an attempted duplicate interface definition, preventing the expected loading and invocation of methods within the implemented class of the compiler plugin.Steps to Reproduce
Clone the thin-jar-service-loading branch of the repository here and follow the instructions in the README file.
Affected Version(s)
Ballerina 2201.8.2
OS, DB, other environment details and versions
No response
Related area
-> Runtime
Related issue(s) (optional)
No response
Suggested label(s) (optional)
Area/CLI, Team/DevTools
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: