1 2 Previous Next 16 Replies Latest reply on Jan 20, 2009 9:01 AM by Mehmet Salgar

    Seam EAR deployment problem

    speleomaniaque Newbie

      I have an interesting problem with a Seam EAR project when I try to debug from Eclipse with JBoss AS Server...

      Eclipse copies everything under \.metadata\.plugins\org.jboss.ide.eclipse.as.core\JBoss_AS_4.2.3_Server\deploy...

      Everything but application.xml under EAR\META-INF.

      When I look to the normal build folders, application is there and its content is correct... When I deploy this artifact, it deploys and starts correctly in JBoss...

      Now I don't know it is a problem caused by JBoss Tools or I am using the M2Eclipse plugin and that is somehow interfering with JBoss Tools..

      Does anybody has a similar experiance?

        • 1. Re: Seam EAR deployment problem
          Max Rydahl Andersen Master

          hmm - sounds weird.

          Does it make any difference if you change deploy to the server directly ?

          In any case please report it in jira with steps to reproduce since I haven't seen it happen (i.e. the seam apps deploys fine)

          • 2. Re: Seam EAR deployment problem
            speleomaniaque Newbie

            My problem seems interestingly similar to the problem at the thread http://www.jboss.com/index.html?module=bb&op=viewtopic&t=147702

            My project is not generated from the seamgen or from JBoss Tools Seam Wizard. I created from Wesley Hayes maven archetype and installed necessary facets in eclipse configuration (Seam Facet and Seam Settings)..

            As I said before if I build it with maven and deploy it, everything works fine...

            But if I say in the web project, debug on the server I am getting this exception that application.xml is not there and it is not really there under \.metadata\.plugins\org.jboss.ide.eclipse.as.core\JBoss_AS_4.2.3_Server\deploy...

            • 3. Re: Seam EAR deployment problem
              Max Rydahl Andersen Master

              ooh - Extremely important to know that you did not create this project with Seam WTP wizard; makes a *big* difference.

              Please test if you have problems if you use the WTP wizard so we know where to look for the problem.

              • 4. Re: Seam EAR deployment problem
                speleomaniaque Newbie

                Funny I tried to create a project with the Seam Wizard but I got this null pointer now...

                I have to say, after seeing your discussion in the other thread I updated to WTP 3.0.3 may be that is the reason...

                at org.eclipse.jst.j2ee.internal.deployables.J2EEDeployableFactory.createModuleDelegates(J2EEDeployableFactory.java:82)
                at org.eclipse.jst.j2ee.internal.deployables.J2EEDeployableFactory.createModules(J2EEDeployableFactory.java:68)
                at org.eclipse.jst.j2ee.internal.deployables.J2EEDeployableFactory.createModules(J2EEDeployableFactory.java:56)
                at org.eclipse.wst.server.core.util.ProjectModuleFactoryDelegate.cacheModules(ProjectModuleFactoryDelegate.java:59)
                at org.eclipse.wst.server.core.util.ProjectModuleFactoryDelegate.getModules(ProjectModuleFactoryDelegate.java:255)
                at org.eclipse.wst.server.core.internal.ModuleFactory.getModules(ModuleFactory.java:131)
                at org.eclipse.wst.server.core.ServerUtil.getModules(ServerUtil.java:96)
                at org.eclipse.wst.server.core.internal.ResourceManager.publishHandleProjectChange(ResourceManager.java:965)
                at org.eclipse.wst.server.core.internal.ResourceManager$ServerResourceChangeListener$1.visit(ResourceManager.java:122)
                at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:68)
                at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
                at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:48)
                at org.eclipse.wst.server.core.internal.ResourceManager$ServerResourceChangeListener.resourceChanged(ResourceManager.java:116)
                at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:288)
                at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
                at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:282)
                at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:148)
                at org.eclipse.core.internal.resources.Workspace.broadcastBuildEvent(Workspace.java:297)
                at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
                at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
                at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

                • 5. Re: Seam EAR deployment problem
                  Max Rydahl Andersen Master

                  Could you do me a favor and check if that also happens if you uninstall m2ecliipse ?

                  • 6. Re: Seam EAR deployment problem
                    speleomaniaque Newbie

                    I installed brand new Ganymede, now I can create a Seam project and run it without problem in JBoss from Eclipse....

                    I would now install m2eclipse to see it interferes with JBoss Tools...

                    But to my original problem, can anybody write something somewhere how an a Seam enabled project structure has to be run in Eclipse so I can configure the maven project as similar as possible..There are some interesting structures that I don't understand at all. When I assign the project to the JBoss Server it is also assigning the EAR/resources directory to the Server also. I have no idea how can this be manually configured.

                    Or would it be to utopic when I ask somebody from you write a maven-archetype(may be Wesley Hayes archetype can be the basis) and configure JBoss Tools to be compatible with this archetype..

                    If somebody can explain me how the project has to be structured to be run in Eclipse with JBoss Tools I would be volunteered for the creatition of the maven archetype...

                    • 7. Re: Seam EAR deployment problem
                      Max Rydahl Andersen Master

                      Good to hear you got it working on a "plain" install.
                      Let us know when it stops working (if it does)

                      About Seam enabled project structure then there is a couple of parts.

                      1) The seam wizard is based on WTP project structure but it does not have to be - but if not it won't work well in Eclipse

                      2) Seam has a couple of settings (look in .settings) for how it knows which projects is the war,ear,jar - action, model etc. These can all be the same project from the seam tooling perspective (that is how we can work with plain seam-gen projects)

                      3) we deploy the -ds.xml (not the resources directory) by doing the same as right clicking the file and click Make deployable.

                      That being said then I have zero experience with maven-archetypes and they do by their nature most likely conflict with writes from Eclipse wizards, but I think m2eclipse have found a way around that - but I do not know the details.

                      I also know that m2eclipse have done work to make maven projects usable from eclipse WTP so whatever work they have done there you should be able to reuse.

                      If you take on the challenge then let us know and i'll be glad to help out/incorporate it if at all possible. But as said, i'm a maven archetype noob...hope you can use the above to start ?

                      • 8. Re: Seam EAR deployment problem
                        Miguel Cohnen Newbie

                        Hi! I have been trying to achieve exactly the same! Just sent you an email, so if I can help (we can make this together), just let me know how!

                        • 9. Re: Seam EAR deployment problem
                          Max Rydahl Andersen Master

                          fyi - Snjezana have been experimenting with this too. If you use Help > Project Examples and select the Seam Booking Example (Mavenized) and uses a recent m2eclipse it would be great to hear how well that works for you.

                          • 10. Re: Seam EAR deployment problem
                            Mehmet Salgar Novice

                            Hi Max,

                            I configured Eclipse configuration for Debuging m2eclipse plugins and the plugins from JBoss Tools...

                            But what I am strugling at the moment to find understandable documentation over WTP for Adopters....

                            Considering your experiance in WTP for extending can you or one of your team member can point me to some documentation to let me understand the internals of the WTP...

                            Some activity, class diagrams would be perfect...

                            • 11. Re: Seam EAR deployment problem
                              Max Rydahl Andersen Master

                              I don't know of any central activity/class diagrams for WTP. I learned from the source code and usages of it (Eclipse got good tools for that ;)

                              And otherwise google and eclipse.org with its wiki and newsgroup search is your friend.

                              • 13. Re: Seam EAR deployment problem
                                Max Rydahl Andersen Master

                                Not sure if there is any other way to learn how a piece of software really works ;)

                                • 14. Re: Seam EAR deployment problem
                                  Mehmet Salgar Novice

                                  A good sequence, class and activity diagram can really help :)

                                  1 2 Previous Next