[JIRA] Created: (LBCLASSIC-125) NoClassDefFoundError in PackagingDataCalculator.loadClass()

NoClassDefFoundError in PackagingDataCalculator.loadClass() ----------------------------------------------------------- Key: LBCLASSIC-125 URL: http://jira.qos.ch/browse/LBCLASSIC-125 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.15 Environment: jdk 1.6 (build 1.6.0_10-b33) jboss 4.2.2ga Reporter: Roland Klein Assignee: Logback dev list In an EJB Client/Server Environment the loadClass() method could fail, because the vm issues a NoClassDefFoundError. And there is no corresponding catch, so the whole logging fails and throws a NoClassDefFoundError. -- 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-125?page=com.atlassian.jira.plugin.syste... ] Roland Klein commented on LBCLASSIC-125: ---------------------------------------- solution: add catch statement try { return cl.loadClass(className); } catch (ClassNotFoundException e1) { return null; // ==== BEGIN ==== } catch (NoClassDefFoundError e1) { return null; // ==== END ==== } catch (Exception e) { e.printStackTrace(); // this is unexpected return null; }
NoClassDefFoundError in PackagingDataCalculator.loadClass() -----------------------------------------------------------
Key: LBCLASSIC-125 URL: http://jira.qos.ch/browse/LBCLASSIC-125 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.15 Environment: jdk 1.6 (build 1.6.0_10-b33) jboss 4.2.2ga Reporter: Roland Klein Assignee: Logback dev list
In an EJB Client/Server Environment the loadClass() method could fail, because the vm issues a NoClassDefFoundError. And there is no corresponding catch, so the whole logging fails and throws a NoClassDefFoundError.
-- 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-125?page=com.atlassian.jira.plugin.syste... ] Roland Klein updated LBCLASSIC-125: ----------------------------------- Attachment: Issue-LBCLASSIC-125.diff Diff to rev. 2260
NoClassDefFoundError in PackagingDataCalculator.loadClass() -----------------------------------------------------------
Key: LBCLASSIC-125 URL: http://jira.qos.ch/browse/LBCLASSIC-125 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.15 Environment: jdk 1.6 (build 1.6.0_10-b33) jboss 4.2.2ga Reporter: Roland Klein Assignee: Logback dev list Attachments: Issue-LBCLASSIC-125.diff
In an EJB Client/Server Environment the loadClass() method could fail, because the vm issues a NoClassDefFoundError. And there is no corresponding catch, so the whole logging fails and throws a NoClassDefFoundError.
-- 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

Hello, This saves me from explaining why I am not a big fan of PackagingDataCalculator :-) Ceki, can it be turned off, or is it turned off by default ? I did a quick search but couldn't find any documentation. Thanks, Maarten On Tue, May 5, 2009 at 3:28 PM, Roland Klein (JIRA) <noreply-jira@qos.ch> wrote:
NoClassDefFoundError in PackagingDataCalculator.loadClass() -----------------------------------------------------------
Key: LBCLASSIC-125 URL: http://jira.qos.ch/browse/LBCLASSIC-125 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.15 Environment: jdk 1.6 (build 1.6.0_10-b33) jboss 4.2.2ga Reporter: Roland Klein Assignee: Logback dev list
In an EJB Client/Server Environment the loadClass() method could fail, because the vm issues a NoClassDefFoundError. And there is no corresponding catch, so the whole logging fails and throws a NoClassDefFoundError.
-- 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
_______________________________________________ logback-dev mailing list logback-dev@qos.ch http://qos.ch/mailman/listinfo/logback-dev

Hi Marteen, Use %ex instead of %xEx. This can be done by appending %ex to the end of the pattern used by PatternLayout. In the absence of %ex or %xEx, %xEx is added by default. In other words, package data is added by default unless you override by addng %ex. see also conversion words at http://logback.qos.ch/manual/layouts.html#conversionWord hth, Maarten Bosteels wrote:
Hello,
This saves me from explaining why I am not a big fan of PackagingDataCalculator :-)
Ceki, can it be turned off, or is it turned off by default ? I did a quick search but couldn't find any documentation.
Thanks, Maarten
On Tue, May 5, 2009 at 3:28 PM, Roland Klein (JIRA) <noreply-jira@qos.ch> wrote:
NoClassDefFoundError in PackagingDataCalculator.loadClass() -----------------------------------------------------------
Key: LBCLASSIC-125 URL: http://jira.qos.ch/browse/LBCLASSIC-125 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.15 Environment: jdk 1.6 (build 1.6.0_10-b33) jboss 4.2.2ga Reporter: Roland Klein Assignee: Logback dev list
In an EJB Client/Server Environment the loadClass() method could fail, because the vm issues a NoClassDefFoundError. And there is no corresponding catch, so the whole logging fails and throws a NoClassDefFoundError.
-- 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
_______________________________________________ logback-dev mailing list logback-dev@qos.ch http://qos.ch/mailman/listinfo/logback-dev
_______________________________________________ logback-dev mailing list logback-dev@qos.ch http://qos.ch/mailman/listinfo/logback-dev
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch

[ http://jira.qos.ch/browse/LBCLASSIC-125?page=com.atlassian.jira.plugin.syste... ] Roland Klein updated LBCLASSIC-125: ----------------------------------- Attachment: Issue-LBCLASSIC-125-2.diff This issue affects two methods in ch.qos.logback.classic.spi.PackagingDataCalculator 1.) loadClass() 2.) bestEffortLoadClass() The new patch handles both.
NoClassDefFoundError in PackagingDataCalculator.loadClass() -----------------------------------------------------------
Key: LBCLASSIC-125 URL: http://jira.qos.ch/browse/LBCLASSIC-125 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.15 Environment: jdk 1.6 (build 1.6.0_10-b33) jboss 4.2.2ga Reporter: Roland Klein Assignee: Logback dev list Attachments: Issue-LBCLASSIC-125-2.diff, Issue-LBCLASSIC-125.diff
In an EJB Client/Server Environment the loadClass() method could fail, because the vm issues a NoClassDefFoundError. And there is no corresponding catch, so the whole logging fails and throws a NoClassDefFoundError.
-- 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-125?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-125: -------------------------------------- Didier Besset reports that stack traces generate NullPointerException when they don't exist on the server. The exception is caught but still seems to be annoying.
NoClassDefFoundError in PackagingDataCalculator.loadClass() -----------------------------------------------------------
Key: LBCLASSIC-125 URL: http://jira.qos.ch/browse/LBCLASSIC-125 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.15 Environment: jdk 1.6 (build 1.6.0_10-b33) jboss 4.2.2ga Reporter: Roland Klein Assignee: Logback dev list Attachments: Issue-LBCLASSIC-125-2.diff, Issue-LBCLASSIC-125.diff
In an EJB Client/Server Environment the loadClass() method could fail, because the vm issues a NoClassDefFoundError. And there is no corresponding catch, so the whole logging fails and throws a NoClassDefFoundError.
-- 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-125?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-125: -------------------------------------- Courtesy of Didier Besset. WrapperSimpleApp: Encountered an error running main: java.lang.NoClassDefFoundError: org/jboss/aspects/asynch/AsynchAspect java.lang.NoClassDefFoundError: org/jboss/aspects/asynch/AsynchAspect at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:621) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at ch.qos.logback.classic.spi.PackagingDataCalculator.loadClass(PackagingDataCalculator.java:232) at ch.qos.logback.classic.spi.PackagingDataCalculator.bestEffortLoadClass(PackagingDataCalculator.java:251) at ch.qos.logback.classic.spi.PackagingDataCalculator.computeBySTEP(PackagingDataCalculator.java:166) at ch.qos.logback.classic.spi.PackagingDataCalculator.populateUncommonFrames(PackagingDataCalculator.java:141) at ch.qos.logback.classic.spi.PackagingDataCalculator.populateFrames(PackagingDataCalculator.java:101) at ch.qos.logback.classic.spi.PackagingDataCalculator.calculate(PackagingDataCalculator.java:61) at ch.qos.logback.classic.spi.ThrowableProxy.calculatePackagingData(ThrowableProxy.java:50) at ch.qos.logback.classic.pattern.ExtendedThrowableProxyConverter.prepareLoggingEvent(ExtendedThrowableProxyConverter.java:35) at ch.qos.logback.classic.pattern.ThrowableProxyConverter.convert(ThrowableProxyConverter.java:142) at ch.qos.logback.classic.pattern.ThrowableProxyConverter.convert(ThrowableProxyConverter.java:30) at ch.qos.logback.core.pattern.FormattingConverter.write(FormattingConverter.java:32) at ch.qos.logback.core.pattern.PatternLayoutBase.writeLoopOnConverters(PatternLayoutBase.java:110) at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:132) at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:51) at ch.qos.logback.core.WriterAppender.subAppend(WriterAppender.java:280) at ch.qos.logback.core.rolling.RollingFileAppender.subAppend(RollingFileAppender.java:131) at ch.snip.util.logging.logback.FdpzLogBackRollingFileAppender.subAppend(FdpzLogBackRollingFileAppender.java:73) at ch.qos.logback.core.WriterAppender.append(WriterAppender.java:119) at ch.qos.logback.core.AppenderBase.doAppend(AppenderBase.java:79) at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:60) at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:270) at ch.qos.logback.classic.Logger.callAppenders(Logger.java:257) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:439) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:393) at ch.qos.logback.classic.Logger.error(Logger.java:576)
NoClassDefFoundError in PackagingDataCalculator.loadClass() -----------------------------------------------------------
Key: LBCLASSIC-125 URL: http://jira.qos.ch/browse/LBCLASSIC-125 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.15 Environment: jdk 1.6 (build 1.6.0_10-b33) jboss 4.2.2ga Reporter: Roland Klein Assignee: Logback dev list Attachments: Issue-LBCLASSIC-125-2.diff, Issue-LBCLASSIC-125.diff
In an EJB Client/Server Environment the loadClass() method could fail, because the vm issues a NoClassDefFoundError. And there is no corresponding catch, so the whole logging fails and throws a NoClassDefFoundError.
-- 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-125?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu updated LBCLASSIC-125: --------------------------------- Priority: Critical (was: Major)
NoClassDefFoundError in PackagingDataCalculator.loadClass() -----------------------------------------------------------
Key: LBCLASSIC-125 URL: http://jira.qos.ch/browse/LBCLASSIC-125 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.15 Environment: jdk 1.6 (build 1.6.0_10-b33) jboss 4.2.2ga Reporter: Roland Klein Assignee: Ceki Gulcu Priority: Critical Attachments: Issue-LBCLASSIC-125-2.diff, Issue-LBCLASSIC-125.diff
In an EJB Client/Server Environment the loadClass() method could fail, because the vm issues a NoClassDefFoundError. And there is no corresponding catch, so the whole logging fails and throws a NoClassDefFoundError.
-- 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-125?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu commented on LBCLASSIC-125: -------------------------------------- It was surprisingly difficult to write a test case where a NoClassDefFoundError was forced to be thrown. Anyway, the problem was fixed in revision 2365.
NoClassDefFoundError in PackagingDataCalculator.loadClass() -----------------------------------------------------------
Key: LBCLASSIC-125 URL: http://jira.qos.ch/browse/LBCLASSIC-125 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.15 Environment: jdk 1.6 (build 1.6.0_10-b33) jboss 4.2.2ga Reporter: Roland Klein Assignee: Ceki Gulcu Priority: Critical Attachments: Issue-LBCLASSIC-125-2.diff, Issue-LBCLASSIC-125.diff
In an EJB Client/Server Environment the loadClass() method could fail, because the vm issues a NoClassDefFoundError. And there is no corresponding catch, so the whole logging fails and throws a NoClassDefFoundError.
-- 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-125?page=com.atlassian.jira.plugin.syste... ] Ceki Gulcu resolved LBCLASSIC-125. ---------------------------------- Fix Version/s: 0.917 Resolution: Fixed
NoClassDefFoundError in PackagingDataCalculator.loadClass() -----------------------------------------------------------
Key: LBCLASSIC-125 URL: http://jira.qos.ch/browse/LBCLASSIC-125 Project: logback-classic Issue Type: Bug Affects Versions: 0.9.15 Environment: jdk 1.6 (build 1.6.0_10-b33) jboss 4.2.2ga Reporter: Roland Klein Assignee: Ceki Gulcu Priority: Critical Fix For: 0.917
Attachments: Issue-LBCLASSIC-125-2.diff, Issue-LBCLASSIC-125.diff
In an EJB Client/Server Environment the loadClass() method could fail, because the vm issues a NoClassDefFoundError. And there is no corresponding catch, so the whole logging fails and throws a NoClassDefFoundError.
-- 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 (4)
-
Ceki Gulcu
-
Ceki Gulcu (JIRA)
-
Maarten Bosteels
-
Roland Klein (JIRA)