1
    <subsystem xmlns="urn:jboss:domain:datasources:5.0">
        <datasources>
            <datasource jndi-name="java:jboss/datasources/UTADS" pool-name="UTADS" enabled="true" use-java-context="true">
                <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
                <driver>h2</driver>
                <security>
                    <user-name>sa</user-name>
                    <password>sa</password>
                </security>
            </datasource>
            <drivers>
                <driver name="h2" module="com.h2database.h2">
                    <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                </driver>
            </drivers>
        </datasources>
    </subsystem>

We have a subsystem configured as shown above. But we get the error as

2021-05-06 00:42:32,690 ERROR [org.jboss.as.controller.management-operation] (oneagentperiodiceventsmanaged) WFLYCTL0013: Operation ("read-attribute") failed - address: ([ ("subsystem" => "datasources"), ("data-source" => "UTADS") ]) - failure description: "WFLYCTL0216: Management resource '[("subsystem" => "datasources")]' not found"

On checking, I found that the reason for this error is the subsystem is not loaded during the server initialization. This issue occurs when application tries to access the details of the subsystem during startup. How do I fix this?

I even referred to a similar question. But this did not help me. Operation "read-attribute" failed during JBoss EAP 7 startup

User27854
  • 824
  • 1
  • 16
  • 40
  • Do you mean that your application code is doing the read-attribute ? – ehsavoie May 07 '21 at 07:20
  • I have asked the product team and they have confired that there is no read happening during the deployment at their end. Instead they have suggested me to set startDelayInSeconds for their application so that the sub system will get launched meanwhile. Not sure if that is the right approach. – User27854 May 07 '21 at 07:42
  • 1
    subsystems start concurrently, and deployments too so if you don't have a declared dependency on that datasource it can be started after your deployment is ready. – ehsavoie May 07 '21 at 12:41
  • Is it possible for us to specify the order of deployments? Where in I want the subsystem to be loaded first and then the application? – User27854 May 07 '21 at 12:54
  • Like I wrote you need to depend explicitly on that datasource via JNDI / CDI. – ehsavoie May 10 '21 at 07:34

0 Answers0