1 2 Previous Next 27 Replies Latest reply on Apr 14, 2008 5:01 PM by patpirtle

    Deploying Seam (Servers and Runtimes)

    patpirtle

      I'm sure this is very simple, but I just can't get my seam project deployed. I've tried creating different servers, and different runtimes, and trying to deploy the project to an external jboss installation on my local disk. But everytime I try and deploy it, it tries to launch another instance of jboss within Eclipse. But I don't want jboss running in eclipse. It is running outside of eclilpse, and I just want my project deployed there. I have provided the location of the jboss installation everywhere I can think of. I just can't get it to work.

      Also, since I have created all these unnecessary servers and runtimes, is there any way to easily delete them? There seem to be many locations within eclipse where these are referenced, so it's making it hard for me to manage what's going on.

      If somebody has a simple step-by-step on how to get this to work I would appreciate it. I've been through a lot of documentation, but nothing I try seems to work. Thanks.

        • 1. Re: Deploying Seam (Servers and Runtimes)
          patpirtle

          Also, to give an idea where I am coming from, I have been building and deploying my projects with MyEclipse before now. But because JBoss Tools and MyEclipse don't play well together, and MyEclipse doesn't yet support Seam, I am trying JBoss Tools for the first time. And it's the first time I've tried building and deploying projects without MyEclipse. So this may explain some of my confusion.

          • 2. Re: Deploying Seam (Servers and Runtimes)
            maxandersen

            If you don't want it to control the server then use the Deploy Only Server/runtime.

            • 3. Re: Deploying Seam (Servers and Runtimes)
              patpirtle

              Thanks. Unfortunately I can't get that to work. I've tried that, using the deploy only server and runtime, but when I try and deploy it, nothing happens. Nothing gets copied over. The project seems to build fine. Just doesn't get copied.

              I'm sure it's something simple I'm overlooking. I'll try and describe what I'm doing. I created a new Seam Web Project, which created 4 separate project folders. One folder is the main folder, then the ear, ejb, and test folder. Under the main folder, I right-clicked and opened Properties. I then selected the deploy only server and deploy only runtime. The deploy only server was created to point to the deployment directory of my local jboss installation.

              I then did a "Run as"/"Run on Server" on the main project. But nothing gets copied over. I checked the deployment directory on the local disk, and nothing new is there. I've double-checked the directory to make sure it is actually the deployment directory.

              I know it's something silly, but I just can't seem to see what it is. Any help would be appreciated. Thanks.

              • 4. Re: Deploying Seam (Servers and Runtimes)
                patpirtle

                I'm really having problems getting this basic application to work. I think I kinda got it to copy over. I think. What I did was just changed something in the application and saved it then rebuilt. That copied the files over (although I would prefer that it let me do it manually).

                However, now I get a server error:
                org.jboss.deployment.DeploymentException: No META-INF/application.xml found

                I looked at was copied over, and it is a folder MyProject-ear.ear. I looked in the folder and there is another folder, MyProject-ejb.jar. And under that folder is the directory structure of the class I modified to get it to rebuild and copied over. There is nothing else in the folder. So something obviously is not being built correctly.

                Other than creating a bunch of new servers and runtimes (which I still don't know how to delete), I pretty much just took the new Seam Project as-is, and didn't change anything, other than adding 2 Java classes to it. But the build and copy obviously isn't working. Any ideas? Thanks.

                • 5. Re: Deploying Seam (Servers and Runtimes)
                  maxandersen

                  hmmm....seems you struck a bug in the deploy only server.

                  Which version are you using exactly ?

                  If you don't want automatic publishing go to the server, double click it and toggle the automatic publishing button.

                  • 6. Re: Deploying Seam (Servers and Runtimes)
                    patpirtle

                    I am using JBoss Tools 2.0.1 and Eclipse 3.3.2 (J2EE version) and Seam 2.0.1. Is this what you are asking?

                    • 7. Re: Deploying Seam (Servers and Runtimes)
                      maxandersen

                      Yes.

                      Could you please try with Eclipse 3.3.1 J2EE version since we know there is a deployment bug in Eclipse 3.3.2 that affects us...but not sure if that is what hits you.

                      And in any case please file a jira for this one if it still fails on 3.3.1

                      • 8. Re: Deploying Seam (Servers and Runtimes)
                        patpirtle

                        Just to see what happens, I deleted the old project and started over (again in 3.3.2). This time more of the project was deployed when initially created (it did it automatically). But there are still things missing. I get the following error.

                        12:25:32,406 ERROR [MainDeployer] Could not initialise deployment: file:/C:/Documents and Settings/Pat/My Documents/jboss-4.2.0.GA/server/default/deploy/MyTest-ear.ear/org.jboss.deployment.DeploymentException: url file:/C:/Documents and Settings/Pat/My Documents/jboss-4.2.0.GA/server/default/deploy/MyTest-ear
                        .ear/MyTest-ejb.jar could not be opened, does it exist?

                        So it looks like on initial deployment, it doesn't copy over the jar file. If I change a file and rebuild, nothing gets copied over at all. If I manually delete everything from the JBoss server, then I get the behavior I got before. Only the file I changed gets copied over, not the whole project.

                        I am going to try it on 3.3.1 next.

                        • 9. Re: Deploying Seam (Servers and Runtimes)
                          patpirtle

                          I could not locate the J2EE version of 3.3.1.1 Eclipse. I did find the standard 3.3.1.1 download. I tried that, but the Seam tools do not show up. I assume it is because it is not the J2EE version? I don't know.

                          Do you happen to have a link to the J2EE download for version 3.3.1.1 of Eclipse? I couldn't find it. Or do you know what plugins I may have to install to the standard release to "recreate" the J2EE version?

                          I'm obviously getting very frustrated. All I wanted to do was create a Seam project (with no extra code yet) and deploy it to Jboss. That's it. I've been fighting with the tools for over 2 days to try and do this. It seems like I must be doing something wrong, because I can't believe it is this hard. I figured it would just be something like "Create Seam Project". Then "Deploy". Then I could start adding my code to it. But I just can't seem to figure out what it is that I'm doing wrong.

                          Please post a link to the J2EE eclipse 3.3.1.1 if you have it or a list of plugins I need to get 3.3.1.1 workable with JBoss tools. Or if you can see what I'm doing wrong. That would be very helpful. Sorry for the rant. I'm just very tired and very frustrated right now. Thanks.

                          • 10. Re: Deploying Seam (Servers and Runtimes)
                            rob.stryker

                            The deploy only server uses the exact same deployment logic as all the others. THe only difference is that it doesn't suspend the server's deployment scanner before scanning because it is not designed to do so.

                            I am unable to reproduce this at all. Could you maybe get a zip of an example workspace up somewhere so I can test?

                            • 11. Re: Deploying Seam (Servers and Runtimes)
                              patpirtle

                              Just sent you an e-mail Rob.

                              • 12. Re: Deploying Seam (Servers and Runtimes)
                                maxandersen

                                Hi redbird,

                                Sorry to hear you are having such a hard time deploying, that is definitly not the intention nor what we normally hear users having problems with.

                                Eclipse WTP 2.0.1 is available here http://download.eclipse.org/webtools/downloads/drops/R2.0/R-2.0.1-20070926042742/ if you want to give it a try.

                                But the more I think of it I believe you are bumping into some kind of bug for the deploy only server that we still need to identify.

                                Before you leave screaming away could you at least try the "normal" AS adapter provided from Red Hat to see if they work as expected for you ?

                                Yes, these will start and stop the server for you but just to check what we are dealing with here...e.g. if that also fails for you there is some special condition in your setup that we need to figure out what is causing it and if it does not fail we know it must be something in the deploy only server.

                                • 13. Re: Deploying Seam (Servers and Runtimes)
                                  patpirtle

                                  Thanks Max. I was just frustrated yesterday. I'm sure it's something very simple, I just can't see it for whatever reason.

                                  I did try to run it in Eclipse, and I got the same error. So I obviously have some problem with my environment. I just don't know what. Here is the error.

                                  08:56:33,406 ERROR [MainDeployer] Could not initialise deployment: file:/C:/Documents and Settings/Pat/My Documents/jboss-4.2.0.GA/server/default/deploy/MySeamProject-ear.ear/
                                  org.jboss.deployment.DeploymentException: url file:/C:/Documents and Settings/Pat/My Documents/jboss-4.2.0.GA/server/default/deploy/MySeamProject-ear.ear/jboss-seam.jar could not be opened, does it exist?
                                  at org.jboss.deployment.DeploymentInfo.(DeploymentInfo.java:214)
                                  at org.jboss.deployment.EARDeployer.init(EARDeployer.java:288)
                                  at org.jboss.deployment.MainDeployer.init(MainDeployer.java:872)
                                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
                                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                                  at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                  at java.lang.reflect.Method.invoke(Method.java:597)
                                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                                  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                                  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                                  at $Proxy9.deploy(Unknown Source)
                                  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                                  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
                                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                                  at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
                                  at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                                  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                                  at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                  at java.lang.reflect.Method.invoke(Method.java:597)
                                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                                  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                                  at $Proxy0.start(Unknown Source)
                                  at org.jboss.system.ServiceController.start(ServiceController.java:417)
                                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                  at java.lang.reflect.Method.invoke(Method.java:597)
                                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                                  at $Proxy4.start(Unknown Source)
                                  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
                                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                  at java.lang.reflect.Method.invoke(Method.java:597)
                                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                                  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                                  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                                  at $Proxy5.deploy(Unknown Source)
                                  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                                  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                                  at org.jboss.Main.boot(Main.java:200)
                                  at org.jboss.Main$1.run(Main.java:508)
                                  at java.lang.Thread.run(Thread.java:619)
                                  08:56:33,406 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

                                  --- Incompletely deployed packages ---
                                  org.jboss.deployment.DeploymentInfo@6be13196 { url=file:/C:/Documents and Settings/Pat/My Documents/jboss-4.2.0.GA/server/default/deploy/MySeamProject-ear.ear/ }
                                  deployer: org.jboss.deployment.EARDeployer@831a91
                                  status: null
                                  state: FAILED
                                  watch: file:/C:/Documents and Settings/Pat/My Documents/jboss-4.2.0.GA/server/default/deploy/MySeamProject-ear.ear/META-INF/application.xml
                                  altDD: null
                                  lastDeployed: 1207922193406
                                  lastModified: 1207922136812
                                  mbeans:


                                  Thanks for you help.

                                  • 14. Re: Deploying Seam (Servers and Runtimes)
                                    patpirtle

                                    Okay, I found a similar issue here. I think this is what you were referring to earlier about WTP.
                                    http://www.seamframework.org/Community/CantDeploySeamProjectAfterUpgrading

                                    This solution says to use WTP 2.0.2, instead of 2.0.1. Would you recommend I try and install 2.0.2?

                                    1 2 Previous Next