4 Replies Latest reply on Jul 27, 2011 5:45 AM by Carles Sala

    Import ESB Code into Eclipse

    Carles Sala Newbie

      Hi,

       

      I know this may a basic question, but I found almost no documentation about this.

       

      My situation is: I am working on some projects in Eclipse and deployed into an ESB 4.9 using maven. Until now I had no problem with this, and I could properly debug my code remotely, but now I went into some strange behavior from the ESB itself which I cannot manage to understand only reading the code.

      Therefore, I tried downloading the ESB code and importing it into eclipse in order to integrate it with my project, so I can debug the whole code, being it my own one or the JBoss one.

      However, I couldn't manage to do so:If I create the project from the code it lacks some dependencies, such as log4j, which give me errors, and if I download the .project and .classpath files for the project, it resolves none of the org.jboss packages, having the code full of errors.

      In an case, if I try debugging the server despite of the errors, the breakpoints I set in my code are processed but ones in the jboss code are ignored, so I believe it does not consider any relation between both projects.

       

      What may I be missing?

       

      Many thanks in advance!

        • 1. Re: Import ESB Code into Eclipse
          Tom Cunningham Master

          If you're only looking at setting breaks inside of ESB code, I'd just ignore the missing dependencies.     I'd create a new project based on the ESB sources, making sure to set the <esb-root-dir>/product directory as my default location.     I know some errors will show up, but it shouldn't prohibit you from hitting your breakpoints inside of ESB code.

           

          Where are you setting your breakpoints?    It is strange that they are not being hit, because I do this all the time.

          1 of 1 people found this helpful
          • 2. Re: Import ESB Code into Eclipse
            Carles Sala Newbie

            Thanks for your answer Tom.

             

            When I tried it I set the breakpoints inside the notifyException method in ActionProcessingPipeline, but exceptions were thrown and the breakpoint was never hit, so I gave up trying it.

            Anyway, if you do it this way and it works, maybe I did something wrong so I'll give it another try and come back if I still do not manage to get it working.

             

            Thanks!

            • 3. Re: Import ESB Code into Eclipse
              Tom Cunningham Master

              That's strange.    Make sure you're using the correct source for your distribution, and maybe try setting breaks earlier in the pipeline to try to figure out what's going on there.

              • 4. Re: Import ESB Code into Eclipse
                Carles Sala Newbie

                Now it worked as expected.

                 

                I downloaded the source again from the branch, imported it into eclipse as you suggested, and my breakpoint was hit at the first attempt.

                 

                Many Thanks!

                 

                PS: Is there any "Solved" flag in these forums in order to close the issue?