File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Cannot instantiate the class (testng + Ant) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Cannot instantiate the class (testng + Ant)" Watch "Cannot instantiate the class (testng + Ant)" New topic

Cannot instantiate the class (testng + Ant)

Shashank Gollapudi
Ranch Hand

Joined: Jan 19, 2012
Posts: 33

I am trying to run my Selenium webdriver class using testng and below is my build.xml file and when i try running it, i keep getting the following error and i unable to trace the cause, as i cant see any reason for the class to be instantiated.

Any help on this is purely appreciated.

Peter Johnson

Joined: May 14, 2008
Posts: 5811

Try running ant with the -v option, that should print the classpath for the <testng> task which should give you some ides.

JBoss In Action
I agree. Here's the link:
subject: Cannot instantiate the class (testng + Ant)
Similar Threads
Reference junit.path not found while running ANT
taskdef class org.testng.TestNGAntTask can't be found
Ant: while compiling it doen not recognize junit related things and shows errors