You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kristian Waagan (JIRA)" <ji...@apache.org> on 2011/06/01 07:15:47 UTC
[jira] [Created] (DERBY-5256) Improve error reporting in
common.sanity.AssertFailure
Improve error reporting in common.sanity.AssertFailure
------------------------------------------------------
Key: DERBY-5256
URL: https://issues.apache.org/jira/browse/DERBY-5256
Project: Derby
Issue Type: Improvement
Affects Versions: 10.9.0.0
Reporter: Kristian Waagan
Assignee: Kristian Waagan
Priority: Minor
The error reporting in AssertFailure is somewhat imprecise, and it may also fail with an NPE:
testAssertFailureNoThreadDump(org.apache.derbyTesting.unitTests.junit.AssertFailureTest) ERROR:
java.lang.NullPointerException
at org.apache.derby.shared.common.sanity.AssertFailure.dumpThreads(AssertFailure.java:190)
at org.apache.derby.shared.common.sanity.AssertFailure.<init>(AssertFailure.java:82)
at org.apache.derbyTesting.unitTests.junit.AssertFailureTest.testAssertFailureNoThreadDump(AssertFailureTest.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.extensions.TestSetup.run(TestSetup.java:25)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at kah.TestRunner.main(TestRunner.java:77)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (DERBY-5256) Improve error reporting in
common.sanity.AssertFailure
Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Waagan updated DERBY-5256:
-----------------------------------
Issue & fix info: [Patch Available]
> Improve error reporting in common.sanity.AssertFailure
> ------------------------------------------------------
>
> Key: DERBY-5256
> URL: https://issues.apache.org/jira/browse/DERBY-5256
> Project: Derby
> Issue Type: Improvement
> Affects Versions: 10.9.0.0
> Reporter: Kristian Waagan
> Assignee: Kristian Waagan
> Priority: Minor
> Attachments: derby-5256-1a-error_reporting.diff
>
>
> The error reporting in AssertFailure is somewhat imprecise, and it may also fail with an NPE:
> testAssertFailureNoThreadDump(org.apache.derbyTesting.unitTests.junit.AssertFailureTest) ERROR:
> java.lang.NullPointerException
> at org.apache.derby.shared.common.sanity.AssertFailure.dumpThreads(AssertFailure.java:190)
> at org.apache.derby.shared.common.sanity.AssertFailure.<init>(AssertFailure.java:82)
> at org.apache.derbyTesting.unitTests.junit.AssertFailureTest.testAssertFailureNoThreadDump(AssertFailureTest.java:114)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at kah.TestRunner.main(TestRunner.java:77)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (DERBY-5256) Improve error reporting in
common.sanity.AssertFailure
Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Waagan closed DERBY-5256.
----------------------------------
Resolution: Fixed
Fix Version/s: 10.9.0.0
Issue & fix info: (was: [Patch Available])
Thanks, Dag!
Committed patch 1a to trunk with revision 1130964.
BTW, I think the NPE was triggered by a sealing violation error.
> Improve error reporting in common.sanity.AssertFailure
> ------------------------------------------------------
>
> Key: DERBY-5256
> URL: https://issues.apache.org/jira/browse/DERBY-5256
> Project: Derby
> Issue Type: Improvement
> Affects Versions: 10.9.0.0
> Reporter: Kristian Waagan
> Assignee: Kristian Waagan
> Priority: Minor
> Fix For: 10.9.0.0
>
> Attachments: derby-5256-1a-error_reporting.diff
>
>
> The error reporting in AssertFailure is somewhat imprecise, and it may also fail with an NPE:
> testAssertFailureNoThreadDump(org.apache.derbyTesting.unitTests.junit.AssertFailureTest) ERROR:
> java.lang.NullPointerException
> at org.apache.derby.shared.common.sanity.AssertFailure.dumpThreads(AssertFailure.java:190)
> at org.apache.derby.shared.common.sanity.AssertFailure.<init>(AssertFailure.java:82)
> at org.apache.derbyTesting.unitTests.junit.AssertFailureTest.testAssertFailureNoThreadDump(AssertFailureTest.java:114)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at kah.TestRunner.main(TestRunner.java:77)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (DERBY-5256) Improve error reporting in
common.sanity.AssertFailure
Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Waagan updated DERBY-5256:
-----------------------------------
Attachment: derby-5256-1a-error_reporting.diff
Attaching patch 1a, addressing the NPE and tweaking the error reporting a bit (some of it achieved by restructuring).
Patch ready for review.
> Improve error reporting in common.sanity.AssertFailure
> ------------------------------------------------------
>
> Key: DERBY-5256
> URL: https://issues.apache.org/jira/browse/DERBY-5256
> Project: Derby
> Issue Type: Improvement
> Affects Versions: 10.9.0.0
> Reporter: Kristian Waagan
> Assignee: Kristian Waagan
> Priority: Minor
> Attachments: derby-5256-1a-error_reporting.diff
>
>
> The error reporting in AssertFailure is somewhat imprecise, and it may also fail with an NPE:
> testAssertFailureNoThreadDump(org.apache.derbyTesting.unitTests.junit.AssertFailureTest) ERROR:
> java.lang.NullPointerException
> at org.apache.derby.shared.common.sanity.AssertFailure.dumpThreads(AssertFailure.java:190)
> at org.apache.derby.shared.common.sanity.AssertFailure.<init>(AssertFailure.java:82)
> at org.apache.derbyTesting.unitTests.junit.AssertFailureTest.testAssertFailureNoThreadDump(AssertFailureTest.java:114)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at kah.TestRunner.main(TestRunner.java:77)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DERBY-5256) Improve error reporting in
common.sanity.AssertFailure
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042524#comment-13042524 ]
Dag H. Wanvik commented on DERBY-5256:
--------------------------------------
Looks OK to me, +1. Tidier not to try this for 1.4 by testing up front that waiting for NoSuchMethodException.
> Improve error reporting in common.sanity.AssertFailure
> ------------------------------------------------------
>
> Key: DERBY-5256
> URL: https://issues.apache.org/jira/browse/DERBY-5256
> Project: Derby
> Issue Type: Improvement
> Affects Versions: 10.9.0.0
> Reporter: Kristian Waagan
> Assignee: Kristian Waagan
> Priority: Minor
> Attachments: derby-5256-1a-error_reporting.diff
>
>
> The error reporting in AssertFailure is somewhat imprecise, and it may also fail with an NPE:
> testAssertFailureNoThreadDump(org.apache.derbyTesting.unitTests.junit.AssertFailureTest) ERROR:
> java.lang.NullPointerException
> at org.apache.derby.shared.common.sanity.AssertFailure.dumpThreads(AssertFailure.java:190)
> at org.apache.derby.shared.common.sanity.AssertFailure.<init>(AssertFailure.java:82)
> at org.apache.derbyTesting.unitTests.junit.AssertFailureTest.testAssertFailureNoThreadDump(AssertFailureTest.java:114)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at junit.framework.TestCase.runTest(TestCase.java:164)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:120)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at junit.framework.TestSuite.runTest(TestSuite.java:230)
> at junit.framework.TestSuite.run(TestSuite.java:225)
> at kah.TestRunner.main(TestRunner.java:77)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira