org.testng.TestNGException: Cannot instantiate class com.perficient.util.result.CustomReportListener


Solutions on the web

Solution icon of stackoverflow
Cannot instantiate class com.perficient.util.result.CustomReportListener

Solution icon of stackoverflow
Cannot instantiate class com.example.util.result.CustomReportListener

Stack trace

org.testng.TestNGException: Cannot instantiate class com.perficient.util.result.CustomReportListener
	at org.testng.internal.ClassHelper.newInstance(ClassHelper.java:53)
	at org.testng.TestNG.initializeConfiguration(TestNG.java:981)
	at org.testng.TestNG.run(TestNG.java:1089)
	at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
	at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
	at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: java.lang.ExceptionInInitializerError
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)
	at org.testng.internal.ClassHelper.newInstance(ClassHelper.java:51)
	... 8 more
Caused by: java.lang.NullPointerException
	at sun.awt.shell.Win32ShellFolder2.access$200(Win32ShellFolder2.java:72)
	at sun.awt.shell.Win32ShellFolder2$1.call(Win32ShellFolder2.java:242)
	at sun.awt.shell.Win32ShellFolder2$1.call(Win32ShellFolder2.java:237)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Win32ShellFolderManager2.java:547)
	at java.lang.Thread.run(Thread.java:745)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
74 times, 1 week ago
134 times, 3 weeks ago
248 times, 3 months ago
96 times, 4 months ago
23 more bugmates