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

Update commons-codec version and include it in shaded jar #193

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

whikloj
Copy link
Contributor

@whikloj whikloj commented May 23, 2023

JIRA Ticket: https://fedora-repository.atlassian.net/browse/FCREPO-3892 and #192

What does this Pull Request do?

Updates the version of commons-codec and adds the ServicesResourceTransformer to the shade plugin to ensure the Jena dependencies end up in the final jar.

How should this be tested?

Make a container with some blank nodes (see linked tickets), then try to index it to a triplestore.

Before PR: get a stacktrace with java.lang.NoClassDefFoundError: org/apache/commons/codec/digest/MurmurHash3 in it.

After PR: resource is indexed to triplestore

Additional Notes:

Example:

  • Does this change require documentation to be updated? no
  • Does this change add any new dependencies? yes and no
  • Does this change require any other modifications to be made to the repository (ie. Regeneration activity, etc.)? no
  • Could this change impact execution of existing code? no

Interested parties

Tag (@ mention) interested parties or, if unsure, @fcrepo/committers

Copy link
Contributor

@mikejritter mikejritter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After rebuilding I can see the commons-codec classes in the jar. Admittedly I don't know how to add a blank node (I tried w/ the resource from the issue but was unable to replicate), which is triggering the exception, but considering the classes were missing from the jar before the exception should no longer occur.

@whikloj
Copy link
Contributor Author

whikloj commented May 25, 2023

Just for clarity in the associated Github issue and Jira the blank nodes are identifier by the underscore colon
i.e. _:b1 and _:b0 and _:b2

So this

curl -v -ufedoraAdmin:fedoraAdmin -H"Content-type: text/turtle" -d "<> <http://example.org/somePredicate> _:b0 . _:b0 <http://purl.org/dc/elements/1.1/title> 'Some title' ." -XPOST -H"Slug: testContainer" http://localhost:8080/rest

should generate a resource with a blank node in it.

@mikejritter
Copy link
Contributor

@whikloj I got around to redoing my docker setup this morning for testing this and got the exception to replicate and the verifying the fix. Going to merge this now.

@mikejritter mikejritter merged commit c959e0b into fcrepo-exts:main Jun 12, 2023
@whikloj whikloj deleted the FCREPO-3892 branch May 1, 2024 19:01
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