我是从https://svn.apache.org/repos/asf下载下来nutch。之后maven工程。什么配置也没改。直接运行TestURLFilters这个单元测试。报一下异常,希望高手指点一下。
java.lang.RuntimeException: org.apache.nutch.net.URLFilter not found.
at org.apache.nutch.net.URLFilters.<init>(URLFilters.java:52)以上问题已解决。http://blog.csdn.net/wangzhaodong001/article/details/8597801
但是又引起另一个问题。
java.lang.RuntimeException:org.apache.nutch.plugin.PluginRuntimeException:java.lang.ClassNotFoundException:org.apache.nutch.net.RegexURLFilter
atorg.apache.nutch.net.URLFilters.<init>(URLFilters.java:77)
atorg.apache.nutch.net.TestURLFilters.testNonExistingUrlFilter(TestURLFilters.java:36)
atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
atjava.lang.reflect.Method.invoke(Method.java:597)
atjunit.framework.TestCase.runTest(TestCase.java:154)
atjunit.framework.TestCase.runBare(TestCase.java:127)
atjunit.framework.TestResult$1.protect(TestResult.java:106)
atjunit.framework.TestResult.runProtected(TestResult.java:124)
atjunit.framework.TestResult.run(TestResult.java:109)
atjunit.framework.TestCase.run(TestCase.java:118)
atorg.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
atorg.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Causedby:org.apache.nutch.plugin.PluginRuntimeException:java.lang.ClassNotFoundException:org.apache.nutch.net.RegexURLFilter
atorg.apache.nutch.plugin.Extension.getExtensionInstance(Extension.java:166)
atorg.apache.nutch.net.URLFilters.<init>(URLFilters.java:57)
...17more
Causedby:java.lang.ClassNotFoundException:org.apache.nutch.net.RegexURLFilter
atjava.net.URLClassLoader$1.run(URLClassLoader.java:202)
atjava.security.AccessController.doPrivileged(NativeMethod)
atjava.net.URLClassLoader.findClass(URLClassLoader.java:190)
atjava.lang.ClassLoader.loadClass(ClassLoader.java:307)
atjava.lang.ClassLoader.loadClass(ClassLoader.java:248)
atorg.apache.nutch.plugin.Extension.getExtensionInstance(Extension.java:156)
...18more
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。