From: Grzegorz L. <ha...@gm...> - 2005-04-04 16:32:25
|
Hi Sory for bad file. I have attached modified version of modified.jar. Please send mi info if there are still some problems with it. Grzegorz Lukasik On Apr 4, 2005 5:14 PM, Martha Yanez <my...@us...> wrote: > > Hi Grzegorz > First of all... thanks for your speedy reply. I think I have an interesting > clue to the problem - the size of the source directory is the key. My > original product source directory is very big (169 MB - 10, 172 files). > Even I was using the little test program (DateUtil) I had placed the source > on my root build directory which is even bigger. When I place the source, > and ser file in a unique directory, the report command works instantly. > I tried this after trying to point the source to an empty directory as you > asked. The report command still hangs but I noticed that task's manager's > performance was minimal ( not 100% as I observed earlier). That's what led > me to suspect size of directory. > When I tried the modified jar, it hangs in all cases with an Exception in > thread "main" java.lang.NoClassDefFoundError: > net/sourceforge/cobertura/reporting/Util$1 but that is > pointing to the following code: > > private static Vector getListOfFiles(File file, boolean recursive) > { > Vector ret = new Vector(); > logger.debug( "getListOfFiles file=" + file+ " > recursive="+recursive); > > if (file.isFile()) > { > ret.add(file.getAbsolutePath()); > } > else if (file.isDirectory()) > { > File[] files = file.listFiles(new FileFilter() > { > public boolean accept(File pathname) > { > return pathname.isDirectory() > || > pathname.getAbsolutePath().endsWith(".java"); > } > }); > > for (int i = 0; i < files.length; i++) > { > if (recursive) > { > ret.addAll(getListOfFiles(files[i], > true)); > } > else > { > if (files[i].isFile()) > { > > ret.add(files[i].getAbsolutePath()); > } > } > } > } > > > I can see how the size of the directory would overpower this loop. What is > curious is that I used the same directory for my JCoverage reporting and had > no problems in this area. Reporting would not be instant but would finished > in a few minutes . My problems with JCoverage were more in the area of > random exceptions as I had my product running with major sections > instrumented (about 900 classes). When I instrumented in smaller batches > (200 classes or less), I could get viable ser files and generate reports. > Here is the output from the modified jar but again the exception terminated > each before it could complete so I don't think this will be useful > > > > I just wanted to get this info to you quickly but I would like to run > another test after pruning down my source directory to just the files I need > to instrument. This may take a while and since the modified jar is having > problems I was going to just run the original jar with the debug options you > mentioned. I'll let you know results but it may take a while since I have > to head to some meetings now. > > Thanks > > > > Martha Yanez > (919) 224-1320 / 8-687-1320 > New Notes id: Martha Yanez/Raleigh/IBM > my...@us... > > > > > > Grzegorz Lukasik <ha...@gm...> > > 04/02/2005 11:29 AM > > Please respond to > Grzegorz Lukasik > > > To Martha Yanez/Raleigh/IBM@IBMUS > > cc cob...@li... > > Subject Re: [Cobertura-devel] Having problems generating report, possible > instrumentation problem as well > > > > > > *********************** > Warning: Your file, modified.jar, contains more than 32 files after > decompression and cannot be scanned. > *********************** > > > > Hi > > I tried it the way you specified and it worked for me. Yours > cobertura.ser looks ok. It seems that there is something wrong with > reporting process - but i cannot reproduce behaviour you experienced. > I will try to help you - and us to find a bug. > > First > Could you create some empty directory and point cobertura to look for > sources there (using option -s) when using report generation? > > Second could you use attached jar (modified.jar) instead of > cobertura.jar? I modified two files (HTMLReport and Util) to show much > more information about things that happen. I also set there reporting > level to debug. Could you run reporting of your simple case and send > as what was logged? Modified files are attached. > > To increase the number of log messages in normal cobertura > distribution file you will have to edit cobertura.jar and in file > log4j.properties change debug level from WARN to DEBUG. > > Here is SourceForge archive for list cobertura-devel: > https://sourceforge.net/mailarchive/forum.php?forum_id=44317 > > Thanks for comprehensive description! > > Greetings > Grzegorz Lukasik > > On Apr 2, 2005 1:17 AM, Martha Yanez <my...@us...> wrote: > > > > > > Hi, > > I'm trying to run cobertura with a tiny test program and having problem > > generating a report. > > This is program, class files and ser output . > > > > Cobertura.jar is in my classpath and I run following reporting command > after > > executing DateUtil. > > > > C:\buildSLM>java > net.sourceforge.cobertura.reporting.Main > > -o c:\buildSLM\build-dir\r2 -i c:\buildSLM\cobertura.ser -s c:\buildSLM > -f > > html > > > > The report command never terminates and my machine hits 100% processing > when > > viewed under Task Manager > > Some report files (index.html, frame-classes.html, frame-classes-.html > (not > > a dup), frame-packages.html and frame-summary.html) are generated very > > quickly at the start and then nothing. > > > > > > I started this small test case because I suspect I may have an > > instrumentation problem. I tried instrumenting some of my product files > > (switching from the Jcoverage statements to the Cobertura ones Grzegorz > was > > kind enough to send me this morning). It seems to go fine but when I ran > the > > product I did not see the Cobertura.ser file being updated. Since my > > product environment is a bit complex, I wanted to make sure I could get > the > > simple test case working first and the little bit the report shows does > seem > > like the test case ran (80%) but then the report problem comes in. If I > try > > the ser file from my product instrumentation, the same thing happens (no > > termination - showing 0 coverage) > > > > Any help appreciated since I have limited time to get this working... > also > > is there a debug or additional logging function I can turn on for more > info > > on program execution? > > One last thing... is there a way to see past mailing list entries? I'm > now > > getting new updates but can't find past questions and hate to bother you > > asking something again that's been answered. Thanks! > > > > Martha Yanez > > (919) 224-1320 / 8-687-1320 > > New Notes id: Martha Yanez/Raleigh/IBM > > my...@us... > > > > > > > > [attachment "modified.jar" deleted by Martha Yanez/Raleigh/IBM] [attachment > "log4j.properties" deleted by Martha Yanez/Raleigh/IBM] [attachment > "Util.java" deleted by Martha Yanez/Raleigh/IBM] [attachment > "HTMLReport.java" deleted by Martha Yanez/Raleigh/IBM] > > |