karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Kraushaar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-3067) NoClassDefFoundError on startup when log4j SMTPAppender is configured
Date Wed, 25 Jun 2014 12:36:24 GMT

    [ https://issues.apache.org/jira/browse/KARAF-3067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14043393#comment-14043393
] 

Jochen Kraushaar commented on KARAF-3067:
-----------------------------------------

Problem can be solved by installing feature jetty. If feature is installed as boot feature
(in etc/org.apache.karaf.features.cfg), e.g. in custom distributions, exception occurs only
on first startup - which is still annoying if you want to use a custom distribution as installation
package on test or production systems.

> NoClassDefFoundError on startup when log4j SMTPAppender is configured
> ---------------------------------------------------------------------
>
>                 Key: KARAF-3067
>                 URL: https://issues.apache.org/jira/browse/KARAF-3067
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-config
>    Affects Versions: 3.0.1
>            Reporter: Jochen Kraushaar
>
> *Problem:*
> When you add a SMTPAppender to your etc/org.ops4j.pax.logging.cfg file, a NoClassDefFoundError
is thrown on startup of Karaf.
> *Stacktrace:*
> {code}
> 2014-06-25 14:08:43,552 | ERROR | s4j.pax.logging) | configadmin                    
 | 10 - org.apache.felix.configadmin - 1.6.0 | [org.osgi.service.log.LogService, org.knopflerfish.service.log.LogService,
org.ops4j.pax.logging.PaxLoggingService, org.osgi.service.cm.ManagedService, id=9, bundle=8/mvn:org.ops4j.pax.logging/pax-logging-service/1.7.2]:
Unexpected problem updating configuration org.ops4j.pax.logging
> java.lang.NoClassDefFoundError: javax/mail/internet/AddressException
> 	at java.lang.Class.getDeclaredConstructors0(Native Method)
> 	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2493)
> 	at java.lang.Class.getConstructor0(Class.java:2803)
> 	at java.lang.Class.newInstance(Class.java:345)
> 	at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:336)
> 	at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:123)
> 	at org.apache.log4j.PaxLoggingConfigurator.parseAppender(PaxLoggingConfigurator.java:97)
> 	at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
> 	at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
> 	at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
> 	at org.apache.log4j.PaxLoggingConfigurator.doConfigure(PaxLoggingConfigurator.java:72)
> 	at org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl.updated(PaxLoggingServiceImpl.java:214)
> 	at org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl$1ManagedPaxLoggingService.updated(PaxLoggingServiceImpl.java:362)
> 	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:148)
> 	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:81)
> 	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1723)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.ClassNotFoundException: javax.mail.internet.AddressException not
found by org.ops4j.pax.logging.pax-logging-service [8]
> 	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
> 	at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
> 	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> 	... 18 more
> {code}
> *Changes made in org.ops4j.pax.logging.cfg:*
> Add e-mail appender:
> {code}
> log4j.appender.email=org.apache.log4j.net.SMTPAppender
> log4j.appender.email.Threshold=FATAL
> log4j.appender.email.SMTPHost=your_host
> log4j.appender.email.From=your_mail
> log4j.appender.email.To=your_mail
> log4j.appender.email.Subject=Fatal error
> log4j.appender.email.bufferSize=512
> log4j.appender.email.layout=org.apache.log4j.HTMLLayout
> log4j.appender.email.layout.Title=Fatal error
> {code}
> Add appender to root logger:
> {code}
> log4j.rootLogger=INFO, out, email, osgi:*
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message