Repository navigation
JSPWIKI-1207 Look for the ehcache configuration with the class loader of the thread too - #636
Open
arturobernalg wants to merge 1 commit into
Open
arturobernalg wants to merge 1 commit into
arturobernalg wants to merge 1 commit into
Conversation
…d too The configuration file was only looked for with the class loader of EhcacheCachingManager. In the portable builds the jars are in a library shared by the web applications, so that class loader does not see the classes folder of each wiki, the URL was null and the wiki did not start. That is why the cache was disabled in the portable builds. The class loader of the thread is tried when the first one does not find the file, the cache is enabled again in the two wikis of the portable, and the configuration file of the department wiki gets the extension that it was missing.
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.
EhcacheCachingManager only looked for the configuration file with its own class loader. In the portable builds the jars are in a library shared by the web applications, so that class loader does not see the classes folder of each wiki, the URL is null and the wiki does not start. The cache was disabled in the portable builds as a temporary fix (JSPWIKI-1207). The class loader of the thread is now tried when the first one does not find the file, the cache is enabled again in the two wikis of the portable, and the configuration file of the department wiki gets the
.xmlextension it was missing.Run on this change: a new test in EhcacheCachingManagerTest fails without it with "Error configuring from null" and passes with it;
mvn clean packagewith all the tests passes (1446 tests); the portable starts with its own Tomcat, the two wikis answer 200 and each one reads its own ehcache file, with no SEVERE in the log.@spyhunter99