Issue Details (XML | Word | Printable)

Key: NUTCH-142
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Mike Cannon-Brookes
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Nutch

NutchConf should use the thread context classloader

Created: 16/Dec/05 07:21 AM   Updated: 05/Jan/06 05:37 AM
Return to search
Component/s: None
Affects Version/s: 0.7
Fix Version/s: 0.7.2, 0.8

Time Tracking:
Not Specified

Resolution Date: 05/Jan/06 05:37 AM


 Description  « Hide
Right now NutchConf uses it's own static classloader which is evil in a J2EE scenario.

This is simply fixed. Line 52:

private ClassLoader classLoader = NutchConf.class.getClassLoader();

Should be:

private ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

This means no matter where Nutch classes are loaded from, it will use the correct J2EE classloader to try to find configuration files (ie from WEB-INF/classes).



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.