]
Lin Gao updated WFLY-14025:
---------------------------
Git Pull Request:
Unable to remove the default datasource binding from the ee
subsystem
---------------------------------------------------------------------
Key: WFLY-14025
URL:
https://issues.redhat.com/browse/WFLY-14025
Project: WildFly
Issue Type: Bug
Components: EE, JCA
Reporter: Lin Gao
Assignee: Tomasz Adamski
Priority: Major
Labels: Regression, downstream_dependency
Attachments: reproducer-spring.war, reproducer-spring2.war, reproducer2.war,
standalone.xml
EAP 7.2+ is creating a dependency on the DefaultDataSource when it should not.
If the default datasource is removed from the ee subsystem and an application is deployed
with a class that has @Resource specifying a name to inject which is not linked to the
default datasource, it should NOT fail with a missing dependency.
This was found with a Spring application, where Spring configuration is defining
java:comp/env/dataSource to link to the real datasource. In EAP 7.1 the application
deployed with no issue, in EAP 7.2+ JBoss is failing the deployment due to the
datasource=... being removed from the default bindings in the ee subsystem.
{code:java}
@Resource(name = "dataSource")
private DataSource dataSource; {code}
{code:java}
18:08:15,547 ERROR [org.jboss.as.controller.management-operation] (Controller Boot
Thread) WFLYCTL0013: Operation ("deploy") failed - address:
([("deployment" => "reproducer2.war")]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" =>
["jboss.naming.context.java.module.reproducer2.reproducer2.DefaultDataSource"],
"WFLYCTL0180: Services with missing/unavailable dependencies" =>
["jboss.naming.context.java.module.reproducer2.reproducer2.env.non-existant is
missing
[jboss.naming.context.java.module.reproducer2.reproducer2.DefaultDataSource]"]
}{code}