You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Mike Cannon-Brookes (JIRA)" <ji...@apache.org> on 2005/12/15 23:22:45 UTC
[jira] Created: (NUTCH-142) NutchConf should use the thread context classloader
NutchConf should use the thread context classloader
---------------------------------------------------
Key: NUTCH-142
URL: http://issues.apache.org/jira/browse/NUTCH-142
Project: Nutch
Type: Improvement
Versions: 0.7
Reporter: Mike Cannon-Brookes
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).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (NUTCH-142) NutchConf should use the thread context classloader
Posted by "Piotr Kosiorowski (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/NUTCH-142?page=comments#action_12361492 ]
Piotr Kosiorowski commented on NUTCH-142:
-----------------------------------------
Thanks. Fixed in 0.7 branch. Left open to fix it in trunk after cleaning trunk JUnit test problems (in next few days).
> NutchConf should use the thread context classloader
> ---------------------------------------------------
>
> Key: NUTCH-142
> URL: http://issues.apache.org/jira/browse/NUTCH-142
> Project: Nutch
> Type: Improvement
> Versions: 0.7
> Reporter: Mike Cannon-Brookes
>
> 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).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (NUTCH-142) NutchConf should use the thread context classloader
Posted by "Piotr Kosiorowski (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/NUTCH-142?page=all ]
Piotr Kosiorowski closed NUTCH-142:
-----------------------------------
Fix Version: 0.7.2-dev
0.8-dev
Resolution: Fixed
> NutchConf should use the thread context classloader
> ---------------------------------------------------
>
> Key: NUTCH-142
> URL: http://issues.apache.org/jira/browse/NUTCH-142
> Project: Nutch
> Type: Improvement
> Versions: 0.7
> Reporter: Mike Cannon-Brookes
> Fix For: 0.7.2-dev, 0.8-dev
>
> 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).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira