14 Replies Latest reply on Apr 13, 2009 11:45 AM by peterj

    Eclipse, Jboss 5 development and debugging

    ketpah

      We are using IBM all the way, and I took the holy job to move away from IBM and switch to Eclipse and perhaps JBoss. We finally convinced management. I started with JBoss and if it does turn out a painful experience, then will try other app servers.

      I installed Eclipse Europa and JBoss 5.0.1.

      Even though I spent fair amount of time, I haven't figured out a way to develop and debug java applications within Eclipse.

      I can start and stop JBoss AS from Eclipse and that's it.

      I cannot:
      make a change to my application and republish to JBoss
      restart JBoss from Eclipse
      debug Java code within Eclipse environment

      if I try to restart or republish to JBoss, I get all kinds of errors which one of them is here, and generated 'zarro' response!!!
      http://www.jboss.org/index.html?module=bb&op=viewtopic&t=152052

      I searched internet, browsed the JBoss in Action book, but I could not find any information about how to develop and debug applications in Eclipse for JBoss deployment.

      I believe you all have working development environments, I cannot imagine a development environment where you cannot start/deploy(publish)/stop/test application server from your IDE.

      Please tell me about your environment, if you are using Eclipse. If so, how are you able to test and debug your applications within Eclipse.

      I don't really want to give up on JBoss as I believe without being able to test and debug an application, it won't be where it is today.

      Thanks to you all
      - Ketpah

        • 1. Re: Eclipse, Jboss 5 development and debugging
          alesj

          What about if you use JBoss IDE (which is pimped Eclipse)?
          - http://www.jboss.org/tools

          • 2. Re: Eclipse, Jboss 5 development and debugging
            peterj

            Ales meant JBoss Tools, not JBoss IDE. JBoss IDE is a defunct product that is no longer under development. Though he did give you the proper URL for JBoss Tools.

            The JBoss Tools documentation contains many tutorials that should get you started.

            And to answer your question about development, I use Eclipse as a text-editor-on-steroids, and then use Ant or Maven to compile/package/deploy the app. I rarely use Eclipse to do debugging - I can usually track down any bugs using logging. However, other members of my development team do use Eclipse for debugging.

            • 3. Re: Eclipse, Jboss 5 development and debugging
              wolfgangknauf

              Hi ketpath,

              I use Eclipse + WebToolsPlatform plugin + jboss since several years, and starting, deploying, debugging works without problems.

              As you said in your other post that you used a fresh installation, I don't have ideas about this.
              Are you local administrator on your machine? Enough memory? Enough hard disk space? Some mapped network drive?
              Did you try it on another machine?

              By the way: Eclipse 3.4.2 + WTP 3.0.4 fixes the JBoss 5.0GA bug, so that you don't need to modify eclipse any more.

              One thing I noticed in your other post: the error message is about a file "/C:/2/jboss/jboss-5.0.1.GA/server/default/tmp/5c4o12w-85n6y7-fs3t0oey-1-fs3t1h5t-9m/test_5_war.war/ ". May the directory "2" might confuse something in JBoss. Could you try to use a longer directory name which is not starting with a number?

              Wolfgang

              • 4. Re: Eclipse, Jboss 5 development and debugging
                wolfgangknauf
                • 5. Re: Eclipse, Jboss 5 development and debugging
                  ketpah

                  Thanks for the responses and help... That's great...

                  JBoss Tools is the way to go.... Now moving on :)

                  Just anybody else who may run into the same problem with me, be aware that the default Europa/Ganymede installation appear to have JBoss support, but it never works. You need to use the eclipse plugins that come with JBoss Tools.

                  btw. Wolfgang, the directory "2" appear to be no problem.

                  Thanks again,
                  - Ketpah

                  • 6. Re: Eclipse, Jboss 5 development and debugging
                    wolfgangknauf

                    Well, don't say that it does not work at all ;-).

                    Eclipse Ganymede 3.4.2 + WebToolsPlatform 3.0.4 work for me, so there must be something broken with your installation.

                    Did you try it on another machine?

                    Wolfgang

                    • 7. Re: Eclipse, Jboss 5 development and debugging
                      ketpah

                      I tried in one other machine too and got the same results.

                      Sorry I thought JBoss Tools is a must when I said that, but I believe what you say - it must also be working with WTP.

                      Anyway, I moved on with JBoss Tools, but stuck with another problem (Exception determining structure: AbstractVFSDeployment).

                      I then decided to start with JBoss 4.2.3, instead of latest 5.0. And it seems to work without much hassle.

                      4.2 also starts way faster than 5.0.

                      I decided to continue my investigation (to replace Websphere) with 4.2 and get to know Jboss more. Perhaps, then, I will be ready to upgrade to 5.0.

                      Thanks

                      • 8. Re: Eclipse, Jboss 5 development and debugging
                        fs5

                        I am running into the same problem as the OP

                        17:08:39,491 WARN [HDScanner] Failed to process changes
                        java.lang.RuntimeException: Error while adding re-deployments
                        
                        Caused by: org.jboss.deployers.spi.DeploymentException: Exception determining structure: AbstractVFSDeployment(ordersystem.ear)
                        
                        Caused by: java.lang.RuntimeException: Error determining structure: ordersystem.ear
                        
                        Caused by: org.jboss.deployers.spi.DeploymentException: Error determining structure: ordersystem.war
                        
                        Caused by: java.lang.RuntimeException: Failed to initialize ZipWrapper: /C:/Development/bin/jboss-5.0.1.GA.JDK6/server/default/tmp/3j001-m233i1-fta5jii4-1-fta5k068-9m/ordersystem.war/
                        
                        Caused by: java.io.FileNotFoundException: C:\Development\bin\jboss-5.0.1.GA.JDK6\server\default\tmp\3j001-m233i1-fta5jii4-1-fta5k068-9m (Access denied)
                        


                        The file, the deployer is looking for, is not there.

                        I will revert from 5.0.1 to 5.0.0

                        -- Frank

                        • 9. Re: Eclipse, Jboss 5 development and debugging
                          jaikiran

                          Frank,

                          Could you please provide more details about this? How do you redeploy/republish the application? Are you using an IDE? What changes do you make in the application before redeploying?

                          • 10. Re: Eclipse, Jboss 5 development and debugging
                            fs5

                            The setting is fairly simple:
                            * I downloaded JBoss 5.0.1.GA JDK6
                            * I ran it (run.bat)
                            * I let apache-ant built an EAR file that contained a WAR file with a simplistic JSF page
                            * I let ant copy that EAR file into the server/default/deploy directory
                            * the application started
                            * I rebuilt the ear (with and without changes to source files)
                            * I let ant copy that EAR file into the server/default/deploy directory one more time
                            * kabuuum, with the exceptions I posted before

                            My system is Windows Vista (Ultimate), file system is plain NTFS (no encryption, etc)

                            HTH
                            Frank

                            BTW, with JBoss AS 5.0.0.GA everything is fine.

                            • 11. Re: Eclipse, Jboss 5 development and debugging
                              alesj

                              You're probably seeing this:
                              - https://jira.jboss.org/jira/browse/JBAS-6715

                              • 12. Re: Eclipse, Jboss 5 development and debugging

                                Hi everyone,

                                Does anyone know how to decrease memory usage of JBoss AS 5.0.0.GA for development? I'm working on my laptop with just 2GB of memory, starting eclipse and testing my full j2ee app always made my world sluggish. On start-up they're 800MB each (Working Set + Private Working Set = Total Physical Memory Usage?) amounting to 1.6GB. It's very excruciating that everytime I type on my keyboard, eclipse pauses to increase its memory usage (maybe its reading its jar files)

                                Is it possible to minimize JBoss memory usage without disabling java ee services? I use JTA and EJB3.

                                • 13. Re: Eclipse, Jboss 5 development and debugging

                                  It's actually just 400MB each. I was wrong about what private and working set is all about. Still, 800MB is high for a very small java ee app development. And as I work for an hour, JBoss AS 5 reaches 600MB for and eclipse reaches like 550MB or 600MB maybe at peak.

                                  What I really hate the most is that eclipse pauses each time it loads something from the background or whenever I see eclipse reading on the background (hdisk led it lit up).

                                  • 14. Re: Eclipse, Jboss 5 development and debugging
                                    peterj

                                    anton.r, please do not hijack some else's post with an unrelated question - start a new topic instead.