10 Replies Latest reply on Jul 11, 2007 5:36 PM by Tony Herstell

    Seam + Eclipse


      I am a converted Netbeans user and am having trouble working with a Sean-Gen app in Eclipse. Specifically debugging on a server. I have switched to Eclipse in anticipation of RHDS and better Seam support than Netbeans can offer.

      I have opened an application generated by Seam-Gen in eclipse and added a JBoss 4.2 server to the "server" folder in Eclipse but can't seem to be able to add the application to the server to enable debugging. When I open the dialog that lists available projects to add to the server, nothing shows up. What am I doing wrong?

      Note, I am using Eclipse 3.3 (Europa JEE) and a Nightly build of JBoss Tools.

        • 1. Re: Seam + Eclipse
          Pete Muir Master

          Run the restart target in ant, and start the server. We don't have full wtp integration yet. Max would have to tell you what the plan for RHDS is, I don't know.

          • 2. Re: Seam + Eclipse
            Ning Zhao Apprentice

            the jboss tools for eclipse nightly build is still _very_ awkward to use for now. Do not use it. Install a clean Europa SDK (the classic SDK but not the prepackaged one for JEE developers). Then use the Europa discovery site to install the officially signed JEE features, so you get syntax highlighting for xml/xhtml/sql files. Install a subversion plugin if needed. Normally you do not need any more features. As for the server start/shut off thing, you can use a shell( DOS shell or any *nix shell) and run the start up script....I am developing my Seam app this way. You can set up a Seam-gen generated projects in your eclipse following the Seam reference. Disable the auto build. (important. It saves your frustration) When you want to deploy, on the eclipse, just click (project-->clean-->check the "start a build immediately"). The Seam generated build.xml for your project automatically do the deploy to your jboss server. Watch your shell. Have fun....


            • 3. Re: Seam + Eclipse

              Thanks for both of your responses.

              enzhoa - will I be able to use the debugger in eclipse if I use the shell to start the server?

              basically what I am doing now is using the build script to deploy the app and starting the server from the shell. I am resorting to log statements to debug my app (which sucks!) because I can't figure out how to debug from eclipse.

              • 4. Re: Seam + Eclipse
                Ning Zhao Apprentice

                sorry no debugger if server started that way. The seam-gen generated app has a debugger page, which tells pretty much about the server side state. That helped a lot. Sometimes I had to resort to the server log too, yes, it really sucks....

                • 5. Re: Seam + Eclipse
                  Pete Muir Master

                  Start the server in debug mode from inside eclipse. Then just put a breakpoint in your method and the server will stop. Yes, it's that easy.

                  • 6. Re: Seam + Eclipse

                    pete, does it matter if I use an ear archive or exploded archive when I deploy when debugging? Is there a different ant target I should run when debugging?

                    • 7. Re: Seam + Eclipse

                      Got it working now Pete, wow it was "that easy". I thought there was some plumbing between the app and server that needed to be set up. Thanks again!!

                      I have reverted back to JBoss IDE 2.0B + Exadel because I could not get the server started in RHDS, every time it would attempt to start, an error was thrown about not being able to start the server, weird.

                      • 8. Re: Seam + Eclipse
                        Pete Muir Master

                        You can use exploded or not, the debugger doesn't care (of course, exploded is better for dev :). And don't tell Max, but I actually just use Eclipse Europa with the WTP stuff, and use the WTP server console to launch the server.

                        • 9. Re: Seam + Eclipse
                          Gary Pinkham Newbie


                          "smithbstl" wrote:
                          I have reverted back to JBoss IDE 2.0B + Exadel because I could not get the server started in RHDS, every time it would attempt to start, an error was thrown about not being able to start the server, weird.

                          I had that same issue but I believe it was fixed. I downloaded the latest nightly build (JBossTools-200707110856-nightly-ALL-win32.zip)and it works again!


                          • 10. Re: Seam + Eclipse
                            Tony Herstell Master

                            I use MyEclispe and deploy the software, without ant, directly to the server.
                            I have posted previously how to do this but can put together a small presentation and a download of of a Seam2 , Jboss 4.2 skeleton app that allows for exploded deployment.

                            I do incluse an ant script with it but its very basic.

                            In short here is what you do:

                            Create a J5EE EAR type project in MyEclipse...
                            This actually produces three projects
                            XXX (the ear)
                            XXXEJB (the jar)
                            XXXWar (the war)

                            Open up the ear that is deployed by the booking example in SEAM 2.

                            Copy over all the jars and files to the relevant projects.


                            go MyEclipse->Add and Remove Project Deployments and pint it at your server.

                            Run the server from within MyEclipse

                            EASY! and no Ant Script.

                            If you change most files the server will just keep running... you usually have to re-start the server if you change some config files.

                            As I said I could upload an example project if people want a jumping off point etc.