Yes Thanks Lakshman
> -----Original Message----- > From: Arnaud HERITIER [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 10 January 2007 12:11 PM > To: Maven Users List > Subject: Re: [M1] cobertura-1.8 java.lang.NoClassDefFoundError > > au/com/sc/logging/AbstractAlarmAppender > This is the class you developed ? > > Arnaud > > > On 1/10/07, Srilakshmanan, Lakshman < > [EMAIL PROTECTED]> wrote: > > > > Thanks Jeff & Arnaud for your feedback. > > > > I have upgraded log4j dependency from 1.2.8 to 1.2.9 to no avail. > > Please find snippet of the build output below. > > > > The output shows that the log4j is loaded in the classpath. > > > > What's interesting is that cobertura appears to be referencing > > net.sourceforge.cobertura.ant.AntUtil ?? > > > > Any suggestions welcome. > > > > Thanks again > > Lakshman > > > > . > > . > > . > > . > > cobertura:on: > > . > > . > > . > > . > > . > > > > [DEBUG] Finding class net.sourceforge.cobertura.util.StringUtil > > [DEBUG] Class net.sourceforge.cobertura.util.StringUtil loaded from ant > > loader > > [DEBUG] Class java.lang.StringBuffer loaded from parent loader > > [cobertura-instrument] [DEBUG] Class java.io.Reader loaded from > > parent loader > > [cobertura-instrument] [DEBUG] Class java.io.FileReader loaded from > > parent loader > > [cobertura-instrument] [DEBUG] Class org.apache.log4j.Category > > loaded from parent loader > > [cobertura-instrument] [DEBUG] Class org.apache.log4j.Logger loaded > > from parent loader > > [cobertura-instrument] [DEBUG] Class > > java.lang.IllegalArgumentException loaded from parent loader > > . > > . > > . > > . > > . > > [cobertura-instrument] [DEBUG] Class > > org.apache.tools.ant.types.Commandline$Argument loaded from parent > > loader > > [cobertura-instrument] [DEBUG] Finding class > > net.sourceforge.cobertura.ant.AntUtil > > [cobertura-instrument] [DEBUG] Class > > net.sourceforge.cobertura.ant.AntUtil loaded from ant loader > > [cobertura-instrument] [VERBOSE] Executing > > '/usr/java/jdk1.5.0_07/jre/bin/java' with arguments: > > '-classpath' > > '/repository/cobertura/jars/cobertura-1.8.jar:/project/Build/checkout/SM > > SService/target/classes:/repository/asm/jars/asm-2.2.1.jar:/repository/o > > ro/jars/oro-2.0.8.jar:/repository/log4j/jars/log4j-1.2.9.jar' > > 'net.sourceforge.cobertura.instrument.Main' > > '--commandsfile' > > '/tmp/cobertura.44644.cmdline' > > > > The ' characters around the executable and arguments are > > not part of the command. > > > > [cobertura-instrument] [DEBUG] Execute:Java13CommandLauncher: > > Executing '/usr/java/jdk1.5.0_07/jre/bin/java' with arguments: > > '-classpath' > > '/repository/cobertura/jars/cobertura-1.8.jar:/project/Build/checkout/SM > > SService/target/classes:/repository/asm/jars/asm-2.2.1.jar:/repository/o > > ro/jars/oro-2.0.8.jar:/repository/log4j/jars/log4j-1.2.9.jar' > > 'net.sourceforge.cobertura.instrument.Main' > > '--commandsfile' > > '/tmp/cobertura.44644.cmdline' > > > > The ' characters around the executable and arguments are > > not part of the command. > > > > [cobertura-instrument] log4j: Threshold ="null". > > [cobertura-instrument] log4j: Retreiving an instance of > > org.apache.log4j.Logger. > > [cobertura-instrument] log4j: Setting [org.apache] additivity to > > [true]. > > [cobertura-instrument] log4j: Level value for org.apache is [OFF]. > > [cobertura-instrument] log4j: org.apache level set to OFF > > [cobertura-instrument] log4j: Retreiving an instance of > > org.apache.log4j.Logger. > > [cobertura-instrument] Exception in thread "main" > > java.lang.NoClassDefFoundError: au/com/sc/logging/AbstractAlarmAppender > > [cobertura-instrument] at > > java.lang.ClassLoader.defineClass1(Native Method) > > [cobertura-instrument] log4j: Setting [au.com.sc.enterprisesms] > > additivity to [true]. > > > > > > Thanks > > Lakshman > > > > > > > -----Original Message----- > > > From: Jeff Jensen [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, 10 January 2007 9:29 AM > > > To: Maven Users List > > > Subject: Re: [M1] cobertura-1.8 java.lang.NoClassDefFoundError > > > > > > Cobertura plugin 1.7 started depending on log4j 1.2.9, and the Maven > > > plugin depends on that. Is your issue related to the version of > > log4j, > > > i.e. 1.2.8 vs 1.2.9? > > > > > > > > > Quoting Arnaud HERITIER <[EMAIL PROTECTED]>: > > > > > > > Hi, > > > > > > > > Having a look at the plugin code, it doesn't seem to be useful to > > add > > > > log4j in your classpath. > > > > When tests are executed with cobertura, the following classpath > > entries > > > > are added : > > > > <!-- global definitions --> > > > > <ant:path id="cobertura.classpath"> > > > > <ant:pathelement path="${maven.build.dest}"/> > > > > <ant:pathelement path="${plugin.getDependencyPath > > > > ('urbanophile:java-getopt')}"/> > > > > <ant:pathelement path="${plugin.getDependencyPath > > > > ('javancss:javancss')}"/> > > > > <ant:pathelement > > path="${plugin.getDependencyPath('javancss:ccl')}"/> > > > > <ant:pathelement path="${plugin.getDependencyPath('asm')}"/> > > > > <ant:pathelement path="${plugin.getDependencyPath('oro')}"/> > > > > <ant:pathelement path="${plugin.getDependencyPath('log4j')}"/> > > > > <ant:pathelement > > path="${plugin.getDependencyPath('cobertura')}"/> > > > > </ant:path> > > > > > > > > For which class do you have a NoClassDefFoundError ? Can't it be > > a > > > > conflict between the version of log4J in your project and the one > > used in > > > > the cobertura plugin ? > > > > > > > > Arnaud > > > > > > > > > > > > On 1/9/07, Srilakshmanan, Lakshman < > > > > [EMAIL PROTECTED]> wrote: > > > > > > > > > > Hi All, > > > > > > > > > > I am using maven-cobertura-plugin-1.2 & cobertura-1.8. > > > > > We have extended the org.apache.log4j.AppenderSkeleton class. > > > > > > > > > > When cobertura tries to instrument the class a > > > > > java.lang.NoClassDefFoundError is thrown. > > > > > > > > > > I have searched the mail archive and found mails referring to > > older > > > > > versions, and that it was fixed in cobertura-1.8. There are also > > mails > > > > > suggesting to add log4j in the project classpath. > > > > > > > > > > Could someone please tell me if you have tried to extend the a > > log4j > > > > > class and if you experienced the same problem or am I just unlucky > > and > > > > > did something wrong in my implementation. > > > > > > > > > > Is adding log4j to class path done as follows > > > > > <dependency> > > > > > <groupId>log4j</groupId> > > > > > <artifactId>log4j</artifactId> > > > > > <version>1.2.8</version> > > > > > <url>log4j/jars</url> > > > > > <properties> > > > > > <classloader>root.maven</classloader> > > > > > </properties> > > > > > </dependency> > > > > > > > > > > The funny part is, there is a message "adding dependency > > > > > /repository/log4j/jars/log4j-1.2.8.jar into project classloader". > > So I > > > > > don't quite believe adding log4j to the project classpath would > > resolve > > > > > the problem. I believe I need to add it to the classpath used by > > > > > cobertura and I don't believe it is using the project classpath. > > > > > > > > > > Any help/suggestions is greatly appreciated. > > > > > > > > > > Thanks in advance. > > > > > > > > > > Thanks > > > > > Lakshman > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]