zoukankan      html  css  js  c++  java
  • Cannot find class in classpath 报错

    删除项目文件夹下的target文件夹里面内容,重新运行测试代码,报错

    org.testng.TestNGException:
    Cannot find class in classpath: com.fc.htgl.testcases.TestOrderYD
    at org.testng.xml.XmlClass.loadClass(XmlClass.java:81)
    at org.testng.xml.XmlClass.init(XmlClass.java:73)
    at org.testng.xml.XmlClass.<init>(XmlClass.java:59)
    at org.testng.xml.TestNGContentHandler.startElement(TestNGContentHandler.java:546)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at org.testng.xml.XMLParser.parse(XMLParser.java:38)
    at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:16)
    at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:9)
    at org.testng.xml.Parser.parse(Parser.java:172)
    at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:300)
    at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:103)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:137)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:58)

    解决办法:

    需要重新build 

    Eclipse> Project > Clean 

  • 相关阅读:
    平衡树(Splay):Splaytree POJ 3580 SuperMemo
    数据结构:(平衡树,链表)BZOJ 1588[HNOI2002]营业额统计
    主席树:HDU 4417 Super Mario
    主席树:POJ2104 K-th Number (主席树模板题)
    后缀数组模板
    后缀数组:HDU1043 Longest Common Substring
    后缀数组:SPOJ SUBST1
    关于PHP程序员解决问题的能力
    现在写 PHP,你应该知道这些
    PHP 7 的几个新特性
  • 原文地址:https://www.cnblogs.com/testway/p/5595096.html
Copyright © 2011-2022 走看看