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

Remove ballerina/regex dependency #152

Merged
merged 4 commits into from
Apr 30, 2024

Conversation

NipunaMadhushan
Copy link
Contributor

Purpose

In some occasions, the following error occurs intermittently.

2024-04-25 09:15:29,335] SEVERE {b7a.log.crash} - 'io.ballerina.runtime.api.values.BString ballerina.regex.1.natives.replaceAll(io.ballerina.runtime.internal.scheduling.Strand, io.ballerina.runtime.api.values.BString, io.ballerina.runtime.api.values.BString, java.lang.Object)' 
java.lang.NoSuchMethodError: 'io.ballerina.runtime.api.values.BString ballerina.regex.1.natives.replaceAll(io.ballerina.runtime.internal.scheduling.Strand, io.ballerina.runtime.api.values.BString, io.ballerina.runtime.api.values.BString, java.lang.Object)'
        at ballerinax.prometheus.0.metric_reporter.getEscapedName(metric_reporter.bal:164)
        at ballerinax.prometheus.0.$value$$anonType$_0.$get$metrics(metric_reporter.bal:68)
        at ballerinax.prometheus.0.$value$$anonType$_0.call(metric_reporter.bal)
        at io.ballerina.runtime.internal.BalRuntime.lambda$getFunction$1(BalRuntime.java:322)
        at io.ballerina.runtime.internal.scheduling.SchedulerItem.execute(SchedulerItem.java:54)
        at io.ballerina.runtime.internal.scheduling.Scheduler.run(Scheduler.java:320)
        at io.ballerina.runtime.internal.scheduling.Scheduler.runSafely(Scheduler.java:287)
        at java.base/java.lang.Thread.run(Thread.java:833)
 
error: java.lang.NoSuchMethodError: 'io.ballerina.runtime.api.values.BString ballerina.regex.1.natives.replaceAll(io.ballerina.runtime.internal.scheduling.Strand, io.ballerina.runtime.api.values.BString, io.ballerina.runtime.api.values.BString, java.lang.Object)'
        at ballerinax.prometheus.0:getEscapedName(metric_reporter.bal:164)
           ballerinax.prometheus.0.$anonType$_0:$get$metrics(metric_reporter.bal:68)

ballerina/regex module has been replaced by the lang.regexp module. Therefore, we can replace the ballerina/regex dependency with lang.regexp.

@keizer619 keizer619 merged commit 364eeed into ballerina-platform:main Apr 30, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants