NMS-20165: remove beanshell - #8744
Open
dino2gnt wants to merge 5 commits into
Open
Conversation
dino2gnt
requested review from
cgorantla,
christianpape,
indigo423 and
marshallmassengill
August 5, 2026 14:12
christianpape
requested changes
Aug 6, 2026
christianpape
left a comment
Contributor
There was a problem hiding this comment.
So, we do not support any use of bsh.util.BeanShellBSFEngine anymore, right? This means the docs also need to be updated: BSFMonitor.adoc, BsfDetector.adoc and scriptd.adoc.
BSFMonitor.adoc (-52 lines net)
- Migration note near the top: Groovy is what ships, BeanShell is gone, rewrite .bsh scripts and update bsf-engine/lang-class.
- BeanShell dropped from the bsf-engine parameter list, the lang-class description, and the language-settings table.
- Entire "BeanShell example" section removed.
- Corrected a now-wrong install instruction: the Groovy section told users to "copy a compatible groovy-all.jar into $OPENNMS_HOME/lib and restart." Groovy ships with OpenNMS, and groovy-all hasn't been the right artifact since Groovy 2.5 split into modules. Now reads "ships with {page-component-title}, so no additional library
is required."
- Jython kept as-is; BSF still supports it and it genuinely does need a user-supplied jar.
BsfDetector.adoc (-43 lines net)
- Same migration note, adapted to the detector's bsfEngine/langClass parameter names.
- BeanShell removed from both parameter choice lists and the language table; "BeanShell example" section removed.
- The IMPORTANT about placing a library in lib now applies to Jython only, since it was previously scoped to "Groovy or Jython."
Two unrelated defects I fixed while in the files
- Three Groovy blocks in BSFMonitor.adoc were tagged [source, java], so they rendered with Java highlighting. Now [source, groovy].
- The generic response-time-tracking snippet used rrd-base-name of minimalbshbase — a BeanShell-flavored name in a language-neutral section. Renamed to myscriptbase.
Verification
All five Groovy blocks across the two pages extracted, callout markers stripped, and compiled with GroovyShell.parse against a classpath including both opennms-services and features/poller/monitors/core — all pass, so even the advanced example's reference to org.opennms.netmgt.poller.monitors.BSFMonitor resolves. Both pages
render through asciidoctor with exit 0 and no warnings, which also confirms the 4-column tables survived row removal.
Contributor
Author
|
Had to resolve a merge conflict. |
dino2gnt
dismissed stale reviews from marshallmassengill and christianpape
via
August 13, 2026 13:49
5a49f38
Contributor
Author
|
Somehow introduced stray words in the |
dino2gnt
dismissed stale reviews from christianpape and marshallmassengill
via
August 13, 2026 18:34
5037c2a
Contributor
Author
|
Fixed the integration tests for BSFNotificationStrategy after removing Beanshell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Will update these groovy sites to JSR-223 in a future PR.
External References