[Nutch Wiki] Update of GettingNutchRunningWithJboss b y TerrenceCurran
Dear Wiki user, You have subscribed to a wiki page or wiki category on Nutch Wiki for change notification. The GettingNutchRunningWithJboss page has been changed by TerrenceCurran. http://wiki.apache.org/nutch/GettingNutchRunningWithJboss -- New page: = Running Nutch with JBoss AS 5.1 = I only had to make minor changes beyond the basic Tomcat tutorials to get Nutch running on JBoss AS 5.1 == Deployment == Make sure that your nutch-site.xml file is configured in your packaged .war file, or exploded .war directory. == Xerces == JBoss ships with a different version of Xerces installed and available to all deployed applications. I was getting an error about the conflict. Removing xerces-2_x_x-apis.jar and xerces-2_x_x.jar from the war file's lib directory fixed the problem. == Code changes == In the file: /src/java/org/apache/nutch/plugin/PluginManifestParser.java Nutch checks has a check to make sure it can find the plugin folder. The check looks like this: {{{ } else if (!file.equals(url.getProtocol())) { LOG.warn(Plugins: not a file: url. Can't load plugins from: + url); return null; } }}} This does not work in jboss because local files in the deployment directory have a protocol of vfsfile:// since vfsfile acts just like file, you just have to change this code to: {{{ } else if (!file.equals(url.getProtocol()) !vfsfile.equals(url.getProtocol())) { LOG.warn(Plugins: not a file: url. Can't load plugins from: + url); return null; } }}}
[Nutch Wiki] Update of FrontPage by TerrenceCurran
Dear Wiki user, You have subscribed to a wiki page or wiki category on Nutch Wiki for change notification. The FrontPage page has been changed by TerrenceCurran. http://wiki.apache.org/nutch/FrontPage?action=diffrev1=121rev2=122 -- * GettingNutchRunningWithUtf8 - For support of non-ASCII characters (Chinese, German, Japanese, Korean). * GettingNutchRunningWithResin - Resin is a JSP/Servlet/EJB application server (alternative to tomcat). * GettingNutchRunningWithJetty + * GettingNutchRunningWithJboss * GettingNutchRunningWithUbuntu * GettingNutchRunningWithWindows * GettingNutchRunningWithMacOsx
[jira] Created: (NUTCH-764) Add support for vfsfile:// loading of plugins for JBoss
Add support for vfsfile:// loading of plugins for JBoss --- Key: NUTCH-764 URL: https://issues.apache.org/jira/browse/NUTCH-764 Project: Nutch Issue Type: Improvement Components: searcher Affects Versions: 1.0.0 Environment: JBoss AS 5.1.0 Reporter: tcur...@approachingpi.com Priority: Trivial In the file: /src/java/org/apache/nutch/plugin/PluginManifestParser.java There is a check to make sure that the plugin file location is a url formatted like file://path/plugins. When deployed on Jboss, the file protocol will sometimes be: vfsfile://path/plugins. The code with vfsfile can operate the same so I propose a change to the check to also allow this protocol. This would allow Nutch to be deployed on the newer versions of JBoss without any modification. The altered block of code would look like this: if (url == null directory.exists() directory.isDirectory() directory.listFiles().length 0) { return directory; // relative path that is not in the classpath } else if (url == null) { LOG.warn(Plugins: directory not found: + name); return null; } else if (!file.equals(url.getProtocol()) !vfsfile.equals(url.getProtocol())) { LOG.warn(Plugins: not a file: url. Can't load plugins from: + url); return null; } Index: src/java/org/apache/nutch/plugin/PluginManifestParser.java === --- src/java/org/apache/nutch/plugin/PluginManifestParser.java Mon Nov 09 20:20:51 EST 2009 +++ src/java/org/apache/nutch/plugin/PluginManifestParser.java Mon Nov 09 20:20:51 EST 2009 @@ -121,7 +121,8 @@ } else if (url == null) { LOG.warn(Plugins: directory not found: + name); return null; - } else if (!file.equals(url.getProtocol())) { + } else if (!file.equals(url.getProtocol()) +!vfsfile.equals(url.getProtocol())) { LOG.warn(Plugins: not a file: url. Can't load plugins from: + url); return null; } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (NUTCH-764) Add support for vfsfile:// loading of plugins for JBoss
[ https://issues.apache.org/jira/browse/NUTCH-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] tcur...@approachingpi.com updated NUTCH-764: Description: In the file: /src/java/org/apache/nutch/plugin/PluginManifestParser.java There is a check to make sure that the plugin file location is a url formatted like file://path/plugins. When deployed on Jboss, the file protocol will sometimes be: vfsfile://path/plugins. The code with vfsfile can operate the same so I propose a change to the check to also allow this protocol. This would allow Nutch to be deployed on the newer versions of JBoss without any modification. Here is a simple patch: Index: src/java/org/apache/nutch/plugin/PluginManifestParser.java === --- src/java/org/apache/nutch/plugin/PluginManifestParser.java Mon Nov 09 20:20:51 EST 2009 +++ src/java/org/apache/nutch/plugin/PluginManifestParser.java Mon Nov 09 20:20:51 EST 2009 @@ -121,7 +121,8 @@ } else if (url == null) { LOG.warn(Plugins: directory not found: + name); return null; - } else if (!file.equals(url.getProtocol())) { + } else if (!file.equals(url.getProtocol()) +!vfsfile.equals(url.getProtocol())) { LOG.warn(Plugins: not a file: url. Can't load plugins from: + url); return null; } was: In the file: /src/java/org/apache/nutch/plugin/PluginManifestParser.java There is a check to make sure that the plugin file location is a url formatted like file://path/plugins. When deployed on Jboss, the file protocol will sometimes be: vfsfile://path/plugins. The code with vfsfile can operate the same so I propose a change to the check to also allow this protocol. This would allow Nutch to be deployed on the newer versions of JBoss without any modification. The altered block of code would look like this: if (url == null directory.exists() directory.isDirectory() directory.listFiles().length 0) { return directory; // relative path that is not in the classpath } else if (url == null) { LOG.warn(Plugins: directory not found: + name); return null; } else if (!file.equals(url.getProtocol()) !vfsfile.equals(url.getProtocol())) { LOG.warn(Plugins: not a file: url. Can't load plugins from: + url); return null; } Index: src/java/org/apache/nutch/plugin/PluginManifestParser.java === --- src/java/org/apache/nutch/plugin/PluginManifestParser.java Mon Nov 09 20:20:51 EST 2009 +++ src/java/org/apache/nutch/plugin/PluginManifestParser.java Mon Nov 09 20:20:51 EST 2009 @@ -121,7 +121,8 @@ } else if (url == null) { LOG.warn(Plugins: directory not found: + name); return null; - } else if (!file.equals(url.getProtocol())) { + } else if (!file.equals(url.getProtocol()) +!vfsfile.equals(url.getProtocol())) { LOG.warn(Plugins: not a file: url. Can't load plugins from: + url); return null; } Add support for vfsfile:// loading of plugins for JBoss --- Key: NUTCH-764 URL: https://issues.apache.org/jira/browse/NUTCH-764 Project: Nutch Issue Type: Improvement Components: searcher Affects Versions: 1.0.0 Environment: JBoss AS 5.1.0 Reporter: tcur...@approachingpi.com Priority: Trivial In the file: /src/java/org/apache/nutch/plugin/PluginManifestParser.java There is a check to make sure that the plugin file location is a url formatted like file://path/plugins. When deployed on Jboss, the file protocol will sometimes be: vfsfile://path/plugins. The code with vfsfile can operate the same so I propose a change to the check to also allow this protocol. This would allow Nutch to be deployed on the newer versions of JBoss without any modification. Here is a simple patch: Index: src/java/org/apache/nutch/plugin/PluginManifestParser.java === --- src/java/org/apache/nutch/plugin/PluginManifestParser.javaMon Nov 09 20:20:51 EST 2009 +++ src/java/org/apache/nutch/plugin/PluginManifestParser.javaMon Nov 09 20:20:51 EST 2009 @@ -121,7 +121,8 @@ } else if (url == null) { LOG.warn(Plugins: directory not found: + name); return null; - } else if (!file.equals(url.getProtocol())) { + } else if (!file.equals(url.getProtocol()) +!vfsfile.equals(url.getProtocol())) { LOG.warn(Plugins: not a file: url. Can't load plugins from: + url); return null; } -- This message is automatically generated by JIRA. - You can reply to this email to add a