[
https://issues.jboss.org/browse/AS7-4222?page=com.atlassian.jira.plugin.s...
]
Wolf-Dieter Fink commented on AS7-4222:
---------------------------------------
The initial intention is the same as in further AS.
Define a datasource, add the driver and start the server ;)
So the wiki shows two posibilities to add the driver:
- as module -> no problem
- as deployment
So as deployment I would expect that I can add the DS to standalone.xml, copy the
driver.jar into deployments and start the server.
From the messages it looks like confusing and errornous (that was my
expectation from further versions where the DS is not started),
but in fact the DS
works if the server is running (I did not check the DS after I see an ERROR).
The ERROR message is only shown in EAP6 (not in current 7.1.2) sorry for that!
But the log is still confusing:
08:18:25,636 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-8)
JBAS015012: Started FileSystemDeploymentService for directory
/srv/AS7.x/sa/standalone/deployments
08:18:25,762 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread
1-6) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
08:18:25,971 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service
status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.postgresql-9_0-801_jar (missing) dependents: [service
jboss.data-source.java:jboss/JBTravelDatasource]
08:18:25,984 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876:
Starting deployment of "postgresql-9.0-801.jar"
08:18:26,144 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7)
JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.0)
08:18:26,159 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread
1-1) JBAS010400: Bound data source [java:jboss/JBTravelDatasource]
08:18:26,172 INFO [org.jboss.as] (MSC service thread 1-5) JBAS015951: Admin console
listening on
http://127.0.0.1:9990
08:18:26,173 INFO [org.jboss.as] (MSC service thread 1-5) JBAS015874: JBoss AS
7.1.2.Final-SNAPSHOT "Brontes" started in 2022ms - Started 156 of 236 services
(78 services are passive or on-demand)
08:18:26,286 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559:
Deployed "postgresql-9.0-801.jar"
08:18:26,287 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774:
Service status report
JBAS014776: Newly corrected services:
service jboss.jdbc-driver.postgresql-9_0-801_jar (no longer required)
The first JBAS14776 is not handsome (but the DS is started before the driver).
The last JBAS14776 put the user in a wrong direction "service
jboss.jdbc-driver.postgresql-9_0-801_jar (no longer required)"
it looks like that the driver will be unloaded!
So indeed the difference is not a non working DS but a confusing message.
Difference in deployment of datasource and its dependent drive in
standalone mode (file-scanner and CLI/console deployment)
---------------------------------------------------------------------------------------------------------------------------
Key: AS7-4222
URL:
https://issues.jboss.org/browse/AS7-4222
Project: Application Server 7
Issue Type: Bug
Components: JCA
Affects Versions: 7.1.1.Final
Environment: New created server
GIT commit d83dee45ca662fbe12b71f477884188887ce0b6a (current upstream)
Reporter: Wolf-Dieter Fink
Assignee: Stefano Maestri
It is a difference whether the necesarry driver of a datasource is deployed from
CLI/console or from the filesystem via scanner.
If the driver is copied to standalone/deployments the starup failed (drive.jar.deployed
state file is available).
If the driver is deployed via console/CLI the startup is correct (see log excerpt)
Tested with postgresql.
== datasource (no other changes to standalone.xml)====
<datasource jta="false"
jndi-name="java:jboss/JBTravelDatasource" pool-name="JBTravel"
enabled="true" use-ccm="false">
<connection-url>jdbc:postgresql://localhost:5432/postgres</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<driver>postgresql-9.0-801.jar</driver>
<pool>
<min-pool-size>10</min-pool-size>
<max-pool-size>50</max-pool-size>
<prefill>true</prefill>
</pool>
<security>
<user-name>postgres</user-name>
<password>postgres</password>
</security>
<validation>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
============== log with added driver from console ========
17:47:14,548 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4)
JBAS015012: Started FileSystemDeploymentService for directory
/srv/eap/6.0.Beta1/standalone/deployments
17:47:14,575 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread
1-6) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
17:47:14,733 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5)
JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.0)
17:47:14,755 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread
1-6) JBAS010400: Bound data source [java:jboss/JBTravelDatasource]
17:47:14,793 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS018559: Deployed
"postgresql-9.0-801.jar"
17:47:14,801 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP
6.0.0.Beta1 (AS 7.1.0.Final-redhat-1) started in 2473ms - Started 157 of 231 services (72
services are passive or on-demand)
========== deployed as file to sa/deployments ====
17:44:11,718 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread
1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
17:44:11,926 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service
status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.postgresql-9_0-801_jar (missing) dependents: [service
jboss.data-source.java:jboss/JBTravelDatasource]
17:44:11,935 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss EAP
6.0.0.Beta1 (AS 7.1.0.Final-redhat-1) started (with errors) in 2418ms - Started 135 of 209
services (2 services failed or missing dependencies, 70 services are passive or
on-demand)
17:44:11,946 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876:
Starting deployment of "postgresql-9.0-801.jar"
17:44:12,086 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2)
JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.0)
17:44:12,107 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread
1-3) JBAS010400: Bound data source [java:jboss/JBTravelDatasource]
17:44:12,199 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559:
Deployed "postgresql-9.0-801.jar"
17:44:12,201 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774:
Service status report
JBAS014776: Newly corrected services:
service jboss.jdbc-driver.postgresql-9_0-801_jar (no longer required)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira