[JIRA] Created: (LBCLASSIC-216) java.lang.NullPointerException in ThrowableProxyUtil.java:42

java.lang.NullPointerException in ThrowableProxyUtil.java:42 ------------------------------------------------------------ Key: LBCLASSIC-216 URL: http://jira.qos.ch/browse/LBCLASSIC-216 Project: logback-classic Issue Type: Bug Components: Other Affects Versions: 0.9.24 Environment: IDE WebSphere 6.1 , IBM JDK 1.5 Reporter: Luciano Canè Assignee: Logback dev list {code:title=test example} import org.slf4j.LoggerFactory; public class TestLogBack { public TestLogBack() { super(); } public static void main(String[] args) { TestLogBack test = new TestLogBack(); test.execute(); } private void execute() { org.slf4j.Logger logger = LoggerFactory.getLogger(TestLogBack.class); //test try { throw new TestLogBackException("Test: getStackTrace() return null"); //$NON-NLS-1$ } catch (Throwable t) { logger.error("Messaggio di Test di {}", t.getMessage(), t); //$NON-NLS-1$ } } class TestLogBackException extends Exception { private static final long serialVersionUID = 1L; public TestLogBackException(String message) { super(message); } @Override public StackTraceElement[] getStackTrace() { return null; } } } {code} {code:title=exception stack trace} Exception in thread "main" java.lang.NullPointerException at ch.qos.logback.classic.spi.ThrowableProxyUtil.steArrayToStepArray(ThrowableProxyUtil.java:42) at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:35) at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:123) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:469) at ch.qos.logback.classic.Logger.filterAndLog_2(Logger.java:462) at ch.qos.logback.classic.Logger.error(Logger.java:580) at z_prove.logback.TestLogBack.execute(TestLogBack.java:28) at z_prove.logback.TestLogBack.main(TestLogBack.java:13) {code} -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-216?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu reassigned LBCLASSIC-216: ------------------------------------ Assignee: Ceki Gulcu (was: Logback dev list)
java.lang.NullPointerException in ThrowableProxyUtil.java:42 ------------------------------------------------------------
Key: LBCLASSIC-216 URL: http://jira.qos.ch/browse/LBCLASSIC-216 Project: logback-classic Issue Type: Bug Components: Other Affects Versions: 0.9.24 Environment: IDE WebSphere 6.1 , IBM JDK 1.5 Reporter: Luciano Canè Assignee: Ceki Gulcu
{code:title=test example} import org.slf4j.LoggerFactory; public class TestLogBack { public TestLogBack() { super(); } public static void main(String[] args) { TestLogBack test = new TestLogBack(); test.execute(); } private void execute() { org.slf4j.Logger logger = LoggerFactory.getLogger(TestLogBack.class); //test try { throw new TestLogBackException("Test: getStackTrace() return null"); //$NON-NLS-1$ } catch (Throwable t) { logger.error("Messaggio di Test di {}", t.getMessage(), t); //$NON-NLS-1$ } } class TestLogBackException extends Exception { private static final long serialVersionUID = 1L; public TestLogBackException(String message) { super(message); } @Override public StackTraceElement[] getStackTrace() { return null; } } } {code} {code:title=exception stack trace} Exception in thread "main" java.lang.NullPointerException at ch.qos.logback.classic.spi.ThrowableProxyUtil.steArrayToStepArray(ThrowableProxyUtil.java:42) at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:35) at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:123) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:469) at ch.qos.logback.classic.Logger.filterAndLog_2(Logger.java:462) at ch.qos.logback.classic.Logger.error(Logger.java:580) at z_prove.logback.TestLogBack.execute(TestLogBack.java:28) at z_prove.logback.TestLogBack.main(TestLogBack.java:13) {code}
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-216?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu updated LBCLASSIC-216: --------------------------------- Priority: Blocker (was: Major)
java.lang.NullPointerException in ThrowableProxyUtil.java:42 ------------------------------------------------------------
Key: LBCLASSIC-216 URL: http://jira.qos.ch/browse/LBCLASSIC-216 Project: logback-classic Issue Type: Bug Components: Other Affects Versions: 0.9.24 Environment: IDE WebSphere 6.1 , IBM JDK 1.5 Reporter: Luciano Canè Assignee: Ceki Gulcu Priority: Blocker
{code:title=test example} import org.slf4j.LoggerFactory; public class TestLogBack { public TestLogBack() { super(); } public static void main(String[] args) { TestLogBack test = new TestLogBack(); test.execute(); } private void execute() { org.slf4j.Logger logger = LoggerFactory.getLogger(TestLogBack.class); //test try { throw new TestLogBackException("Test: getStackTrace() return null"); //$NON-NLS-1$ } catch (Throwable t) { logger.error("Messaggio di Test di {}", t.getMessage(), t); //$NON-NLS-1$ } } class TestLogBackException extends Exception { private static final long serialVersionUID = 1L; public TestLogBackException(String message) { super(message); } @Override public StackTraceElement[] getStackTrace() { return null; } } } {code} {code:title=exception stack trace} Exception in thread "main" java.lang.NullPointerException at ch.qos.logback.classic.spi.ThrowableProxyUtil.steArrayToStepArray(ThrowableProxyUtil.java:42) at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:35) at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:123) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:469) at ch.qos.logback.classic.Logger.filterAndLog_2(Logger.java:462) at ch.qos.logback.classic.Logger.error(Logger.java:580) at z_prove.logback.TestLogBack.execute(TestLogBack.java:28) at z_prove.logback.TestLogBack.main(TestLogBack.java:13) {code}
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-216?page=com.atlassian.jira.plugin.syste... ] Joern Huxhorn commented on LBCLASSIC-216: ----------------------------------------- I agree that this issue should be fixed in ThrowableProxyUtil. Beside that, I'd like to point out that the documentation of Throwable http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Throwable.html#getStackTra... states, that getStackTrace() is required to return an empty array if no stacktrace is available. If this happens to you then there is a bug somewhere.
java.lang.NullPointerException in ThrowableProxyUtil.java:42 ------------------------------------------------------------
Key: LBCLASSIC-216 URL: http://jira.qos.ch/browse/LBCLASSIC-216 Project: logback-classic Issue Type: Bug Components: Other Affects Versions: 0.9.24 Environment: IDE WebSphere 6.1 , IBM JDK 1.5 Reporter: Luciano Canè Assignee: Ceki Gulcu Priority: Blocker
{code:title=test example} import org.slf4j.LoggerFactory; public class TestLogBack { public TestLogBack() { super(); } public static void main(String[] args) { TestLogBack test = new TestLogBack(); test.execute(); } private void execute() { org.slf4j.Logger logger = LoggerFactory.getLogger(TestLogBack.class); //test try { throw new TestLogBackException("Test: getStackTrace() return null"); //$NON-NLS-1$ } catch (Throwable t) { logger.error("Messaggio di Test di {}", t.getMessage(), t); //$NON-NLS-1$ } } class TestLogBackException extends Exception { private static final long serialVersionUID = 1L; public TestLogBackException(String message) { super(message); } @Override public StackTraceElement[] getStackTrace() { return null; } } } {code} {code:title=exception stack trace} Exception in thread "main" java.lang.NullPointerException at ch.qos.logback.classic.spi.ThrowableProxyUtil.steArrayToStepArray(ThrowableProxyUtil.java:42) at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:35) at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:123) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:469) at ch.qos.logback.classic.Logger.filterAndLog_2(Logger.java:462) at ch.qos.logback.classic.Logger.error(Logger.java:580) at z_prove.logback.TestLogBack.execute(TestLogBack.java:28) at z_prove.logback.TestLogBack.main(TestLogBack.java:13) {code}
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-216?page=com.atlassian.jira.plugin.syste... ] Luciano Canè commented on LBCLASSIC-216: ---------------------------------------- I agree with you. We are testing our code, with following bugfix. {code:title=test example fix} @Override public StackTraceElement[] getStackTrace() { return new StackTraceElement[0]; } {code}
java.lang.NullPointerException in ThrowableProxyUtil.java:42 ------------------------------------------------------------
Key: LBCLASSIC-216 URL: http://jira.qos.ch/browse/LBCLASSIC-216 Project: logback-classic Issue Type: Bug Components: Other Affects Versions: 0.9.24 Environment: IDE WebSphere 6.1 , IBM JDK 1.5 Reporter: Luciano Canè Assignee: Ceki Gulcu Priority: Blocker
{code:title=test example} import org.slf4j.LoggerFactory; public class TestLogBack { public TestLogBack() { super(); } public static void main(String[] args) { TestLogBack test = new TestLogBack(); test.execute(); } private void execute() { org.slf4j.Logger logger = LoggerFactory.getLogger(TestLogBack.class); //test try { throw new TestLogBackException("Test: getStackTrace() return null"); //$NON-NLS-1$ } catch (Throwable t) { logger.error("Messaggio di Test di {}", t.getMessage(), t); //$NON-NLS-1$ } } class TestLogBackException extends Exception { private static final long serialVersionUID = 1L; public TestLogBackException(String message) { super(message); } @Override public StackTraceElement[] getStackTrace() { return null; } } } {code} {code:title=exception stack trace} Exception in thread "main" java.lang.NullPointerException at ch.qos.logback.classic.spi.ThrowableProxyUtil.steArrayToStepArray(ThrowableProxyUtil.java:42) at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:35) at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:123) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:469) at ch.qos.logback.classic.Logger.filterAndLog_2(Logger.java:462) at ch.qos.logback.classic.Logger.error(Logger.java:580) at z_prove.logback.TestLogBack.execute(TestLogBack.java:28) at z_prove.logback.TestLogBack.main(TestLogBack.java:13) {code}
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-216?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-216: -------------------------------------- Fixed in http://github.com/ceki/logback/commit/f0ffd80fe1f42
java.lang.NullPointerException in ThrowableProxyUtil.java:42 ------------------------------------------------------------
Key: LBCLASSIC-216 URL: http://jira.qos.ch/browse/LBCLASSIC-216 Project: logback-classic Issue Type: Bug Components: Other Affects Versions: 0.9.24 Environment: IDE WebSphere 6.1 , IBM JDK 1.5 Reporter: Luciano Canè Assignee: Ceki Gulcu Priority: Blocker
{code:title=test example} import org.slf4j.LoggerFactory; public class TestLogBack { public TestLogBack() { super(); } public static void main(String[] args) { TestLogBack test = new TestLogBack(); test.execute(); } private void execute() { org.slf4j.Logger logger = LoggerFactory.getLogger(TestLogBack.class); //test try { throw new TestLogBackException("Test: getStackTrace() return null"); //$NON-NLS-1$ } catch (Throwable t) { logger.error("Messaggio di Test di {}", t.getMessage(), t); //$NON-NLS-1$ } } class TestLogBackException extends Exception { private static final long serialVersionUID = 1L; public TestLogBackException(String message) { super(message); } @Override public StackTraceElement[] getStackTrace() { return null; } } } {code} {code:title=exception stack trace} Exception in thread "main" java.lang.NullPointerException at ch.qos.logback.classic.spi.ThrowableProxyUtil.steArrayToStepArray(ThrowableProxyUtil.java:42) at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:35) at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:123) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:469) at ch.qos.logback.classic.Logger.filterAndLog_2(Logger.java:462) at ch.qos.logback.classic.Logger.error(Logger.java:580) at z_prove.logback.TestLogBack.execute(TestLogBack.java:28) at z_prove.logback.TestLogBack.main(TestLogBack.java:13) {code}
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-216?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu updated LBCLASSIC-216: --------------------------------- Comment: was deleted
java.lang.NullPointerException in ThrowableProxyUtil.java:42 ------------------------------------------------------------
Key: LBCLASSIC-216 URL: http://jira.qos.ch/browse/LBCLASSIC-216 Project: logback-classic Issue Type: Bug Components: Other Affects Versions: 0.9.24 Environment: IDE WebSphere 6.1 , IBM JDK 1.5 Reporter: Luciano Canè Assignee: Ceki Gulcu Priority: Blocker
{code:title=test example} import org.slf4j.LoggerFactory; public class TestLogBack { public TestLogBack() { super(); } public static void main(String[] args) { TestLogBack test = new TestLogBack(); test.execute(); } private void execute() { org.slf4j.Logger logger = LoggerFactory.getLogger(TestLogBack.class); //test try { throw new TestLogBackException("Test: getStackTrace() return null"); //$NON-NLS-1$ } catch (Throwable t) { logger.error("Messaggio di Test di {}", t.getMessage(), t); //$NON-NLS-1$ } } class TestLogBackException extends Exception { private static final long serialVersionUID = 1L; public TestLogBackException(String message) { super(message); } @Override public StackTraceElement[] getStackTrace() { return null; } } } {code} {code:title=exception stack trace} Exception in thread "main" java.lang.NullPointerException at ch.qos.logback.classic.spi.ThrowableProxyUtil.steArrayToStepArray(ThrowableProxyUtil.java:42) at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:35) at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:123) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:469) at ch.qos.logback.classic.Logger.filterAndLog_2(Logger.java:462) at ch.qos.logback.classic.Logger.error(Logger.java:580) at z_prove.logback.TestLogBack.execute(TestLogBack.java:28) at z_prove.logback.TestLogBack.main(TestLogBack.java:13) {code}
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCLASSIC-216?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu resolved LBCLASSIC-216. ---------------------------------- Resolution: Fixed Fixed in http://github.com/ceki/logback/commit/f0ffd80fe1f42
java.lang.NullPointerException in ThrowableProxyUtil.java:42 ------------------------------------------------------------
Key: LBCLASSIC-216 URL: http://jira.qos.ch/browse/LBCLASSIC-216 Project: logback-classic Issue Type: Bug Components: Other Affects Versions: 0.9.24 Environment: IDE WebSphere 6.1 , IBM JDK 1.5 Reporter: Luciano Canè Assignee: Ceki Gulcu Priority: Blocker
{code:title=test example} import org.slf4j.LoggerFactory; public class TestLogBack { public TestLogBack() { super(); } public static void main(String[] args) { TestLogBack test = new TestLogBack(); test.execute(); } private void execute() { org.slf4j.Logger logger = LoggerFactory.getLogger(TestLogBack.class); //test try { throw new TestLogBackException("Test: getStackTrace() return null"); //$NON-NLS-1$ } catch (Throwable t) { logger.error("Messaggio di Test di {}", t.getMessage(), t); //$NON-NLS-1$ } } class TestLogBackException extends Exception { private static final long serialVersionUID = 1L; public TestLogBackException(String message) { super(message); } @Override public StackTraceElement[] getStackTrace() { return null; } } } {code} {code:title=exception stack trace} Exception in thread "main" java.lang.NullPointerException at ch.qos.logback.classic.spi.ThrowableProxyUtil.steArrayToStepArray(ThrowableProxyUtil.java:42) at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:35) at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:123) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:469) at ch.qos.logback.classic.Logger.filterAndLog_2(Logger.java:462) at ch.qos.logback.classic.Logger.error(Logger.java:580) at z_prove.logback.TestLogBack.execute(TestLogBack.java:28) at z_prove.logback.TestLogBack.main(TestLogBack.java:13) {code}
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
participants (3)
-
Ceki Gulcu (JIRA)
-
Joern Huxhorn (JIRA)
-
Luciano Canè (JIRA)