From: Grzegorz L. <ha...@gm...> - 2005-08-02 17:12:17
|
Are you sure the classpath is good? Some files are in ThemePhase-6 subdirectory of workspace, and some are directly under workspace (it is rather unusual for Eclipse projects). The missing class net/sourceforge/cobertura/coveragedata/HasBeenInstrumented is contained inside cobertura.jar distribution (can you verify, that cobertura.jar contains this file?). Please feel free to contact me on Yahoo Messenger, my nick is hauserx . Grzegorz On 8/2/05, lokesh <lok...@wi...> wrote: >=20 > Hi Grzegorz, >=20 > Still having some problem.........help me out... >=20 >=20 > These are the jars in the classpath: >=20 > c:\Eclipse\workspace\cobertura.jar; > c:\Eclipse\workspace\build\instrumented; > c:\Eclipse\workspace\build\classes; > C:\Eclipse\workspace\cobertura.jar; > C:\Eclipse\workspace\ThemePhase-6\log4j-1.2.9.jar; > C:\Eclipse\workspace\ThemePhase-6\java-getopt-1.0.9.jar; > C:\Eclipse\workspace\ThemePhase-6\jakarta-oro-2.0.8.jar; > C:\Eclipse\workspace\ThemePhase-6\ccl.jar; > C:\Eclipse\workspace\ThemePhase-6\javancss.jar; > C:\Eclipse\workspace\ThemePhase-6\java-getopt-1.0.9.jar; > C:\Eclipse\workspace\ThemePhase-6\asm-2.0.RC1.jar; >=20 > I am getting this exception when I try to invoke the instrumented main > class. >=20 >=20 > Exception in thread "main" java.lang.NoClassDefFoundError: > > > net/sourceforge/cobertura/coveragedata/HasBeenInstrumented > > > at java.lang.ClassLoader.defineClass1(Native Method) > > > at java.lang.ClassLoader.defineClass(ClassLoader.java:620) > > > at > > > > > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12 > > > at > > > java.net.URLClassLoader.defineClass(URLClassLoader.java:260) > > > at > > java.net.URLClassLoader.access$100(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:306) > > > at > > > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > > > at > > > java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) >=20 >=20 >=20 >=20 >=20 >=20 >=20 > -lokesh. >=20 > -----Original Message----- > From: Grzegorz Lukasik [mailto:ha...@gm...] > Sent: Tuesday, August 02, 2005 7:58 PM > To: lok...@wi... > Cc: Cobertura-devel > Subject: Re: [Cobertura-devel] urgent----0% coverage >=20 > .ser file will be updated after application ends it work - that is > after java virtual machine shutdown. >=20 > Be aware, that instrumented classes should be in the classpath > *before* original classes (if you instrument classes to separate > directory). >=20 > Cobertura will update .ser file in the directory that the application > was started - or if there is no such a file, a new will be created, so > put .ser file produced after instrumentation in the direcory you run > the application (you can also use net.sourceforge.cobertura.datafile, > see here http://cobertura.sourceforge.net/commandlinereference.html > for an example). >=20 > Do you still have the problem? >=20 > Grzegorz >=20 > On 8/2/05, lokesh <lok...@wi...> wrote: > > > > > > > > Hi, > > > > > > > > I'm attempting to use Cobertura for the first time and the report > shows up > > as 0% coverage. I don't have unit tests. > > > > While running my application I think the .ser file is not getting > updated, > > the time stamp remains same. > > > > > > > > Could any one please tell me how to proceed after instrumenting the > classes. > > > > > > > > Thanks, > > > > Lokesh. > > > > > > > > >=20 >=20 > Confidentiality Notice > The information contained in this electronic > message and any attachments to this message are > intended for the exclusive use of the addressee(s) > and may contain confidential or privileged information. > If you are not the intended recipient, please notify > the sender at Wipro or Mai...@wi... immediately > and destroy all copies of this message and any attachments. > |