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
Repository Revision Date User Message
ASF #360551 Sun Jan 01 21:09:11 UTC 2006 pkosiorowski NUTCH-142 - NutchConf should use the thread context classloader. (Mike Cannon-Brookes).
Files Changed
MODIFY /lucene/nutch/branches/branch-0.7/CHANGES.txt
MODIFY /lucene/nutch/branches/branch-0.7/src/java/org/apache/nutch/util/NutchConf.java

Piotr Kosiorowski added a comment - 02/Jan/06 06:10 AM
Thanks. Fixed in 0.7 branch. Left open to fix it in trunk after cleaning trunk JUnit test problems (in next few days).

Repository Revision Date User Message
ASF #365977 Wed Jan 04 20:36:56 UTC 2006 pkosiorowski NUTCH-142 - NutchConf should use the thread context classloader. (Mike Cannon-Brookes).
Files Changed
MODIFY /lucene/nutch/trunk/src/java/org/apache/nutch/util/NutchConf.java

Piotr Kosiorowski made changes - 05/Jan/06 05:37 AM
Field Original Value New Value
Resolution Fixed [ 1 ]
Fix Version/s 0.8-dev [ 12310224 ]
Status Open [ 1 ] Closed [ 6 ]
Fix Version/s 0.7.2-dev [ 12310360 ]