File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes set a data source in domain mode in JBoss AS7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "set a data source in domain mode in JBoss AS7" Watch "set a data source in domain mode in JBoss AS7" New topic
Author

set a data source in domain mode in JBoss AS7

Harshana Dias
Ranch Hand

Joined: Jun 11, 2007
Posts: 327
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
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9336
    
110

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



[My Blog] [JavaRanch Journal]
Harshana Dias
Ranch Hand

Joined: Jun 11, 2007
Posts: 327
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

Joined: Jun 11, 2007
Posts: 327
Also when the server start i notice a warning saying,

Harshana Dias
Ranch Hand

Joined: Jun 11, 2007
Posts: 327
blank
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: set a data source in domain mode in JBoss AS7
 
Similar Threads
InstanceAlreadyExistsException when deploying multiple versions of the same persistence unit
How to deploy open cms on jboss as 7
Exception in deploying axis2.war in JBoss4.05
Error while redeploying application to JBoss
Error while deplloying the application on JBoss.