New Bug Or Duplicate?

I'm having a problem where I get the stack trace shown below. This is
basically the same stack trace reported in request 20766, except that I
don't have ANY asserts in the part of the code where the exception occurs.

The test class is a "TestSuite" and the problem occurs when I call
"result.endTest()" at the end of the test method. I verified this by
doing a single step into "result.endTest()" in the debugger.

Here's my command line. I carefully checked to make sure that the only
JUnit.jar used was the one that shipped with IDEA.

C:/j2sdk1.4.2_03\bin\java -Dfile.encoding=windows-1252 -classpath
C:\j2sdk1.4.2_03\jre\lib\charsets.jar;C:\j2sdk1.4.2_03\jre\lib\jce.jar;C:\j2sdk1.4.2_03\jre\lib\jsse.jar;C:\j2sdk1.4.2_03\jre\lib\plugin.jar;C:\j2sdk1.4.2_03\jre\lib\rt.jar;C:\j2sdk1.4.2_03\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_03\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2_03\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4.2_03\jre\lib\ext\localedata.jar;C:\j2sdk1.4.2_03\jre\lib\ext\sunjce_provider.jar;C:\data\etcDev1.0\APT\JUNIT;C:\data\etcDev1.0\APT\JSky;C:\data\etcDev1.0\APT\Libraries\hcompress.jar;C:\data\etcDev1.0\APT\Libraries\jsky.jar;C:\data\etcDev1.0\APT\Libraries\jai_codec.jar;C:\data\etcDev1.0\APT\Libraries\jai_core.jar;C:\data\etcDev1.0\APT\Libraries\fits.jar;C:\data\etcDev1.0\APT\Utilities;C:\data\etcDev1.0\APT\Libraries\jdom.jar;C:\data\etcDev1.0\APT\Libraries\jcchart.jar;C:\data\etcDev1.0\APT\Libraries\jconn2.jar;C:\data\etcDev1.0\APT\Libraries\jh.jar;C:\data\etcDev1.0\APT\Libraries\iText.jar;C:\data\etcDev1.0\APT\Libraries\koala.jar;C:\data\etcDev1.0\APT\ToolInterface;C:\data\et
cDev1.0\APT\SEA;C:\data\etcDev1.0\APT\Libraries\advisor.jar;C:\data\etcDev1.0\APT\Libraries\diva.jar;C:\data\etcDev1.0\APT\Libraries\jspike.jar;C:\data\etcDev1.0\APT\OCM;C:\data\etcDev1.0\APT\Libraries\jess.jar;C:\idea\eap1050\lib\junit.jar;C:\data\etcDev1.0\APT\Libraries\httpunit\httpunit.jar;C:\data\etcDev1.0\APT\Libraries\httpunit\js.jar;C:\data\etcDev1.0\APT\Libraries\httpunit\nekohtml.jar;C:\data\etcDev1.0\APT\Libraries\httpunit\servlet.jar;C:\data\etcDev1.0\APT\Libraries\httpunit\Tidy.jar;C:\data\etcDev1.0\APT\Libraries\httpunit\xercesImpl.jar;C:\data\etcDev1.0\APT\Libraries\httpunit\xmlParserAPIs.jar;C:\idea\eap1050\lib\idea_rt.jar;C:\idea\eap1050\lib\idea_rt.jar
-Didea.launcher.port=7536
-Didea.launcher.library=C:\idea\eap1050\bin\breakgen.dll
com.intellij.rt.execution.application.AppMain
com.intellij.rt.execution.junit2.JUnitStarter -ideVersion5
edu.stsci.hst.BatchLogSuite

Is this a bug, or am I doing something wrong?

Thank you,

Donald
-


Trace 1----


java.lang.Exception: Could not create and run test suite:
java.lang.NullPointerException
at junit.textui.TestRunner.start(TestRunner.java:175)
at
com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(Unknown
Source)
at
com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(Unknown
Source)
at com.intellij.rt.execution.junit2.JUnitStarter.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.intellij.rt.execution.application.AppMain.main(Unknown Source)
Process terminated with exit code -2

4 comments
Comment actions Permalink

It seems your problem is new one. Please, post here the original exception
(evaluate e.printStackTrace() in debugger evaluate dialog)

--

Dmitry Peshehonov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


"Donald F. McLean" <dmclean@stsci.edu> wrote in message
news:btbv9a$8j6$1@is.intellij.net...

I'm having a problem where I get the stack trace shown below. This is
basically the same stack trace reported in request 20766, except that I
don't have ANY asserts in the part of the code where the exception occurs.

>

The test class is a "TestSuite" and the problem occurs when I call
"result.endTest()" at the end of the test method. I verified this by
doing a single step into "result.endTest()" in the debugger.

>

Here's my command line. I carefully checked to make sure that the only
JUnit.jar used was the one that shipped with IDEA.

>

C:/j2sdk1.4.2_03\bin\java -Dfile.encoding=windows-1252 -classpath

>
C:\j2sdk1.4.2_03\jre\lib\charsets.jar;C:\j2sdk1.4.2_03\jre\lib\jce.jar;C:\j2
sdk1.4.2_03\jre\lib\jsse.jar;C:\j2sdk1.4.2_03\jre\lib\plugin.jar;C:\j2sdk1.4
.2_03\jre\lib\rt.jar;C:\j2sdk1.4.2_03\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_0
3\jre\lib\ext\dnsns.jar;C:\j2sdk1.4.2_03\jre\lib\ext\ldapsec.jar;C:\j2sdk1.4
.2_03\jre\lib\ext\localedata.jar;C:\j2sdk1.4.2_03\jre\lib\ext\sunjce_provide
r.jar;C:\data\etcDev1.0\APT\JUNIT;C:\data\etcDev1.0\APT\JSky;C:\data\etcDev1
.0\APT\Libraries\hcompress.jar;C:\data\etcDev1.0\APT\Libraries\jsky.jar;C:\d
ata\etcDev1.0\APT\Libraries\jai_codec.jar;C:\data\etcDev1.0\APT\Libraries\ja
i_core.jar;C:\data\etcDev1.0\APT\Libraries\fits.jar;C:\data\etcDev1.0\APT\Ut
ilities;C:\data\etcDev1.0\APT\Libraries\jdom.jar;C:\data\etcDev1.0\APT\Libra
ries\jcchart.jar;C:\data\etcDev1.0\APT\Libraries\jconn2.jar;C:\data\etcDev1.
0\APT\Libraries\jh.jar;C:\data\etcDev1.0\APT\Libraries\iText.jar;C:\data\etc
Dev1.0\APT\Libraries\koala.jar;C:\data\etcDev1.0\APT\ToolInterface;C:\data\e
t
>
cDev1.0\APT\SEA;C:\data\etcDev1.0\APT\Libraries\advisor.jar;C:\data\etcDev1.
0\APT\Libraries\diva.jar;C:\data\etcDev1.0\APT\Libraries\jspike.jar;C:\data\
etcDev1.0\APT\OCM;C:\data\etcDev1.0\APT\Libraries\jess.jar;C:\idea\eap1050\l
ib\junit.jar;C:\data\etcDev1.0\APT\Libraries\httpunit\httpunit.jar;C:\data\e
tcDev1.0\APT\Libraries\httpunit\js.jar;C:\data\etcDev1.0\APT\Libraries\httpu
nit\nekohtml.jar;C:\data\etcDev1.0\APT\Libraries\httpunit\servlet.jar;C:\dat
a\etcDev1.0\APT\Libraries\httpunit\Tidy.jar;C:\data\etcDev1.0\APT\Libraries\
httpunit\xercesImpl.jar;C:\data\etcDev1.0\APT\Libraries\httpunit\xmlParserAP
Is.jar;C:\idea\eap1050\lib\idea_rt.jar;C:\idea\eap1050\lib\idea_rt.jar

-Didea.launcher.port=7536
-Didea.launcher.library=C:\idea\eap1050\bin\breakgen.dll
com.intellij.rt.execution.application.AppMain
com.intellij.rt.execution.junit2.JUnitStarter -ideVersion5
edu.stsci.hst.BatchLogSuite

>

Is this a bug, or am I doing something wrong?

>

Thank you,

>

Donald
---Trace 1----------------------------------------------------
java.lang.Exception: Could not create and run test suite:
java.lang.NullPointerException
at junit.textui.TestRunner.start(TestRunner.java:175)
at

>
com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(Unknown

Source)
at

>
com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(Unknown

Source)
at com.intellij.rt.execution.junit2.JUnitStarter.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)

at

>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)
at com.intellij.rt.execution.application.AppMain.main(Unknown Source)
Process terminated with exit code -2

>



0
Comment actions Permalink

When I ran it in the debugger, it blew up as soon as I tried to step
into "result.endTest()" with the exception listed in my original posting.

After looking at it more carefully, I found the source of the problem -
we had accidentally removed the call to "result.startTest()" at the
beginning of the function. Obviously, that was a very stupid thing to do.

I would hope that the test software would be better about handling that
kind of error, but that's your call.

Donald

Dmitry Peshehonov (JetBrains) wrote:

It seems your problem is new one. Please, post here the original exception
(evaluate e.printStackTrace() in debugger evaluate dialog)


0
Comment actions Permalink

Please, attach JUnit sources (version 3.8.1 is destributed with Idea) then
you can set breakpoints and step into JUnit classes.
Set breakpoint at junit.textui.TestRunner.start(TestRunner.java:175) and
post here the source exception (JUnit does catch it at this line and
rethrows another one).

--

Dmitry Peshehonov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


"Donald F. McLean" <dmclean@stsci.edu> wrote in message
news:3FF9BD56.8090401@stsci.edu...

When I ran it in the debugger, it blew up as soon as I tried to step
into "result.endTest()" with the exception listed in my original posting.

>

After looking at it more carefully, I found the source of the problem -
we had accidentally removed the call to "result.startTest()" at the
beginning of the function. Obviously, that was a very stupid thing to do.

>

I would hope that the test software would be better about handling that
kind of error, but that's your call.

>

Donald

>

Dmitry Peshehonov (JetBrains) wrote:

>

It seems your problem is new one. Please, post here the original

exception

(evaluate e.printStackTrace() in debugger evaluate dialog)

>


0
Comment actions Permalink

java.lang.NullPointerException
at com.intellij.rt.execution.junit2.TestResultsSender.endTest(Unknown
Source)
at junit.framework.TestResult.endTest(TestResult.java:72)
at edu.stsci.hst.BatchLogTest.run(BatchLogTest.java:130)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun(Unknown Source)
at junit.textui.TestRunner.start(TestRunner.java:172)
at
com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(Unknown
Source)
at
com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(Unknown
Source)
at com.intellij.rt.execution.junit2.JUnitStarter.main(Unknown Source)

Dmitry Peshehonov (JetBrains) wrote:

Please, attach JUnit sources (version 3.8.1 is destributed with Idea) then
you can set breakpoints and step into JUnit classes.
Set breakpoint at junit.textui.TestRunner.start(TestRunner.java:175) and
post here the source exception (JUnit does catch it at this line and
rethrows another one).


0

Please sign in to leave a comment.