12 Replies Latest reply on Mar 4, 2010 7:46 PM by dgolovin

    Editing the JBoss AS Configuration

    akhilachuthan

      Im using Jboss AS tools with eclipse for jboss5.1 configuration...

      Im in need of using my own setup for server startup like

      1. Having a few of my custom jars also for server startup.
      2. Define custom configuration folder instead of the defaults like 'all', 'default', 'minimal' etc... I mean my custom server setup has a configuration folder separate and do not the defaults.


      Where do i define these configurations. With the default jboss available with eclipse i used to configure the .serverdef file for the jboss server version to get these things done..

        • 1. Re: Editing the JBoss AS Configuration
          maxandersen

          1) custom jars - right click the server and edit the launch configuration

          2) use a custom configuration ? Edit the associated runtime or specify it when creating a new server.

          • 2. Re: Editing the JBoss AS Configuration
            akhilachuthan

            jumped into a new problem now.. i see that when selecting the home directory for the JBoss AS, the tool is checking out for the existence of the file 'server/conf/jboss-service.xml' under the server directory.
            I copied this manually, but now when i select my application jboss home as the Home Directory, i get the error 'The home directory does not exist or is missing the run.jar'..

            I do have the run.jar in my bin folder within my applications jboss home.. What could be wrong here??? What is eclipse searching for over here...

            Is this the expected working or is it something wired...

            • 3. Re: Editing the JBoss AS Configuration
              akhilachuthan

              I got it.. It was looking for Twiddle.jar in the bin directory....

              • 4. Re: Editing the JBoss AS Configuration
                tothc

                Hi akhil achuthan,

                 

                Can you describe what did you modify to let the Eclipse accept the JBoss?

                I'm using Ganymede, JBoss 5.1.

                I'm stuck in the "New Server Runtime Environment" dialog, it says "The home directory does not exist or missing the run.jar".

                 

                Now. The JBOSS_HOME/bin indeed has the run jar, and also the twiddle.jar you mentioned. Should I copy these to elsewhere? Also JBOSS_HOME/server/default/conf has the jboss-service.xml.

                 

                Please somebody help me.
                • 5. Re: Editing the JBoss AS Configuration
                  dgolovin

                  It checks ${JBossASRoot}/bin/twiddle.jar and use "META-INF/MANIFEST.MF" entry to get "Specification-Version" attribute from manifest.

                  Where ${JBossASRoot} is a installation root folder of JBoss AS.

                  • 6. Re: Editing the JBoss AS Configuration
                    tothc

                    Thanks for the quick reply Denis,

                     

                    The twiddle.jar is there in ${JBossASRoot}/bin, and if I look into it, the MANIFEST.MF contains "5.1.0.GA" as Specification-Version. Then what does Eclipse do with this info? The dialog still displays the error message about the run.jar.

                    I don't have ${JBossASRoot}/server/conf directory, but instead I have ${JBossASRoot}/server/default/conf.

                     

                    BTW, this dialog is a page in the New Server Wizard. The previous page of the wizard is the "Define a New Server" dialog, Where I selected "JBoss AS 5.1" as the server type. Maybe I need some special type configuration for 5.1.0.GA?

                     

                    What should I do?

                    • 7. Re: Editing the JBoss AS Configuration
                      tothc

                      Additional information: the server is running porperly, I went through several tutorials, I can see the server's information page, and also I saw the admin console. Should the server run, while I'm adding it? I guess so.

                      I have extreme difficulty to get Maven + m2eclipse + JBoss + JBoss Tools + JBossWS to get together. Maven is not in the picture with this issue though.

                      • 8. Re: Editing the JBoss AS Configuration
                        dgolovin

                        Could you tell me your JBossTools version?

                         

                        I was wrong about twiddle.jar, it is looking for  JBOSS_HOME/bin/run.jar as I can see in trunk version

                         

                             protected boolean isHomeValid() {
                                  if( homeDir == null  || !(new File(homeDir).exists())) return false;
                                  return new Path(homeDir).append("bin").append("run.jar").toFile().exists(); //$NON-NLS-1$ //$NON-NLS-2$
                             }
                        

                         

                        Do you have JBOSS_HOME/bin/run.jar?

                        • 9. Re: Editing the JBoss AS Configuration
                          dgolovin

                          You don't need to have server started to configure runtime and server instance in Eclipse.

                          • 10. Re: Editing the JBoss AS Configuration
                            dgolovin

                            Be aware that there are three categories for JBoss servers in rNew Server Runtime dialog:

                            1. JBoss comes from WTP

                            2. JBoss Community comes comes from JBossTools

                            3. JBoss Enterprise Middlware comes from JBossTools

                             

                            I'm taking about second category. I just want to be sure you're using "JBoss Community/JBoss 5.1 Runtime" when you get mentioned error.

                            • 11. Re: Editing the JBoss AS Configuration
                              tothc

                              I think I solved it, my bad.

                               

                              So there are two places where we should select directories on the JBoss Runtime dialog.

                              The first directory is the home directory. Should be set to JBOSS_HOME. I think I didn't set this properly before, that was the problem.

                              The second direcotry is for configuration. Select the JBOSS_HOME/server directory. Then the you'll see the configs, like: all, default, minimal, standard, etc.

                               

                              I downloaded the Community edition JBoss

                              • 12. Re: Editing the JBoss AS Configuration
                                dgolovin
                                It seems to me you did find the problem Because I think JBoss AS runtime wizard should not have default walue for "Home Directory". It is what baffled you.