连接到localhost上的SLiM服务器时出错:8080

时间:2014-03-13 17:40:05

标签: java git unit-testing fitnesse-slim

我使用java&运行测试用例FitNesse的...

同时点击"测试"图片下方的按钮,

page

显示错误如下:

   Standard Error:
 Exception in thread "main" java.lang.NoClassDefFoundError: ":build/classes://////var/www/git/vodaware/java/Build:/root/leadout-tests///////var/www/git/vodaware/java/supportLibs/mockito-all-1/9/5/jar:/root/leadout-tests///////var/www/git/vodaware/java/supportLibs/jsp-api/jar:/root/leadout-tests///////var/www/git/vodaware/java/supportLibs/testng-6/8/7/jar:/root/leadout-tests///////var/www/git/vodaware/java/supportLibs/servlet-api/jar:/root/leadout-tests///////var/www/git/vodaware/java/supportLibs/jcip-annotations-1/0/jar
Caused by: java.lang.ClassNotFoundException: ":build.classes:......var.www.git.vodaware.java.Build:.root.leadout-tests.......var.www.git.vodaware.java.supportLibs.mockito-all-1.9.5.jar:.root.leadout-tests.......var.www.git.vodaware.java.supportLibs.jsp-api.jar:.root.leadout-tests.......var.www.git.vodaware.java.supportLibs.testng-6.8.7.jar:.root.leadout-tests.......var.www.git.vodaware.java.supportLibs.servlet-api.jar:.root.leadout-tests.......var.www.git.vodaware.java.supportLibs.jcip-annotations-1.0.jar
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: ":build/classes:../../var/www/git/vodaware.java/Build:/root/leadout-tests/../../var/www/git/vodaware.java/supportLibs/mockito-all-1.9.5.jar:/root/leadout-tests/../../var/www/git/vodaware.java/supportLibs/jsp-api.jar:/root/leadout-tests/../../var/www/git/vodaware.java/supportLibs/testng-6.8.7.jar:/root/leadout-tests/../../var/www/git/vodaware.java/supportLibs/servlet-api.jar:/root/leadout-tests/../../var/www/git/vodaware.java/supportLibs/jcip-annotations-1.0.jar. Program will exit.

这个日志的原因是什么?请有人帮助我。

1 个答案:

答案 0 :(得分:0)

如错误所示,程序无法找到java类。你需要确保 类路径设置正确,并确保正确设置包位置。

前:

classpath:foo / bar /

包:jane / doe.class

请确保在fitnesse列中设置包层次结构时正确提及包层次结构。

希望这会有所帮助。