14 Replies Latest reply on Nov 26, 2006 4:34 PM by Richard Leherpeur

    Using seam-gen with JBoss IDE (Eclipse), where are all the .

    Ning Zhao Apprentice

      I was trying out the seam-gen with the latest JBoss IDE. After finished the command line tasks, used Eclipse's new --> java project --> myproject at the correct place. Then Eclipse automatically builded, exploded, everything looked perfect. However the project doesn't work properly. After a careful check of all the configurations and .xhtml files, I am sure the problem is not there. However, where are all the compiled .class files gone? I did write some sample java files to test, very weird thing is: I cannot find the compiled output anymore.

      Any hint would be highly appreciated!


      Regards,
      Ellen

        • 1. Re: Using seam-gen with JBoss IDE (Eclipse), where are all t
          Ning Zhao Apprentice

          Got it. The

          unless="eclipse.running"
          


          in the seam-gen generated build.xml is blocking all the compilation. Just remove it and everything works. :-)


          • 2. Re: Using seam-gen with JBoss IDE (Eclipse), where are all t
            Gavin King Master

            The idea is that eclipse compiles the java for you, when it is running. As long as eclipse correctly detects your src folder, you should not need to change that.

            • 3. Re: Using seam-gen with JBoss IDE (Eclipse), where are all t
              Ning Zhao Apprentice

              Yes my src folder was correctly recoginzed. The problem was that I always disable the "Build Automatically" on eclipse for its better performance and. Then, when I manually issue a "build project" command from the menu, the build.xml in the seam-gen generated file would simply short circuit the compilation of the java files, and it even didn't signal me that some automatic compilation was assumed.....Maybe it is that my eclipse was a bit odd, since it is still a beta production (JBoss IDE for Eclipse 2.0.0 beta 2).

              I also changed the

              nowarn="on"
              to
              nowarn="off"
              .

              • 4. Re: Using seam-gen with JBoss IDE (Eclipse), where are all t
                Gavin King Master

                Sounds more like you have *completely* disabled the Eclipse Java Builder.

                • 5. Re: Using seam-gen with JBoss IDE (Eclipse), where are all t
                  Gavin King Master

                  My apologies. You are correct, there is a bug in the generated build:

                  http://jira.jboss.com/jira/browse/JBSEAM-523

                  The clean target should look like this:

                  <target name="clean" description="Cleans up the build directory">
                   <delete dir="${dist.dir}" />
                   <delete dir="${test.dir}" />
                   <delete dir="${ear.dir}" />
                   <delete dir="${war.dir}" />
                   <delete>
                   <fileset dir="${jar.dir}">
                   <exclude name="**/*.class" if="eclipse.running"/>
                   </fileset>
                   </delete>
                   </target>



                  • 6. Re: Using seam-gen with JBoss IDE (Eclipse), where are all t
                    Ning Zhao Apprentice

                    Thank you for the fix! :-)

                    • 7. Re: Using seam-gen with JBoss IDE (Eclipse), where are all t
                      Richard Leherpeur Novice

                      Hi Ellen,

                      This is off Seam topic, but since you mentioned using the lastest JBoss IDE, I would like to know if you encountered any problem yet.
                      I was thinking about giving it a try, so I'm interested to know about what you think.

                      Thanks,

                      Richard

                      • 8. Re: Using seam-gen with JBoss IDE (Eclipse), where are all t
                        Ning Zhao Apprentice

                        Hi Richard,

                        a common problem of almost all modern java IDE is, they consume a lot of system resource. I encountered OutOfMemoryException on both stack and heap pretty often using default start up configuration. This problem is magnified when there are plugins. So first off, the JBoss IDE does consume more system resource than a plain Eclipse. Make sure the memory is big enough in your box. With <= 512MB memory you'll probably spend more time on waiting for the IDE to respond than actual programming. (I have 1.5G in one box and 2G in another) For exclipse based IDEs, a workaround is adding arguments like this on startup:

                        -vmargs -Xms128M -Xmx256M -XX:PermSize=128M -XX:MaxPermSize=256M
                        


                        Second, it is better to use the all-in-one bundle from jboss than first installing the bare Eclipse SDK then adding the JBoss features as plugin. The latter option might bring up some plugin management problems. Especially after running an update for the Eclipse, some JBoss features, for example the server synchronization (I consider a very important feature) was automatically disabled by Eclipse update and I failed to bring it back after hours of tweaking the configurations for the different plugins. When there was incompatible plugins, the really messy cyclic dependencies even prevented me from unstalling anything. So I tried out the all-in-one bundle from Jboss then things worked again.

                        The JBoss IDE offers free tools for Hibernate, visual Jbpm and things alike. I would like to have a feature which validates Seam objects. Hopefully it would be available in the future. But then, more memory would be needed....

                        Whether to use JBoss IDE or not also depends on what do you develop. My boss wanted a jbpm showcase application with graphical diagrams so I'm using this IDE. The hibernate tools are nice and frequently used by others too. If your daily work is more about handling web presentations especially jsf- or struts-centric, there might be better alternative which is more visual or consumes less system resources. If you go for WYSIWYH visual tools, on the Eclipse platform there are myeclipse, exadel studio and others. NetBeans has some visual things out of box, recently they have visual bpel and visual page-flow thing. IDEA 6 occupied approximately 60mb memory at startup without any plugin. That was remarkable but after plugins like database browser installed, the performance decreased significantly. What bothered me most is, IDEA 6 isn't really Debian-friendly. It was not quite responsive and crashed every 30 min on my Linux box (2G memory). NetBeans has the best performance on Linux among the three and very stable. Emacs/JEdit + Ant has the ultimate performance but when the project goes large and/or the there are a lot of configuration files, the OutOfMemoryException would occur in _my_ brain instead. :D






                        • 9. Re: Using seam-gen with JBoss IDE (Eclipse), where are all t
                          Richard Leherpeur Novice

                          I realized I forgot to mentioned that I was already using JBoss IDE 1.6, and was thinking about switching to 2.0 (but being a beta version and knowing that 1.6 wasn't fully compatible with all the JBoss features, I was wondering if I should do the move yet).
                          I'll give it a try and will use your workaround arguments
                          I also didn't realized that the bundles IDE was performing better. I always installed the IDE on top of Eclipse!
                          So hopefully things will even run faster than it does now (I agree that it is sometime a little bit slow, especially when you work on a large project).

                          Thanks for the help.

                          Richard

                          • 10. Re: Using seam-gen with JBoss IDE (Eclipse), where are all t
                            Richard Leherpeur Novice

                            Hi Ellen,

                            So I downloaded the beta version and everything seemed fine until I tried to run the server (in debug mode or not). The server and the webapp seem to start fine from what I see in the console, but the web app is not reachable from the browser...
                            Did you run into anything like this?
                            Which version of the JVM did you install?
                            I'm running the jdk1.5.0_09.

                            Richard

                            • 11. Re: Using seam-gen with JBoss IDE (Eclipse), where are all t
                              Ning Zhao Apprentice

                              No I haven't had this problem. I'm using Sun's Java VM version 6.0 beta. (the latest beta from Sun's site). But it doesn't look like VM's problem. Is the context root on your browser right (Matches the context root in your application.xml)?

                              • 12. Re: Using seam-gen with JBoss IDE (Eclipse), where are all t
                                Richard Leherpeur Novice

                                I think something goes wrong at one point. The CPU usage stays close to 100% even after the server is done starting. I'll investigate and try to find out what's going on. Maybe some options is not setup properly...

                                • 13. Re: Using seam-gen with JBoss IDE (Eclipse), where are all t
                                  Ning Zhao Apprentice

                                  if you installed the 190mb all-in-one JBoss-IDE (the eclipse SDK is also included in that bundle). The server should be setup this way:

                                  File --> new --> Other --> server --> next.

                                  At this point you'll see two JBoss categories in the list. One is JBoss and the other is JBoss Inc. You should choose the JBoss Inc folder and then choose the JBoss AS 4.0. Then just give it a name (whatever will do, mine is called athena) and the runtime directory, which is where your JBoss 4.0.5 server is installed.

                                  Does that help?

                                  • 14. Re: Using seam-gen with JBoss IDE (Eclipse), where are all t
                                    Richard Leherpeur Novice

                                    So I reinstalled the all-in-one bundled and set up the project again.
                                    I think I must have done something wrong configuring the project earlier, but I don't know why :)
                                    Now everything work great.

                                    Thanks