快捷搜索:  as  2018  FtCWSyGV  С˵  test  xxx  Ψһ  w3viyKQx

和记娱乐下载官方平台:运行selenium2出现NoClassDefFoundErrorJava Java SE



简介:这是运行selenium2呈现NoClassDefFoundError - Java / Java SE的具体页面,先容了和java,运行selenium2呈现NoClassDefFoundError - Java / Java SE有关的和记娱乐下载官方平台常识,加入收藏请按键盘ctrl+D,感谢大年夜家的不雅看!要查看更多有关信息,请点击此处

下载了selenium2alpha4版本,是一个zip包,解开后是一些jar文件,由于必要在classpath设置这些文件,以是编写了一个cmd文件:

==================

set java_home=C:\Program Files\Java\jre6

set classpath=.;selenium-server-2.0a4.jar;ant-1.6.5.jar;bcprov-jdk15-135.jar;commons-codec-1.4.jar;commons-collections-3.2.1.jar;commons-httpclient-3.1.jar;commons-io-1.4.jar;commons-lang-2.4.jar;commons-logging-1.1.1.jar;cssparser-0.9.5.jar;google-collect-1.0.jar;hamcrest-all-1.1.jar;htmlunit-2.7.jar;htmlunit-core-js-2.7.jar;jmock-2.4.0.jar;jmock-junit3-2.4.0.jar;jna.jar;json-20080701.jar;junit-3.8.1.jar;mx4j-tools-3.0.1.jar;nekohtml-1.9.14.jar;sac-1.3.jar;serializer-2.7.1.jar;servlet-api-2.5-6.1.9.jar;xalan-2.7.1.jar;xercesImpl-2.9.1.jar;xml-apis-1.3.04.jar

"%java_home%\bin\java" -jar selenium-server-2.0a4.jar

==================

运行后报错:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClassCond(Unknown Source)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.access$000(Unknown Source)

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClass和记娱乐下载官方平台Loader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at org.openqa.selenium.server.InjectionHelper.(InjectionHelper.java:21)

at org.openqa.selenium.server.SeleniumSe和记娱乐下载官方平台rver.checkArgsSanity(Selenium和记娱乐下载官方平台Server.java:642)

at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:194)

Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory

at java.net.URLClas和记娱乐下载官方平台sLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

... 15 more

可是commons-logging-1.1.1.jar中明明有org.apache.commons.logging.LogFactory这个类(接口)啊!

您可能还会对下面的文章感兴趣: