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

SPARKNLP-839 Fix Java Compatibility Issue #13806

Conversation

danilojsl
Copy link
Contributor

Removing SystemUtils dependency in favor of Java compatibility

Description

This changes fixes an error presented when using spark-nlp as a dependency in a Java project

Motivation and Context

Fix the following error:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-05-13 10:15:11.314 ERROR 19571 --- [           main] o.s.boot.SpringApplication               : Application run failed

java.lang.NoClassDefFoundError: org/apache/commons/lang/SystemUtils
	at com.johnsnowlabs.nlp.annotators.ner.dl.LoadsContrib$.contribPaths$lzycompute(LoadsContrib.scala:42) ~[spark-nlp_2.12-4.2.0.jar:4.2.0]
	at com.johnsnowlabs.nlp.annotators.ner.dl.LoadsContrib$.contribPaths(LoadsContrib.scala:41) ~[spark-nlp_2.12-4.2.0.jar:4.2.0]
	at com.johnsnowlabs.nlp.annotators.ner.dl.LoadsContrib$.loadContribToCluster(LoadsContrib.scala:76) ~[spark-nlp_2.12-4.2.0.jar:4.2.0]

How Has This Been Tested?

Running the following Java application with SpringBoot: https://github.com/danilojsl/JSLLightNLP

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Code improvements with no or little impact
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING page.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@danilojsl danilojsl added bug-fix DON'T MERGE Do not merge this PR labels May 20, 2023
@coveralls
Copy link

Pull Request Test Coverage Report for Build 5029887318

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage remained the same at 65.844%

Files with Coverage Reduction New Missed Lines %
src/main/scala/com/johnsnowlabs/nlp/annotators/sentence_detector_dl/SentenceDetectorDLModel.scala 2 82.72%
Totals Coverage Status
Change from base Build 4945586143: 0.0%
Covered Lines: 8640
Relevant Lines: 13122

💛 - Coveralls

@maziyarpanahi maziyarpanahi changed the base branch from master to release/443-release-candidate May 24, 2023 11:56
@maziyarpanahi maziyarpanahi merged commit 1131c3c into release/443-release-candidate May 25, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix DON'T MERGE Do not merge this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants