10 Replies Latest reply on Nov 15, 2007 2:19 PM by rhasselbaum

    How to debug an old J2EE Project created with an older JBOSS

    millenium

      Hello out there,
      we are using Eclipse 3.1 with JBoss IDE 1.5 since now. Now we wanted to upgrade to the current release (Eclipse 3.2 and JBoss Tools 2.2 Beta 2 - downloaded via Download-Site, using the offered Bundle). All works fine (XDoclet, Packaging), but there is no way to configure a Debug-Configuration for our JBoss 3.2.5 server. As I read in other topics, this is because our project is no WTP-Project.
      What will I have to do to deploy and debug our Application within the new Eclipse-Bundle? Is there any way to convert our project to an Eclipse WTP-Project? Or is there another way to enable Debugging?

      Thx in advance

      Mark

        • 1. Re: How to debug an old J2EE Project created with an older J
          maxandersen

          Your projects do not have to be WTP projects, but you need to create a Server representing the 3.2.5 server - Ctrl+N, Server, JBoss AS 3.2.

          Then that server can stopped/started/debugged.

          Then right click your war/ear and say "Deploy to server" and it will be kept in sync with the server.

          You can also use the new packaging/archiving and let the module be built incrementally instead of requiring a full publish constantly.

          • 2. Re: How to debug an old J2EE Project created with an older J
            millenium

            Thanx for your help, your way works. Also Hot Deployment (e.g. changes in a servlet) and Debugging is working now.
            But how can I redeploy my application? If I change something in a jsp, there is no hot deployement. In earlier versions I packaged my Application again and made a redeploy on the application.
            In the new version there is no redeploy-function. I have to stop the server, package and debug again. Is there an easier way?
            You also wrote there would be a new incremental packaging available. How can I use this?

            Thx!!

            Mark

            • 3. Re: How to debug an old J2EE Project created with an older J
              maxandersen

               

              "millenium" wrote:
              Thanx for your help, your way works. Also Hot Deployment (e.g. changes in a servlet) and Debugging is working now.


              Good ;)


              But how can I redeploy my application? If I change something in a jsp, there is no hot deployement. In earlier versions I packaged my Application again and made a redeploy on the application.


              This should happen automatically now when eclipse sees the archive have been updated.


              In the new version there is no redeploy-function. I have to stop the server, package and debug again. Is there an easier way?


              Open the JBoss Server View or Servers view - there should be a module called whatever the file you deployed; here you can redeploy/clean etc.


              You also wrote there would be a new incremental packaging available. How can I use this?


              I wonder what you are actually using now since the old archiving is not included anymore ;)

              Look for the Archive view - here you can define the packaging you want; as jar or as exploded and always in sync.

              • 4. Re: How to debug an old J2EE Project created with an older J
                millenium

                Hi,
                I doesnt get the automatic package build working. Here is what I do:
                1) Adding new Server Jboss 3.2.5. This works so far. But I cannot add my project in the wizard. I get the error "The server does not support version 1.0 of the J2EE utility jar specification.".
                2) Right click on my project and "Run Packaging"
                3) Right click on ear and select "Debug on server"
                4) The server starts automatically, Debug and Hot Deployement (except jsp) is working
                5) Changing a jsp and save. Nothing happens (no packaigng in the background).
                6) Right click on my ear in the server view. I can only "Remove", "Publish" and "Refresh view".
                7) If I want to use my changed jsp, I have to stop the server and start at point 2.

                What is going wrong?

                Bye

                Mark

                • 5. Re: How to debug an old J2EE Project created with an older J
                  maxandersen

                  1) Report this in jira (with details on how we recrate that projects that is failing to be added)

                  2) Run packaging is the old JBoss IDE - not part of JBoss Tools

                  3-7) Use the *Archiving* features; not old Packaging JBoss IDE (it sounds like you have a mix of jboss tools and jboss ide)

                  • 6. Re: How to debug an old J2EE Project created with an older J
                    rhasselbaum

                     

                    "max.andersen@jboss.com" wrote:
                    3-7) Use the *Archiving* features; not old Packaging JBoss IDE (it sounds like you have a mix of jboss tools and jboss ide)


                    Hi! I'm in a similar situation, trying to migrate my project from JBoss-IDE to JBoss Tools (Beta4). So I understand the old "Run Packaging" method of deployment is obsolete. Okay, but how do I configure the equivalent "Archiving" feature in JBoss AS Tools? I've looked through project preferences and can't find anything that lets me configure a WAR file for deployment. I can set up and start the JBoss server through Eclipse, but if I try to add my project to it, I get the message: "There are no projects that can be added or removed from the server."

                    Any guidance greatly appreciated! Can't find much info on the wiki about this.

                    • 7. Re: How to debug an old J2EE Project created with an older J
                      maxandersen

                      Ok - the best i can do right now is to point you to a rough version of a screnncast i'm preparing about this.

                      see http://screencast.com/t/0IO7DQou

                      let me know if that helps you ;)

                      • 8. Re: How to debug an old J2EE Project created with an older J
                        rhasselbaum

                        Thanks! I actually found the "Project Archives" view on my own and started playing with it. However, when I try to add a new fileset to the WAR, I'm getting a NullPointerException before the dialog comes up.

                        java.lang.NullPointerException
                         at org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory.createDirectoryScanner(DirectoryScannerFactory.java:43)
                         at org.jboss.ide.eclipse.archives.core.model.ArchivesModelCore.findMatchingPaths(ArchivesModelCore.java:95)
                         at org.jboss.ide.eclipse.archives.ui.wizards.pages.FilesetInfoWizardPage.changePreview(FilesetInfoWizardPage.java:305)
                         at org.jboss.ide.eclipse.archives.ui.wizards.pages.FilesetInfoWizardPage.createControl(FilesetInfoWizardPage.java:86)
                         at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:170)
                         at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:669)
                        ...
                        


                        Perhaps I should add an issue to JIRA? I'm running under Eclipse 3.3.0 under openSUSE Linux, for what it's worth.

                        • 9. Re: How to debug an old J2EE Project created with an older J
                          maxandersen

                          yes please report that in jira ASAP and let us know if there is something special about that directory (is it a linked folder or something?) then we will look into it.

                          • 10. Re: How to debug an old J2EE Project created with an older J
                            rhasselbaum

                            Submitted JBIDE-1325. Nothing special I can think of about the project directory. It's not a symlink, but it is external to the "workspace" hierarchy.