• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

set a data source in domain mode in JBoss AS7

 
Ranch Hand
Posts: 352
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have successfully deploy the mysql driver jar and the project war file in standalone mode in jboss AS 7 and connect to the data base through data source.

Then i start the server in domain mode and deploy the connector jar and war file and assign them to server group also. But when i run the application I am getting a null pointer when fetching the connection. The data source has not initialize and it cause the null pointer to be thrown in datasource.getConnection()

Is there any additional configuration missing here in domain mode which is not in the standalone mood.

Do we need to set a xa-datasource in domain mood for jboss? In standalone i didn't not set it though
 
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
Please post the relevant code and the entire exception stacktrace that you are seeing. Which exact version of JBoss AS7 is this?

 
Harshana Dias
Ranch Hand
Posts: 352
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jaikiran Pai wrote:Please post the relevant code and the entire exception stacktrace that you are seeing. Which exact version of JBoss AS7 is this?



Its JBoss 7.1.1. I have log in to web admin console and set a data source from there in domain mode. That i set via Profile tab (Profiles->Connector->Datasource.)

But when i clicked on Runtime tab i don't see the data source i created there. It only shows the default data source under data source metrics.

The data source i create under runtime tab should come to there right? (It shows in standalone mood )

Below is the exception i am getting starting from javax.naming.NameNotFoundException






Also i have notice the server hits the server 1 which is the default server jboss selects. The data source also applied to the main server group which the server 1 also belongs.
 
Harshana Dias
Ranch Hand
Posts: 352
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also when the server start i notice a warning saying,

 
Harshana Dias
Ranch Hand
Posts: 352
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
blank
 
reply
    Bookmark Topic Watch Topic
  • New Topic