• 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

Trying to deploy a war file with datasources to JBoss

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to deploy a war file that connects to a database to Jboss an failing miserably.

Is there any good step by step guide in setting up a datasource for a war file in Jboss.

Like tomcat you have the web.xml application-context if you are setting the datasource inside the paa and the context.xml if setting it up in tomcat.

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you have to put the configuration in oracle-ds.xml. under <datasources>

 
Mark Tobin
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
or mssql-ds.xml under C:\jboss\server\default\deploy then add my war file to C:\jboss\server\default\deploy\jboss-web.deployer.

To tell the truth I dont think its a datasource problem.

I have a war file I can deploy an run on tomcat, well I have to run it on JBoss and I am getting lots of interesting unhelpful error messages.


I have added a empty jboss-web.xml under my WEB-INF I have a application-Contect-persistent.xml set up under WEB-INF. I have another JBoss problem I am going to raise
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Mkunal badgujar
 
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
Besides placing the *-ds.xml file for your datasource in the deploy directory, there are some settings you will need in web.xml and jboss-web.xml. Here is a post I did a while ago that lists the specifics:
http://community.jboss.org/message/251298#251298

Oh, I should mention that the instructions in the above link are is you want to use the java:comp/env context. If you don't want to use that context, then the JNDI name you use for lookup is "java:xxx" where xxx is the <jndi-name> value in *-ds.xml.
 
Mark Tobin
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Peter will give that a try.
 
reply
    Bookmark Topic Watch Topic
  • New Topic