• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Deployment in JBoss

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I have a difficulty in using JBoss, as this is the first time a m using JBoss.
Problem is am confused where to keep my war files in the JBoss installation folder, in case of Tomcat we place the WAR file in the webapps folder and make the context path in the server.xml .
How to do this with JBoss.
I am not using any IDE, Is JBoss used only with IDEs cant we use is like Tomcat without an IDE?
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it is just a war you are deploying, all you need to do is put in in the deploy folder for your server. e.g. %JBOSS_HOME%/server/%servername%/deploy.
 
Bharadwaj Adepu
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks!! but how/where to set the port number and context-root?
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Out the box, you will have a context that matches your war file name. e.g. myApp.war will have the context /myApp.

Ports are defined in the various JBoss configuration files. The Tomcat ports are defined in the tomcat service, so jbossweb-tomcat55.sar contains server.xml where these can be set.
 
Bharadwaj Adepu
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ports are defined in the various JBoss configuration files. The Tomcat ports are defined in the tomcat service, so jbossweb-tomcat55.sar contains server.xml where these can be set.



But i dont find any jbossweb-tomcat55.sar file in my installation directory!
Can you please tell me where can i se the ports?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For JBossAS 4.2.x, the server.xml file can be found in the server/xxx/jboss-web.deployer directory.

Please note that it always helps to state which version of JBossAS you are using - the configuration files tend to wander around and change names with each major release.
 
Bharadwaj Adepu
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Peter!! Am able to start my JBoss server now.

If it is just a war you are deploying, all you need to do is put in in the deploy folder for your server. e.g. %JBOSS_HOME%/server/%servername%/deploy.


Ive place my war file in the following location
C:\Program Files\JBoss\jboss-4.2.2.GA\server\default\deploy
But am not able to deploy it.... Suppose my war file is myApp.war then the the context root will be myApp is'nt it?
Do i need to make entry in any web.xml file?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

C:\Program Files\JBoss\jboss-4.2.2.GA\server\default\deploy



I would recommend that you move (just copy/paste) your JBoss installation to a different location which does not have a space in its path name. There have been many weird issues reported when JBoss or Java was installed in a folder having a space in its pathname.

But am not able to deploy it....



Do you see any errors? Can you post them here.

Suppose my war file is myApp.war then the the context root will be myApp is'nt it?



By default, yes.

Do i need to make entry in any web.xml file?



No.
 
Bharadwaj Adepu
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I would recommend that you move (just copy/paste) your JBoss installation to a different location which does not have a space in its path name. There have been many weird issues reported when JBoss or Java was installed in a folder having a space in its pathname.



Ive copied the JBoss installation to C:\ drive but the same problem persists!!
Ive copied the javamail.war file C:\jboss-4.2.2.GA\server\default\deploy
folder and accessing through http://localhost/javamail (no port number as ive changed the port number 8080 to 80)
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We cannot help you if you do not post the errors you are seeing. Post at least the first 30 lines of the exception stack trace.
 
Bharadwaj Adepu
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If any exception occurs i could have confirmed that the server is detecting my WAR. That is what my problem its not detecting the WAR.

HTTP Status 404 - /javamail

--------------------------------------------------------------------------------

type Status report

message /javamail

description The requested resource (/javamail) is not available.


--------------------------------------------------------------------------------

JBossWeb/2.0.1.GA


This is the thing i get!!
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This message indicates that the application wasn't deployed at javamail context. Post the logs that you see on the console when you start and deploy your application.
 
Bharadwaj Adepu
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


This is the part of the error am getting in the logs..
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error stacktrace shows that your application has not been deployed. One of the errors is the "JVM_BIND Port Already in Use". Read this to understand how that can be fixed.

The other error is this:



Error during deploy; - nested throwable: (javax.naming.NamingException: resource-ref: MySession has no valid JNDI binding. Check the jboss-web/resource-ref.)



You probably have a resource-ref entry in the web.xml but dont have a corresponding entry in jboss-web.xml.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic