eclipse运行nutch单元测试报错:org.apache.nutch.ne?报错-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

eclipse运行nutch单元测试报错:org.apache.nutch.ne?报错

爱吃鱼的程序员 2020-06-22 21:46:30 11

我是从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)
at org.apache.nutch.net.TestURLFilters.testNonExistingUrlFilter(TestURLFilters.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Java 测试技术 Maven Android开发
分享到
取消 提交回答
全部回答(1)
  • 爱吃鱼的程序员
    2020-06-22 21:46:48

    以上问题已解决。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



    0 0
开发与运维
使用钉钉扫一扫加入圈子
+ 订阅

集结各类场景实战经验,助你开发运维畅行无忧

推荐文章
相似问题
推荐课程