4 Replies Latest reply on Nov 3, 2007 6:04 PM by Dmitriy Lapko

    TestNG/SeamTest NPE in xml parsing

    Vijayanandraj Amaladoss Newbie

      I am trying to Unit test entities using SeamTest and TestNG. I have a strange problem in running TestNG(SeamTest). When I am connected to internet
      running a ant test throws a exception shown below.

      test:
       [testng] Exception in thread "main" java.lang.NullPointerException
       [testng] at org.testng.xml.Parser.parse(Parser.java:162)
       [testng] at org.testng.TestNG.setTestSuites(TestNG.java:472)
       [testng] at org.testng.TestNG.configure(TestNG.java:866)
       [testng] at org.testng.TestNG.privateMain(TestNG.java:822)
       [testng] at org.testng.TestNG.main(TestNG.java:802)
      

      When I detach from internet it throws an exception(below) but continues to run tests.


      test:
       [testng] java.net.UnknownHostException: hibernate.sourceforge.net
       [testng] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
       [testng] at java.net.Socket.connect(Socket.java:520)
       [testng] at java.net.Socket.connect(Socket.java:470)
       [testng] at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
       [testng] at sun.net.www.http.HttpClient.openServer(HttpClient.java:387)
       [testng] at sun.net.www.http.HttpClient.openServer(HttpClient.java:522)
       [testng] at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
       [testng] at sun.net.www.http.HttpClient.New(HttpClient.java:304)
       [testng] at sun.net.www.http.HttpClient.New(HttpClient.java:321)
       [testng] at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(
      
      

      I understand this is something to do with validating parsers, but both xerces/xml-api is not in my class path as I am using seam-gen based application.