My favorites | Sign in
Project Home
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 21: XML Parsing error
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by VickeySa...@gmail.com, Feb 1, 2008
What steps will reproduce the problem?
1. create an empty project in Eclipse, having testNg plugin installed 
"org.testng.eclipse_5.7.0.1"

2. add a new class, assign TestNg Jar "testng-jdk15.jar
" in build path of project

3. type following code in class
 
import org.testng.annotations.*;

public class TestNg {
	
	@Test
	public void test1(){
		System.out.println("Test");
	}

}

4. Right select the function in package explorer and click "RunAs" ->
"TestNg Test"

What is the expected output? What do you see instead?
Expected Output: Test (printed on console)
what i see: Exception in thread "main" java.lang.NullPointerException
	at
org.testng.xml.TestNGContentHandler.resolveEntity(TestNGContentHandler.java:73)
	at
com.sun.org.apache.xerces.internal.util.EntityResolverWrapper.resolveEntity(Unknown
Source)
	at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntityAsPerStax(Unknown
Source)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(Unknown
Source)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(Unknown
Source)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.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 javax.xml.parsers.SAXParser.parse(Unknown Source)
	at javax.xml.parsers.SAXParser.parse(Unknown Source)
	at org.testng.xml.Parser.parseOneFile(Parser.java:261)
	at org.testng.xml.Parser.parse(Parser.java:158)
	at org.testng.TestNG.setTestSuites(TestNG.java:472)
	at org.testng.TestNG.configure(TestNG.java:882)
	at org.testng.remote.RemoteTestNG.configure(RemoteTestNG.java:49)
	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:122)

What version of the product are you using? On what operating system?
Eclipse: Version: 3.3.1.1
         Build id: M20071023-1652
org.testng.eclipse_5.7.0.1
lib: testng-jdk15.jar

Please provide any additional information below.
1) Only  two libraries in build path
    - JRE System
    - TestNG

2) The xml generated by TestNg for the above test case is as follows
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Test">
  <test verbose="2" name="TestNg" annotations="JDK">
    <classes>
      <class name="TestNg"/>
    </classes>
  </test>
</suite>

screen shots attached

-VICKEY SACHDEVA
 
scr.zip
314 KB   Download
Apr 18, 2008
#1 dheni...@gmail.com
I am getting the exact same error, any follow up on a solution?

Powered by Google Project Hosting