Menu

#69 No metrics being generated.

open
nobody
None
5
2014-08-11
2005-10-04
Anonymous
No

jon.card@saillant.com

I have checked "Enable metrics" on the project
properties window.
I have set the only Builder on the project to the Metrics
Builder.
When I run "Build Project", it performs the calculation
and then does nothing; it displays the "No metrics
available" message. I am in the Java perspective.
When I run the build from this command-line:

C:\eclipse>java -cp startup.jar
org.eclipse.core.launcher.Main -noupdate -application
org.eclipse.ant.core.antRunner -data workspace -file
workspace\project\build.xml compile

I get output similar to this:

[eclipse.build] Calculating metrics for
com.saillant.qct.flexsmart.fssync.impl..
.
[eclipse.build] Calculating metrics for
com.saillant.my.project.fssync...
[eclipse.build] Calculating metrics for
SecurityVisitorTestBoundary.java...
[eclipse.build] Calculating metrics for
com.saillant.my.project.security...
[eclipse.build] Calculating metrics for test...
[eclipse.build] Calculating metrics for flexsmart...
[eclipse.build] Building: /project... Done.
[eclipse.build] unknown... Done.
[eclipse.build] unknown... Done.
[metrics.export] Exporting metrics to flat per Metric XML
format... ...

BUILD FAILED
C:\eclipse\workspace\flexsmart\build.xml:44:
java.lang.NullPointerException

I get an output like this:

<?xml version="1.0" encoding="UTF-8"?>
<Metrics scope="

Here is my build target:

<target name="compile" depends="clean">
<mkdir dir="${javac.dest}"/>
<javac srcdir="${src.dir}"
destdir="${javac.dest}">
<classpath refid="classpath" />
</javac>
<eclipse.build projectName="flexsmart"
buildType="full" failOnError="true" errorOut="errors.xml"
errorFormat="xml" />
<metrics.export projectName="flexsmart"
file="flexsmart.xml"/>
</target>

I also have a question: where are the results of the
computation stored? I can't find them anywhere. The
folders are marked "Read-only" and I can't turn that off; I
think it's part of Eclipse, right? Thanks for your time; let
me know if I can supply any more information.

jon.card@saillant.com

Discussion

  • Jon Card

    Jon Card - 2005-10-04

    Logged In: YES
    user_id=1355793

    I'm sorry for missing one detail:

    The problem started when Eclipse I was using 1.3.5 with
    Eclipse 3.0.1 and Eclipse crashed. I was prompted to reset
    the Perspective and the plug-in never worked again. I have
    since installed 3.1 on top of the previous installation and then
    was unable to uninstall or upgrade 1.3.5, so I deleted the
    entry from "feature", "plugin", and deleted site.xml and
    reinstalled 1.3.6. It still doesn't work.

     
  • Jon Card

    Jon Card - 2005-12-09

    Logged In: YES
    user_id=1355793

    I managed to fix this by uninstalling the application,
    then manually deleting the data refering to this project
    in workspace/.metadata.

    Not knowing much about administering or developing with
    Eclipse, I only then found the log files under this
    folder, which list the following errors, which may or may
    not have anything to do with the above problem:

    !ENTRY net.sourceforge.metrics 4 4 2005-12-06 18:34:31.145
    !MESSAGE Could not store =my_project
    !STACK 0
    java.lang.Error: double get for block 272
    at jdbm.recman.RecordFile.get(RecordFile.java:156)
    at jdbm.recman.PhysicalRowIdManager.allocNew
    (PhysicalRowIdManager.java:200)
    at jdbm.recman.PhysicalRowIdManager.alloc
    (PhysicalRowIdManager.java:175)
    at jdbm.recman.PhysicalRowIdManager.insert
    (PhysicalRowIdManager.java:81)
    at jdbm.recman.BaseRecordManager.insert
    (BaseRecordManager.java:213)
    at jdbm.recman.CacheRecordManager.insert
    (CacheRecordManager.java:158)
    at jdbm.recman.CacheRecordManager.insert
    (CacheRecordManager.java:141)
    at jdbm.htree.HashDirectory.put
    (HashDirectory.java:230)
    at jdbm.htree.HTree.put(HTree.java:130)
    at net.sourceforge.metrics.core.sources.Cache.put
    (Cache.java:124)
    at
    net.sourceforge.metrics.core.sources.AbstractMetricSource.s
    ave(AbstractMetricSource.java:313)
    at
    net.sourceforge.metrics.core.sources.ProjectMetrics.recurse
    (ProjectMetrics.java:76)
    at
    net.sourceforge.metrics.core.sources.Dispatcher.calculateAb
    stractMetricSource(Dispatcher.java:109)
    at
    net.sourceforge.metrics.builder.MetricsBuilder$ChangedComma
    nd.execute(MetricsBuilder.java:509)
    at
    net.sourceforge.metrics.builder.MetricsBuilder$CalculatorTh
    read.run(MetricsBuilder.java:713)

    !ENTRY net.sourceforge.metrics 4 4 2005-12-06 18:43:51.681
    !MESSAGE Could not close jdbm database
    !STACK 0
    java.lang.Error: inUse blocks at close time
    at jdbm.recman.RecordFile.close
    (RecordFile.java:311)
    at jdbm.recman.BaseRecordManager.close
    (BaseRecordManager.java:176)
    at jdbm.recman.CacheRecordManager.close
    (CacheRecordManager.java:272)
    at net.sourceforge.metrics.core.sources.Cache.close
    (Cache.java:208)
    at net.sourceforge.metrics.core.MetricsPlugin.stop
    (MetricsPlugin.java:408)
    at
    org.eclipse.osgi.framework.internal.core.BundleContextImpl$
    3.run(BundleContextImpl.java:1035)
    at java.security.AccessController.doPrivileged
    (Native Method)
    at
    org.eclipse.osgi.framework.internal.core.BundleContextImpl.
    stop(BundleContextImpl.java:1031)
    at
    org.eclipse.osgi.framework.internal.core.BundleHost.stopWor
    ker(BundleHost.java:394)
    at
    org.eclipse.osgi.framework.internal.core.AbstractBundle.sto
    p(AbstractBundle.java:408)
    at
    org.eclipse.core.runtime.internal.adaptor.BundleStopper.bas
    icStopBundles(BundleStopper.java:83)
    at
    org.eclipse.core.runtime.internal.adaptor.BundleStopper.sto
    pBundles(BundleStopper.java:73)
    at
    org.eclipse.core.runtime.adaptor.EclipseAdaptor.frameworkSt
    opping(EclipseAdaptor.java:766)
    at
    org.eclipse.osgi.framework.internal.core.Framework.shutdown
    (Framework.java:528)
    at
    org.eclipse.osgi.framework.internal.core.SystemBundle$1.run
    (SystemBundle.java:171)
    at java.lang.Thread.run(Thread.java:534)

     

Log in to post a comment.