-
1. Re: Jboss connection error please help?
madhusudhanraju_26 Aug 10, 2013 8:35 AM (in response to msghasan)Which version of JBoss AS you are using?
-
2. Re: Jboss connection error please help?
msghasan Aug 12, 2013 1:13 AM (in response to madhusudhanraju_26)I am using jboss 6
-
3. Re: Jboss connection error please help?
madhusudhanraju_26 Aug 12, 2013 3:52 AM (in response to msghasan)You cannot use *-ds.xml file in JBoss 6
For Configuring JDBC driver and datasource follow the below steps:
Step 1: Deploy your jdbc driver (postgresql-9.1-902.jdbc4.jar) under JBoss_6_Home\modules\org\postgresql\main directory (if such directory doesn't exists create one)
Step 2: P
<module xmlns="urn:jboss:module:1.1" name="org.postgresql">
<resources>
<resource-root path="postgresql-9.1-902.jdbc4.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>Step 3: Configure your datasource standalone.xml
Find the datasource tag in the standalone.xml file and configure as
<datasources>
<datasource jndi-name="java:jboss/PostgresDS" pool-name="PostgresDS">
<connection-url>jdbc:postgresql://localhost:5432/postgresdb</connection-url>
<driver>postgresql</driver>
<security>
<user-name>admin</user-nam e>
<password>admin</password>
</security>
<validation>
<valid-connection-checker classname="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker"></valid-connection-checker>
<exception-sorter classname="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter">
</exception-sorter>
</validation>
</datasource>
<drivers>
<driver name="postgresql" module="org.postgresql">
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>Replace connection url according to your application, the above procedure might work...
Regards,
Madhu
-
4. Re: Jboss connection error please help?
msghasan Aug 16, 2013 2:40 AM (in response to madhusudhanraju_26)I understand what you say but currently I am able to connect to my database from my application. and also i will try what you say.
-
5. Re: Jboss connection error please help?
joep.vaes Mar 20, 2014 3:42 AM (in response to msghasan)Hi Maimur, we have had the same issue twice yesterday, using jboss 6.1. Do you happen to have a solution/reason for the issue?
Regards,
Joep Vaes