This evening I successfully re-deployed my application to JBoss-4.0.0. It used to be deployed under JBoss 3.2.4 using the Lomboz plug-in. Although the JBoss-IDE plug-in involves a bit more labour as compared to the Lomboz plug-in, the former requires a better understanding of the deployment process, which is always good to have!
So what are the required steps?
- Build a WAR file.
- Build an EJB jar file.
- Pack the archives in an EAR file, together with a
- Deploy your application!
A more detailed recipe is listed below.
The packaging configuration tool of the JBoss-IDE plug-in for Eclipse is invoked by right-clicking on the project and selecting “properties” from the pop-up menu. Now choose “Packaging configurations”.
Create a new WAR archive by right-clicking once more in the right most pane and selecting “Add Std. Archive” from the pop-up menu. Choose “Standard-WAR.war” and add your files to the WAR archive. In my case, working with Struts, I had to import the
index.jsp and the other JSP pages of course.
Remarkably, the container asked me to include
tiles-defs.xml as well, although I don’t use it. After including it seemed to be satisfied though 😉
Create a new EJB JAR archive by right-clicking in the right most pane and selecting “Add Std. Archive” from the pop-up menu. Choose “Standard-EJB.jar” and add your files to the EJB JAR archive. In my case, the EJB related binaries are compiled in the project’s
/bin directory. You also need to include
META-INF/ejb.xml. The latter three files need to go to the
META-INF subdirectory in the JAR archive.
Create a new EAR JAR archive by right-clicking in the right most pane and selecting “Add Std. Archive” from the pop-up menu. Choose “Standard-EAR.jar” and add your files to the EAR JAR archive. Now by right-clicking on the EAR archive, you can add your EJB JAR and WAR archive by importing them as files. This took me some time to figure out. Moreover, you have to add a
Manifest-Version: 1.0 Created-By: 1.4.0-rc (Sun Microsystems Inc.) Class-Path: Standard-EJB.jar
<application> <display-name>BibTeXML demo<display-name> <module> <web> <web-uri>Standard-WAR.war<web-uri> <context-root>bibtexml<context-root> <web> <module> <module> <ejb>Standard-EJB.jar<ejb> <module> <application>
Go back to your project explorer, right-click one more on the project and choose “run packaging” from the popup-menu. You’ll notice that a file called
packaging-build.xml is added to your project, as well as the WAR and EAR archives.
Start your JBoss-4.0.0 application server in case you didn’t do it already.
Now you can right-click on the EAR and choose “deploy to”. A pop-up menu will ask you were to deploy it to. Choose the “default” configuration and your application will be deployed, and if all went well, will be deployed successfully 🙂
12 thoughts on “Deployment under JBoss-4.0.0 with Eclipse's JBoss-IDE plugin”
Warning, everyone. These instructions do not work for Eclipse 3.2 and JBoss-IDE 1.6.0. They are not compatible and one of the features that fails is the packager. I have wasted several hours on this, and wanted to save others the grief. I guess you can try the alpha release of JBoss-IDE 2.0, or just use an ant script for packaging.
Thanks for the very clear instructions, though!
I have eclipse 3.1 with Flex plug in and Tomcat Server.Do anyone know how to deploy the mxml files on a Tomcat server.I read somethink about it and all I understood was that I have to deploy the projects as war files. I tried but my projects did not work.Acctualy I do not know if I made the war files corectly.So my question is: Is it ZIP file and WAR file same thing with different extention?
Can you please send me he steps to deploy web application which is devloped using struts+jboss+mysql. It would be great if you can send me the detailed steps for the deployment + package hierarchy
Hi folks, i just wants to say that i would apreciate if some one can get us some informations or a kind of howto (remote deployment ) thanks in advence!
It will helpful for ant Script users.
I need help regarding making WAR files with JBoss-IDE
Ad 1. Of course, when your packaging is taken care of by an Ant script, you don’t need the packaging facilities offered by the JBoss plug-in. As a matter of fact, I prefer using Maven myself now instead (I used it at that time because I did not find/make the time to implement an Ant script).
Ad 2. I don’t have any experiences with remote JBoss deployment (yet), can anyone else comment on this?
1> I have an ant file to create jar, war and ear file. Do I still need to run packaging?
2> How do I deploy on a remote server?
this will usefull from me to deplyee my project on jboss
I did use the “default” server flavor though! It seems like something else is the cause of your problems. Maybe you’re making use of a service not present/activated in the default configuration of JBoss??
It seams that you can’t use the “default” server flavor, as you get errors from missing AOP libraries when deploying servlets. Use “standard” or “all” instead.
You are completey right! I now see that I never really cleaned my struts-config.xml from elements I don’t use. Somehow it never bothered before… Thanks!
Does your struts-config.xml have an entry for the tiles-plugin ?
Comments are closed.