xradar for executing test project

Help
2009-04-21
2013-06-04
  • Hi,
      I have downloaded xradar-1.0 and configured it with ant. I have done all the configurations as specified in the URL http://xradar.sourceforge.net/installation/configuration.html
      Now i am trying to run the testproject and my build failed.. And the error is as follows..

    E:\xradar\testproject\build.xml:68: The following error occurred while executing this line:
    E:\xradar\testproject\build.xml:87: The following error occurred while executing this line:
    E:\xradar\testproject\release1\docs\tooling\tools.xml:56: The following error occurred while executing this line:
    E:\xradar\testproject\release1\docs\tooling\tools.xml:93: The following error occurred while executing this line:
    java.lang.NoSuchMethodError: org.apache.bcel.classfile.Method.getModifiers()I
     

     
    • Romain PELISSE
      Romain PELISSE
      2009-04-21

      Hi,

      This is a mismatch due to the bcel library. Try replacing the one in your lib directory by this one:

      http://xradar.svn.sourceforge.net/viewvc/xradar/trunk/xradar/lib/bcel-5.2.jar

      (Rather strangely this error happens or not depending on the ant/jvm/os used)

       
    • Hi,
        I have replaced the jar file from the above URL (http://xradar.svn.sourceforge.net/viewvc/xradar/trunk/xradar/lib/bcel-5.2.jar). It's not working and shows the same error. The getModifiers() method is not there in Method.class (inside the jar file org.apache.bcel.classfile.Method). So, pls send me related JAR file ASAP.

       
    • Hi,
        I have replaced the bcel-5.2.jar and ckjm-1.9.jar in lib directory, but still the same error exist.

      java.lang.NoSuchMethodError: org.apache.bcel.classfile.Method.getModifiers()

      need to update or change anything, reply me.

       
      • Romain PELISSE
        Romain PELISSE
        2009-04-22

        Could you give the content of your lib directory now ?

         
    • Here is the content of my lib directory..
        ant-contrib-1.0b1.jar, asm-3.0.jar, backport-util-concurrent-3.0.jar, bcel-5.2.jar, ccl-1.3.0.jar, checkstyle-all-4.2.jar, ckjm-1.9.jar, dependency-finder-1.1.0.jar, jakarta-oro-2.0.8.jar, java2html-4.1.jar, javancss-21.41.jar, jaxen-1.1.jar, jdepend-2.9.1.jar, log4j-1.2.9.jar, log4j.properties, pmd-xradar-3.9.jar, xradar-1.0.jar, xradar-1.0-beta2.jar

      And the cobertura directory contains (lib\cobertura)
        antlr-2.7.6.jar, asm-2.2.1.jar, cobertura-1.8.jar, oro-2.0.8.jar

      And the endorsed directory contains (lib\endorsed)
        bcel-5.1.jar, serializer-2.7.0.jar, xalan-2.7.0.jar, xercesImpl-2.7.0.jar

       
      • Romain PELISSE
        Romain PELISSE
        2009-04-22

        What mess... Is this the directory shipped withe 1.0 ??? If so, we really need to release the 1.1...

        Well, anyway, it's pretty clear you're are still using bcel-5.1.jar (in the endorsed libs), remove this jars and I also think ccl is not really needed, you should try removing it.

        Which version of java / ant are you using ?

         
    • yes, this is the xradar directory which i have downloaded and extracted it (xradar-1.0.zip) from the sourceforge.net

      Now, i have removed the bcel-5.1.jar (which was in the endorsed libs) and ccl-1.3.0.jar. but still the same error exist.

      I am using jdk 1.5 and apache-ant-1.6.5 as specified in the configuration. Does the bcel jar file contain getModifiers() method in the Method.class?

       
    • Romain PELISSE
      Romain PELISSE
      2009-04-22

      Ok, would mind switching to JDK6 ? I did most of the testing with this java version.

      As for you question:

      Java.lang.NoSuchMethodError:org.apache.bcel.classfile.Method.getModifiers()I

      so yes this method should be in bcel, but in think a other jar is shipped with class from bcel.

      I assume you are running XRadar on windows ? (I never had those issue on Linux so).

       
    • Romain PELISSE
      Romain PELISSE
      2009-04-22

      Also, you should check what is in the tools.xml file at line 93, it will tell you what tools failed (and therefore you can try to simply remove it)

       
    • Yes, I am running xradar on windows. But i can't upgrade jdk 1. 5 to jdk 1.6

      Can u pls send me the bcel jar file which contains getModifiers() method in the Method.class? or the download link?

      In tools.xml the line no. 93 contains <antcall target="run-ckjm"/>. This line is inside the
      <target name="ckjm" description="Invokes ckjm ant task to generate xml based output." unless="">
          <antcall target="run-ckjm"/>
      </target>

      I removed the line no. 93, and then i built the testproject by giving ant command in the prompt, again the same error occurred. But that line again appeared in the xml file.

       
      • Romain PELISSE
        Romain PELISSE
        2009-04-22

        As i suspected you have an issue with ckjm (this i got, but i though i fixed it on 1.0)...

        I don't have a "magic jar" to send you, you have to investigate your issue to assert what's going wrong here. Use the unjar tools to look into the ckjm jars and the bcel one to check if the missing methond is really missing...

         
    • Hi,
        I have executed the testproject successfully by replacing the bcel-5.2.jar in jdk1.5.0_07\jre\lib\ext path. Thanks for ur kind help.

       
      • Romain PELISSE
        Romain PELISSE
        2009-04-22

        Gosh ! There is a bcel.jar shipped in with the JDK ! That's why !

        Ok, you shouldn't actually hack you jdk, placing the bcel-5.2.jar in the lib/endorsed directory and starting xradar with the appropriate -Dendorsed.libs=PATH/TO/lib/endorsed/ should be enough...

        Well, i assume you are running radar on your own desktop, so it's not a real issue... It'll be much more a problem if you were running in somekind of production system.

        Please let me know if you run into more issue... As you may have notice our projet is short of people testing radar on windows !