Topic
23 replies Latest Post - ‏2012-10-23T13:47:54Z by mattia
SibiVaithara
SibiVaithara
40 Posts
ACCEPTED ANSWER

Pinned topic Unable to export source with setDebugInfo and projectSetBuild tasks buildin

‏2012-03-29T11:48:52Z |
Hi

I have the following requirement inlcude debug info , which inlcudes sources and line numbers when i build my jar/ear files.

I use RAD build utility 8.0.4 and have used

<setDebugInfo
LineNumber="true"
LocalVariable="true"
sourceFile="true"
PropertyName="DebugInfo" />

followed by

<!-- Compile the projects using RAD build. -->
<projectSetBuild ProjectSetFileName="c:/ws/projectset.psf"
propertyBuiltProjectNames="BuiltProjectNames"
failonerror="true" quiet="false" />

but when i look at the bin folders, i do not see the source files to be copied. Any pointers in this direction are welcome.
Thanks and Regards
Sibi
Updated on 2012-10-23T13:47:54Z at 2012-10-23T13:47:54Z by mattia
  • mattia
    mattia
    38 Posts
    ACCEPTED ANSWER

    Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

    ‏2012-04-09T17:40:41Z  in response to SibiVaithara
    Hi,

    I see you are doing a ProjectSetBuild. But are you doing a corresponding ProjectSetImport before that in order to import the projects from CVS repository to your local workspace?

    For more information on our import Ant tasks, please refer to the Info Center documentation:
    • ProjectImport: http://publib.boulder.ibm.com/infocenter/radhelp/v8/topic/com.ibm.ant.tasks.doc/topics/tantprojectimport.html
    • ProjectSetImport: http://publib.boulder.ibm.com/infocenter/radhelp/v8/topic/com.ibm.ant.tasks.doc/topics/tantprojectsetimport.html
    • SibiVaithara
      SibiVaithara
      40 Posts
      ACCEPTED ANSWER

      Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

      ‏2012-08-09T11:08:37Z  in response to mattia
      Hi Mattia
      Thank you for your repsonse.

      I use ProjectSetImport to imprt the project into workspace. The code snippet is as below

      
      <setDebugInfo LineNumber=
      "true" LocalVariable=
      "true" sourceFile=
      "true" PropertyName=
      "DebugInfo" />   <echo message=
      "ProjectBuild: Build Debug levels set to : ${DebugInfo}."/>   <projectSetImport ProjectSetFileName=
      "${projectSetFileName}" propertyImportedProjectNames=
      "ImportedProjectNames" failonerror=
      "true"  autoDeleteExistingProjects=
      "true" /> <projectSetBuild ProjectSetFileName=
      "${projectSetFileName}" propertyBuiltProjectNames=
      "BuiltProjectNames" failonerror=
      "true" quiet=
      "false" />   </target>
      


      I see the folliwing on console

      *setDebugInfo setDebugInfo: LocalVariable=generate, LineNumber=generate, SourceFile=generate.
      echo ProjectBuild: Build Debug levels set to : setDebugInfo: LocalVariable=generate, LineNumber=generate, SourceFile=generate..*
      Sorry for the delayed response. Had lost all hopes on getting an answer. I am facing teh rpoblem now and require assistance.

      Thanks and Regards
      Sibi
      • SibiVaithara
        SibiVaithara
        40 Posts
        ACCEPTED ANSWER

        Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

        ‏2012-08-09T18:32:02Z  in response to SibiVaithara
        Hi

        The article: http://www.ibm.com/developerworks/websphere/library/techarticles/0203_searle/searle3.html i saw on IBM website also has little information on this regard. Does not give a full sample and from that it seems what i do is correct.
        • SibiVaithara
          SibiVaithara
          40 Posts
          ACCEPTED ANSWER

          Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

          ‏2012-08-09T18:40:51Z  in response to SibiVaithara
          Another observation for projectBuild task that builds only a single project, an attribute anmed DebugCompilation that can turn debug on and off ( with default as on).

          http://publib.boulder.ibm.com/infocenter/radhelp/v7r0m0/index.jsp?topic=/com.ibm.etools.ant.tasks.doc/topics/tantproj.html

          I do not see the same with projectSetBuild
          • mattia
            mattia
            38 Posts
            ACCEPTED ANSWER

            Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

            ‏2012-08-13T14:01:29Z  in response to SibiVaithara
            Hello

            I am not sure I understand you problem fully. Are you expecting the setDebugInfo Ant task to do something different?

            If you need to build multiple projects, you can either call projectBuild on each project that you need to build, or you can call workspaceBuild Ant task once (this will build the whole workspace)

            For what regards the ProjectSetBuild Ant task, it does not support a DebugCompilation attribute.
            • SibiVaithara
              SibiVaithara
              40 Posts
              ACCEPTED ANSWER

              Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

              ‏2012-08-13T18:26:48Z  in response to mattia
              Hi Mattia

              Thank you very much for the reply.

              When I get an exception, I want the stacktrace to print the source name along with the line number. Now it prints Unknown source despite me using setDebugInfo with all trtributes set to true before performing build. The last two posts were just my observations on the IBM ant tasks.

              What am I missing here? why does my build not have the debug info ( Note i run RADBU 8.0.2 for websphere 7.0.0.19 on a Redhat enterprise 5.3 Linux 64 bit)

              Another doubt i have , as per the example at http://publib.boulder.ibm.com/infocenter/radhelp/v8/index.jsp?topic=/com.ibm.ant.tasks.doc/topics/tantsetd.html

              
              <setDebugInfo lineNumber=
              "false" localVariable=
              "false" sourceFile=
              "false" /> <echo message=
              "current settings: ${debugInfo}" /> ... 
              
              do builds here .. build 1... <setDebugInfo debugInfo=
              "true" propertyName=
              "settings" /> <echo message=
              "current settings: ${settings}" />
              


              the setDebugInfo task is set before and after the compilation. First time its with all attributes as false and and hence build is without ,line number and source info etc.. and after build its re-enabled so that later builds are in debug. Is my understanding correct? Or does this imply that the first builds were actually debug builds ( build 1) as per comment added to the sample?

              Thanks and Regards
              Sibi
              • mattia
                mattia
                38 Posts
                ACCEPTED ANSWER

                Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

                ‏2012-08-14T19:12:48Z  in response to SibiVaithara
                Hi,

                The default RADBU JDT compilation settings will be to provide debug information, so, in reality, there should be no need to be using the <setDebugInfo> task at all as all preferences will always be set to "generate" by default.

                You say to be running on a Redhat enterprise 5.3 Linux 64 bit; what type of Java VM are you using?
                Rational Application Developer's IBM JVM will have the -Xnolinenumbers parameter set in by default, this is what could possibly be causing the "unknown source" errors you are seeing if you happen to be having this kind of setup...

                If not, could you provide any further details on your JVM and environment?
                You may find useful information at the top of our workspace's log file (located in <WORKSPACE>/.metadata/.log ).
                • SibiVaithara
                  SibiVaithara
                  40 Posts
                  ACCEPTED ANSWER

                  Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

                  ‏2012-08-17T05:34:19Z  in response to mattia
                  Dear Mattia

                  I use the RunAnt.bat that comes with RADBU8.0.2 to do the compilation. The task is invoked from Husdon http://hudson-ci.org/ 2.2.0 which I use for build.

                  My JVM is IBM J9 VM (32 bit). The output of java -version is

                  
                  Java(TM) SE Runtime Environment (build pxi3260sr9ifix-20110222_02(SR9+IZ94423+IZ95150+IZ94326+IZ91385)) IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260sr9-20110218_76011 (JIT enabled, AOT enabled) J9VM - 20110218_076011 JIT  - r9_20101028_17488ifx3 GC   - 20101027_AA) JCL  - 20110211_02
                  

                  The /metadata/.log is

                  
                  !SESSION 2012-08-17 04:17:50.645 ----------------------------------------------- eclipse.buildId=unknown java.fullversion=JRE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260sr9-20110218_76011 (JIT enabled, AOT enabled) J9VM - 20110218_076011 JIT  - r9_20101028_17488ifx3 GC   - 20101027_AA BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US Framework arguments:  -application com.ibm.etools.j2ee.ant.RunAnt -buildfile buildMain.xml -Drad.preferences.useeclipseprefs=
                  
                  true -verbose -Drad.preferences.filename=RADPref.epf -DbuildMainProps=TestEJBProject.properties buildme Command-line arguments:  -application com.ibm.etools.j2ee.ant.RunAnt -data TestEJBProject-rad-workspace -os linux -ws gtk -buildfile buildMain.xml -Drad.preferences.useeclipseprefs=
                  
                  true -verbose -Drad.preferences.filename=RADPref.epf -DbuildMainProps=TestEJBProject.properties buildme   !ENTRY org.eclipse.wst.common.project.facet.core 4 0 2012-08-17 04:25:02.673 !MESSAGE Project facet wst.jsdt.web has not been defined. It is used in plugin com.ibm.etools.aries.core.   !ENTRY org.eclipse.wst.common.project.facet.core 4 0 2012-08-17 04:25:02.673 !MESSAGE Project facet enabler.widgets has not been defined. It is used in plugin com.ibm.etools.aries.core.   !ENTRY org.eclipse.wst.common.project.facet.core 4 0 2012-08-17 04:25:02.681 !MESSAGE Project facet jpt.jpa has not been defined. It is used in plugin com.ibm.etools.aries.core.   !ENTRY org.eclipse.wst.common.project.facet.core 4 0 2012-08-17 04:25:09.292 !MESSAGE Project facet jpt.jpa has not been defined. It is used in plugin com.ibm.ws.ast.st.v8.core.   !ENTRY org.eclipse.wst.common.project.facet.core 4 0 2012-08-17 04:25:09.293 !MESSAGE Project facet jpt.jpa has not been defined. It is used in plugin com.ibm.ws.ast.st.v7.core.   !ENTRY org.eclipse.wst.common.project.facet.core 4 0 2012-08-17 04:25:09.294 !MESSAGE Project facet jpt.jpa has not been defined. It is used in plugin com.ibm.ws.ast.st.v61.core.
                  


                  the .log file has no mention of -Xnolinenumbers being set.
                  Thanks and Regards
                  Sibi
                  • mattia
                    mattia
                    38 Posts
                    ACCEPTED ANSWER

                    Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

                    ‏2012-08-17T16:37:06Z  in response to SibiVaithara
                    Hi,

                    What is the content of your <RADBU>/eclipse.ini file?
                    • SibiVaithara
                      SibiVaithara
                      40 Posts
                      ACCEPTED ANSWER

                      Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

                      ‏2012-08-20T12:51:06Z  in response to mattia
                      Dear Mattia

                      The eclipse.ini only has

                      
                      -vm /opt/IBM/BuildUtility802/jdk/jre/bin/javaw
                      


                      The headsless build is alo passed in a RAD Preferences file via -Drad.preferences.filename=RADPref.epf

                      The file is attched for reference. But that too ha nothing on debug.

                      Thansk and Regards
                      Sibi
                      • mattia
                        mattia
                        38 Posts
                        ACCEPTED ANSWER

                        Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

                        ‏2012-08-20T13:46:01Z  in response to SibiVaithara
                        I wonder, have you tried without the preferences file?
                        Other thing, what happens if you open your workspace directly in RAD (in the GUI)? Are you getting any errors in this case?

                        Also, what does the TestEJBProject.properties contain?
                        I have a feeling there could be some setting somewhere which is "nulling" out the default behavior. Maybe in the Hudson configuration?
                        • SibiVaithara
                          SibiVaithara
                          40 Posts
                          ACCEPTED ANSWER

                          Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

                          ‏2012-08-21T06:37:28Z  in response to mattia
                          Dear Mattia,

                          I can open the workspace in RAD GUI and it does not show any error. I will try building without the preferences file as you suggested and test.

                          The TestEJBProject.properties file defines properties like the name of the project,

                          
                          build.app=TestEJBProjectApp build.ejb=TestEJBProjectEJB build.ejb.client=TestEJBProjectEJBClient   
                          //project set file name build.psf.file=TestEJBProject.psf   Thanks and Regards Sibi   ear.name=testejbprojectapp
                          
                          • SibiVaithara
                            SibiVaithara
                            40 Posts
                            ACCEPTED ANSWER

                            Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

                            ‏2012-08-21T08:12:17Z  in response to SibiVaithara
                            Dear Matia

                            Sorry my signature got added into the TestEJBProject.properties. The corrected file contents below

                            
                            build.ejb=TestEJBProjectEJB build.ejb.client=TestEJBProjectEJBClient 
                            //project set file name build.psf.file=TestEJBProject.psf ear.name=testejbprojectapp
                            


                            Thanks and Regards
                            Sibi
                            • SibiVaithara
                              SibiVaithara
                              40 Posts
                              ACCEPTED ANSWER

                              Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

                              ‏2012-08-21T08:30:03Z  in response to SibiVaithara
                              Dear Mattia
                              Forgot to mention that all that hudosn does is to call the runAnt.bat file provided by RADBU. I have verfied the hudson variables none are set. other than HUDSON_HOME so environment varibales are rulled out.

                              checking debug level as follows gives
                              
                              <setDebugInfo /> <echo message=
                              "ProjectBuild: Build Debug levels set to : ${DebugInfo}. "/>
                              


                              ProjectBuild: Build Debug levels set to : setDebugInfo: LocalVariable=generate, LineNumber=generate, SourceFile=generate..

                              Thanks and Regards
                              Sibi
                              • SibiVaithara
                                SibiVaithara
                                40 Posts
                                ACCEPTED ANSWER

                                Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

                                ‏2012-08-21T09:30:15Z  in response to SibiVaithara
                                Dear Mattia,

                                I removed the preference file and ran the build still there is no change?. The http://publib.boulder.ibm.com/infocenter/rsahelp/v7r0m0/index.jsp on setDebugInfo gives sample as below

                                
                                <setDebugInfo LineNumber=
                                "false" LocalVariable=
                                "false" sourceFile=
                                "false" /> <echo message=
                                "current settings: ${DebugInfo}" /> ... 
                                
                                do builds here ... <setDebugInfo DebugInfo=
                                "true" PropertyName=
                                "Settings" /> <echo message=
                                "current settings: ${Settings}" />
                                


                                My interpretation is the sample is to swicth off the debug info that is provided by default build. Am I right on this?

                                Thanks and Regards
                                Sibi
                                • mattia
                                  mattia
                                  38 Posts
                                  ACCEPTED ANSWER

                                  Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

                                  ‏2012-08-21T13:13:25Z  in response to SibiVaithara
                                  Hi

                                  Why are you setting the properties to "false" before the build? Could you try a build without using the setDebugInfo task at all? I wonder if it works that way.

                                  Also, could you try another build by using the runAnt.bat found directly in RAD (rather then the RADBU one). You can try removing the -Xnolinenumbers parameter from the RAD's eclipse.ini file if you are getting the same problem. I'd just like to see if this is a RADBU problem, or if it is happening also for RAD.

                                  Regarding Hudson, could you check if its using any .ini file with parameters that could be disturbing us?

                                  Thanks.
                                  • SibiVaithara
                                    SibiVaithara
                                    40 Posts
                                    ACCEPTED ANSWER

                                    Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

                                    ‏2012-09-25T10:11:27Z  in response to mattia
                                    Dear Mattia

                                    Sorry for beling late in my reply. Was busy with one of our applications going into production.

                                    I have checked eclipse.ini in RAD and it does not have an -Xnolinenumbers parameter defined. I also tried removing the setdebugInfo task but that too had no effect. I still do not get line numbers.

                                    I have reverified all hudson configuration. Only file that I pass to hudson is the properties file from which i get location of the source code to build, name of the component etc.

                                    Thanks and Regards
                                    Sibi
                                    • mattia
                                      mattia
                                      38 Posts
                                      ACCEPTED ANSWER

                                      Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

                                      ‏2012-10-05T20:00:31Z  in response to SibiVaithara
                                      Hi

                                      No problem

                                      Could you please try to add "-Xnolinenumbers" to the eclipse.ini and see if that helps anyhow ?
                                    • mattia
                                      mattia
                                      38 Posts
                                      ACCEPTED ANSWER

                                      Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

                                      ‏2012-10-08T20:31:53Z  in response to SibiVaithara
                                      Sorry, instead of adding -Xnolinenumbers to the eclipse.ini, please add it into the <RAD_HOME>/bin/runAnt.bat instead, the modified line will be:

                                      %JAVAEXE% -Xnolinenumbers -Dwtp.autotest.noninteractive=true -cp %LAUNCHER_JAR% org.eclipse.equinox.launcher.Main -install %INSTALL_DIRECTORY% -application com.ibm.etools.j2ee.ant.RunAnt -data "%WORKSPACE%" %*
                                      • SibiVaithara
                                        SibiVaithara
                                        40 Posts
                                        ACCEPTED ANSWER

                                        Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

                                        ‏2012-10-18T13:58:05Z  in response to mattia
                                        Dear Mattia

                                        Thank you. I tried that out but that too failed. I still do not get the line numbers.
                                        Thanks and Regards
                                        Sibi
  • mattia
    mattia
    38 Posts
    ACCEPTED ANSWER

    Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

    ‏2012-10-23T13:41:11Z  in response to SibiVaithara
    Hi t

    What are you using to perform the Ant build? Are you using the entry point provided by RAD in <RAD_HOME>/bin/runAnt.bat?
    Please could you provide more detail on how you are running the build?

    Also, are you able to perform your EAR export from within the RAD workbench (ie not using Ant)? Try to do so: right click on your project from within your workspace and select Export > EAR. Does that work?

    How is the Preference setting related to this? What type of preferences do you have in there?

    Also please provide a copy of the full output generate from the Ant script inside your command prompt.

    Thanks!
    • mattia
      mattia
      38 Posts
      ACCEPTED ANSWER

      Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

      ‏2012-10-23T13:41:51Z  in response to mattia
      Sorry, ignore previous post, its on the wrong thread!
      • mattia
        mattia
        38 Posts
        ACCEPTED ANSWER

        Re: Unable to export source with setDebugInfo and projectSetBuild tasks buildin

        ‏2012-10-23T13:47:54Z  in response to mattia
        Hi,

        Not sure what to suggest any more at this point.
        If you are still running into the problem, please create a reproducing test case and contact RAD support:

        http://www.ibm.com/software/rational/support/contact.html?rcss=rtlrad

        We'll be able to look into your problem with more attention in this way.
        Thanks!