5 Replies Latest reply on Apr 16, 2008 9:41 AM by beve

    Not all class are compiled with line number?

    zaiwen

      Hi,

      I am instrumenting Emma Code coverage tool into JBoss ESB 4.2.1 Server GA. The instrumentation is successful, but when generating the report, I only got class, method and block coverage. Line coverage is requested, but not generated becuase "not all class are compiled with line number".

      Any clue? Does this mean that your JBoss ESB 4.2.1 Server were compiled without the line number option? Or does that mean I instrument wrong classes?

      Thanks a million!

        • 1. Re: Not all class are compiled with line number?
          beve

          Hi,

          Can you see which classes that Emma is complaining about?

          If I run :

          #javap -c -verbose org.jboss.soa.esb.couriers.CourierUtil
          

          I can see the LineNumberTables:
          ...
          LineNumberTable:
           line 105: 0
           line 107: 9
           line 108: 14
           line 111: 17
           line 112: 27
           line 114: 40
           line 118: 45
           line 119: 51
           line 118: 59
           line 119: 67
           line 120: 72
           line 121: 75
          ...


          Regards,

          Daniel

          • 2. Re: Not all class are compiled with line number?
            zaiwen

            It seems a lot :)

            For example:

            instrumentESB:
            [instr] package [org/jboss/soa/esb/listeners/config/xbeanmodel] contains classes [AbstractScheduledListener$Factory] without full debug info
            [instr] package [org/jboss/soa/esb/listeners/config/xbeanmodel/impl] contains classes [AbstractScheduledListenerImpl] without full debug info

            Thanks!

            • 3. Re: Not all class are compiled with line number?
              beve

              Ah, ok. These classes are generated and compiled with xmlbeans. And I noticed that we are not specifying the debug flag for the xmlbean target.
              If you add the following to product/rosetta.build.xml:

              <xmlbean
               classgendir="${gendir}/classes"
               javasource="1.5"
               debug="${org.jboss.esb.debug}"
               srcgendir="${gendir}/src"
               destfile="${org.jboss.esb.rosetta.distrib.dir}/lib/jbossesb-config-model-1.0.1.jar"
               classpathref="xbeans-classpath">
               <fileset dir="${org.jboss.esb.root.dir}/etc/schemas/xml/" includes="jbossesb-1.0.1.xsd,jbossesb-1.0.1.xsdconfig"/>
               </xmlbean>
              

              I'll update the main trunk with this so you can just update it if that's any option for you.

              Thanks for spotting this!

              /Daniel

              • 4. Re: Not all class are compiled with line number?
                zaiwen

                Thanks for the update.

                What do you mean by saying you will update the main trunk?

                Will the next release of JBoss ESB server fix this problem? Or if those classes are generated and compiled with xmlbeans, there is no way to have line number? (Forgive me if I ask a silly question).

                Thanks!

                • 5. Re: Not all class are compiled with line number?
                  beve

                  Hi,

                  I meant the subversion main trunk which can be checked out like this:

                  svn co http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/
                  


                  Yep, future versions will compile xmlbean classes with line numbers by default.

                  Regards,

                  Daniel