Problem configuring datasource in JBoss AS 7
marcos_aps Jul 19, 2011 7:06 AMHello, everybody!
I'm having problems trying to configure a datasource in JBoss AS 7. I did this:
1. Copied the JDBC driver file (postgresql-9.0-801.jdbc4.jar) to "JBOSS_HOME/standalone/deployments" directory.
2. Added the following datasource element to the "JBOSS_HOME/standalone/configuration/standalone.xml" file:
<datasource jndi-name="java:jboss/datasources/SCDH_DS" pool-name="SCDH_DS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>
jdbc:postgresql://localhost/solicitacoes
</connection-url>
<driver>
org.postgresql.Driver
</driver>
<new-connection-sql>
select 1
</new-connection-sql>
<security>
<user-name>
user
</user-name>
<password>
password
</password>
</security>
<validation>
<check-valid-connection-sql>
select 1
</check-valid-connection-sql>
<validate-on-match>
false
</validate-on-match>
<background-validation>
false
</background-validation>
<useFastFail>
false
</useFastFail>
</validation>
</datasource>
Now, when I start the server I get these messages:
08:01:43,390 INFO [org.jboss.as.controller] (Controller Boot Thread) Service status report
New missing/unsatisfied dependencies:
service jboss.jdbc-driver.org_postgresql_Driver (missing)
08:01:43,437 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "postgresql-9.0-801.jdbc4.jar"
08:01:43,875 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.0)
08:01:43,890 ERROR [org.jboss.as] (MSC service thread 1-1) JBoss AS 7.0.0.Final "Lightning" started (with errors) in 20765ms - Started 109 of 169 services (3 services failed or missing dependencies, 57 services are passive or on-demand)
08:01:43,953 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "postgresql-9.0-801.jdbc4.jar"
08:02:02,093 INFO [org.jboss.as.osgi] (MSC service thread 1-1) Stopping OSGi Framework
08:02:02,093 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) Unbound data source [java:jboss/datasources/SCDH_DS]
I would like to know what I am missing or doing wrong.
Thank you.
Marcos