Exception before BeforeSuite method is run

47 views
Skip to first unread message

Milos Obrknezev

unread,
Jan 25, 2008, 9:50:40 AM1/25/08
to testng...@googlegroups.com
I'm getting this exception before BeforeSuite method is run. It's weird that Exception is thrown from one method of my class which I don't know who and when could call. That happens only in debbug mode! When I run it, it works fine! It's all happening before a single line of my test class is run in debbug mode. I tried to make breakpoints in my class that throws exception to see what is going on but it behaves like there aren't breakpoints. It's really bothering me which class can on her own call my class and when it happens.

Here is stack trace:

an't configure logger for null class. Logging disabled
java.lang.NullPointerException
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.prozone.edoc.api.Edocumentus.init(Edocumentus.java:200)
at com.prozone.edoc.api.Edocumentus.getInstance(Edocumentus.java:88)
at com.prozone.edoc.api.business.dm.DMDocumentTest.setup(DMDocumentTest.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:262)
at org.testng.SuiteRunner.run(SuiteRunner.java:191)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:808)
at org.testng.TestNG.runSuitesLocally(TestNG.java:776)
at org.testng.TestNG.run(TestNG.java:701)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.prozone.edoc.api.business.wf.WfHistory.<init>(WfHistory.java:67)
at com.prozone.edoc.api.business.EdocWfManager.configure(EdocWfManager.java:54)
at com.prozone.edoc.api.Edocumentus.init(Edocumentus.java:217)
at com.prozone.edoc.api.Edocumentus.getInstance(Edocumentus.java:88)
at com.prozone.edoc.api.business.dm.DMDocumentTest.setup(DMDocumentTest.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:262)
at org.testng.SuiteRunner.run(SuiteRunner.java:191)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:808)
at org.testng.TestNG.runSuitesLocally(TestNG.java:776)
at org.testng.TestNG.run(TestNG.java:701)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.prozone.edoc.api.business.wf.WfHistory.<init>(WfHistory.java:84)
at com.prozone.edoc.api.business.EdocWfManager.configure(EdocWfManager.java:54)
at com.prozone.edoc.api.Edocumentus.init(Edocumentus.java:217)
at com.prozone.edoc.api.Edocumentus.getInstance(Edocumentus.java:88)
at com.prozone.edoc.api.business.dm.DMDocumentTest.setup(DMDocumentTest.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:262)
at org.testng.SuiteRunner.run(SuiteRunner.java:191)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:808)
at org.testng.TestNG.runSuitesLocally(TestNG.java:776)
at org.testng.TestNG.run(TestNG.java:701)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.prozone.edoc.api.business.wf.WfHistory.<init>(WfHistory.java:101)
at com.prozone.edoc.api.business.EdocWfManager.configure(EdocWfManager.java:54)
at com.prozone.edoc.api.Edocumentus.init(Edocumentus.java:217)
at com.prozone.edoc.api.Edocumentus.getInstance(Edocumentus.java:88)
at com.prozone.edoc.api.business.dm.DMDocumentTest.setup(DMDocumentTest.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:262)
at org.testng.SuiteRunner.run(SuiteRunner.java:191)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:808)
at org.testng.TestNG.runSuitesLocally(TestNG.java:776)
at org.testng.TestNG.run(TestNG.java:701)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)


Thanks in advance,
Milos Obrknezev
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=208776&messageID=286711#286711

Mark Derricutt

unread,
Jan 26, 2008, 2:17:31 PM1/26/08
to testng...@googlegroups.com
Look at the top of that stacktrace its being triggered by one of your tests:

Can't configure logger for null class. Logging disabled

java.lang.NullPointerException
       at sun.misc.Launcher$AppClassLoad
er.loadClass(Unknown Source)
       at java.lang.ClassLoader.loadClass(Unknown Source)
       at com.prozone.edoc.api.Edocumentus.init(Edocumentus.java:200)
       at com.prozone.edoc.api.Edocumentus.getInstance(Edocumentus.java:88)
       at com.prozone.edoc.api.business.dm.DMDocumentTest.setup(DMDocumentTest.java:59)


DMDocumentTest.setup() is calling something called Edocumentus.getInstance() which is getting an NPE.  My guess is your Edocuments class is expected some form of setup/configuration to define a class to use for logging, which in this instance is set to null...

Milos Obrknezev

unread,
Feb 6, 2008, 6:49:24 AM2/6/08
to testng...@googlegroups.com
That's ok, but something weird is gooing on. I have put breakpoint on line 59 in my test class and when I run it it stops at that line but after 2 seconds NPE is thrown like I have steped over it. For the whole time my test is still stoped at 59th line! I don't know who run this method when I specificly stoped it at 59th line.
Has anybody had this kind of ptoblem before?

---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=208776&messageID=295764#295764

Reply all
Reply to author
Forward
0 new messages