chunjun
chunjun copied to clipboard
[hotfix-1147] classNotFound com.google.commom.cache.CacheBuilder
Purpose of this pull request
Chunjun core exclude all guava package, and shade rename guava cause standalone mode NoDefClassFound.
Which issue you fix
Fixes # (1147).
Checklist:
- [ ] I have executed the 'mvn spotless:apply' command to format my code.
- [ ] I have a meaningful commit message (including the issue id, the template of commit message is '[label-type-#issue-id][fixed-module] a meaningful commit message.')
- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] New and existing unit tests pass locally with my changes.
- [ ] I have checked my code and corrected any misspellings.
- [ ] My commit is only one. (If there are multiple commits, you can use 'git squash' to compress multiple commits into one.)
I think it is necessary to build a core-shaded project, shaded these dependencies into the core-shaded jar, and then reference core-shaded by core, so there will be no problem.It should not be controlled from the connector level, because the connector is uncontrollable. @zoudaokoulife @FlechazoW
I think that we should modify package of connectors to fix this problem.
- if one connector doesn't import dependencies of guava, it should also shade dependency of guava to 'shade.core.com.google.common'. 2)if one connector imports dependencies of guava, it should shade dependency of guava to 'shade.{$connectorName}.com.google.common'.