6 Replies Latest reply on Nov 21, 2007 12:29 PM by rhasselbaum

    Problem controlling and deploying to JBoss AS

    rhasselbaum

      Hi!

      I'm trying to deploy an Eclipse project to JBoss AS 4.2 via the JBoss Tools 2.0 nightly build (2007-11-19). I have created a WAR file via the "Project Archives" view and the WAR file appears in the workspace.

      Now I'm trying to deploy it, so I configured and started the server, and then I right-clicked on the generated WAR and chose "Deploy to server". But nothing happens. If I right-click on the server and go to "Add and Remove projects", I can see the WAR file there under configured projects, but it doesn't appear to be deployed. I tried removing it, republishing, and even cleaning, but no luck. The server status always says "Republish".

      I don't know if this is related or not, but I'm also unable to shutdown the server. It fails with a communication error. I am guessing this is because I am using port 1299 for JNDI instead of the default 1099. With JBoss-IDE 1.6, I used to see "Stop args" or "Twiddle args" in the server launch configuration, which would let me specify a different port, but I don't see those options in JBoss Tools 2.0.

      Any help with either of these issues is greatly appreciated! Thanks!

        • 1. Re: Problem controlling and deploying to JBoss AS
          maxandersen

          I think we fixed this bug in the latest build so please try that.

          Otherwise go to jboss server view and look in the event log for any messages that might explain why it is not being deployed correctly.

          To set the various settings used when launching/stopping/stop-args right click the server and Edit launch configuration (or double click the server and click the edit launch configuration in the opened form)

          We simplified the setup in 2.x by just using the same start/stop arguments for start/stop/twiddle.

          ...but looking at the code right now there might actually be an issue about JNDI port - how did you specify this ? C

          urrently the code looks it up against the server and thus *should* be getting the current JNDI port - but it might be different depending on how you specified that jndi port. Let us know ,)

          • 2. Re: Problem controlling and deploying to JBoss AS
            maxandersen

            p.s. show us the stacktrace for the communication error - could also just be that you haven't specifed username/password ?

            • 3. Re: Problem controlling and deploying to JBoss AS
              rhasselbaum

              Thanks, Max, for replying (again)! Ah yes, I do see an error in the event log. It is saying that it failed to deploy because it couldn't copy the WAR file. And when I look at the source path in the error details, it is indeed wrong. It's looking for the file in a subfolder under "<eclipse_workspace_dir>/<project_name>". But, as you and I discussed in a different thread, my project is not rooted under the Eclipse workspace directory, and the project root directory does not equal the project name. So I wonder if this is related to the path problems in JBIDE-1325.

              I went back to the WAR archive properties and gave it the explicit filesystem path using the "Filesystem" button (instead of the "Workspace" button). But that didn't fix the problem. It's still trying to copy the WAR from the wrong directory. Should I reopen JBIDE-1325?

              Regarding shutting down the server: The communication error says "Failed to connect to server localhost:1099" so I'm pretty sure it is the port number that is wrong. I configured port 1299 by modifying the NamingService bean definition in "conf/jboss-service.xml" and "conf/jboss-minimal.xml".

              • 4. Re: Problem controlling and deploying to JBoss AS
                rhasselbaum

                BTW- I did upgrade to last night's build. No change in behavior, though.

                • 5. Re: Problem controlling and deploying to JBoss AS
                  maxandersen

                  I think you should open two new bugs.

                  One for the not copying from the right location

                  and one for the jndi and show what files you changed

                  Please ASAP then we'll look into them :)

                  • 6. Re: Problem controlling and deploying to JBoss AS
                    rhasselbaum

                    Submitted JBIDE-1349 and JBIDE-1350. Thanks.