-
Notifications
You must be signed in to change notification settings - Fork 493
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
sword2-server library overrides tika's apache-mime4j-core dependency with older version #9077
Comments
@janvanmansum I'm sorry, but Java Modules might be unlikely to help here. As the SWORD library is requiring a RFC 5023 implementation and the only one around is the dead Apache Abdera project (and I guess no one wants to reimplement or fork that lib) and these dependencies are not Java 9+ enabled, I'm not sure this would solve our problem. Usually, the way to deal with such conflicts is to use a proper entry in but As we control the lib (please find it at https://github.com/gdcc/sword2-server), we might choose to go a different path here. As the Abdera lib is not updated any longer, it might be preferable to freeze its dependencies in time instead of crossing fingers on every update of transitive dependencies. How about shading the complete Abdera lib and it's dependencies into the SWORD lib JAR? |
@poikilotherm do you think we should do what @PaulBoon did in the following pull request? |
@pdurbin Is there any reason not to apply the suggested fix, because it would be great if we can get rid of this issue with the next release. |
@PaulBoon you're talking about DANS-KNAW#173 right, not the fix @poikilotherm suggested above? |
@pdurbin I am talking about the solution we have working, however if a better solution is available soon that would be nice. Meanwhile we can use the fix we have. |
- Apache Abdera Parser, Apache Tika and RESTeasy (Testing) use MIME4J - Tika and RESTeasy use newer APIs only present since v0.8+ - Abdera is an abandoned project, uses v0.7.2 and is hopefully compatible with newer releases - v0.8.4 given by Apache Tika relies on vulnerable Apache Commons IO 2.6, we want 2.11 per dependency management. Upgrading to v0.8.7 as earliest version with 2.11 dependency
- Apache Abdera Parser, Apache Tika and RESTeasy (Testing) use MIME4J - Tika and RESTeasy use newer APIs only present since v0.8+ - Abdera is an abandoned project, uses v0.7.2 and is hopefully compatible with newer releases - v0.8.4 given by Apache Tika relies on vulnerable Apache Commons IO 2.6, we want 2.11 per dependency management. Upgrading to v0.8.7 as earliest version with 2.11 dependency
What steps does it take to reproduce the issue?
Turn full text indexing on:
curl -X PUT -d true http://localhost:8080/api/admin/settings/:SolrFullTextIndexing
Create a dataset
Upload an e-mail file, for example
Attached here: email.txt
An error is displayed, even though the file is added. This is because full text indexing fails. The following error is found in the logs:
When does this issue occur?
When a e-mail file is to be indexed.
Which page(s) does it occurs on?
Not really a user interface issue, but an error is displayed when you upload the file.
What happens?
See above
To whom does it occur (all users, curators, superusers)?
all users
What did you expect to happen?
The file should be indexed correctly
Which version of Dataverse are you using?
Any related open or closed issues to this bug report?
The problem is a recurring one: dependencies needed by Tika are overriden by older ones, so that the required classes or methods are not found at runtime. In this case
sword2-server
is the culprit. The quick fix is to exclude apache-mime4j-core from thesword2-server
dependency (thanks to @qqmyers for the suggestion). A more solid fix would possibly be introducing Java modules into Dataverse, so that the transitive dependencies of primary dependencies don't interfere with one another.The text was updated successfully, but these errors were encountered: