I am running my local dev Wildfly 9.0.1 server and faced a problem that after I deploy my .war application via IntelliJ IDEA I cant open Deployments tab it says "Unable to load deployments
".
And in logs there is a record:
16:20:15,868 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-10) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
("deployment" => "modules-journal"),
("subsystem" => "datasources"),
("data-source" => "java:jboss/datasources/mj2")
]) - failure description: "WFLYJCA0065: No DataSource exists at address [
(\"deployment\" => \"modules-journal\"),
(\"subsystem\" => \"datasources\"),
(\"data-source\" => \"java:jboss/datasources/mj2\")
]"
Yes, my application contains datasource definition in WEB-INF
folder:
<?xml version="1.0" encoding="UTF-8"?>
<datasources xmlns="http://www.jboss.org/ironjacamar/schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.org/ironjacamar/schema http://docs.jboss.org/ironjacamar/schema/datasources_1_0.xsd">
<!-- The datasource is bound into JNDI at this location. We reference
this in META-INF/persistence.xml -->
<datasource jndi-name="java:jboss/datasources/mj2"
pool-name="hibernate4-quickstart" enabled="true"
use-java-context="true">
<connection-url>jdbc:h2:~/test:mj2</connection-url>
<driver>h2</driver>
<security>
<user-name>test</user-name>
<password>test</password>
</security>
</datasource>
</datasources>
And my deployed application works successfully with it.
Why Wildfly Deployments tab says that "No DataSource exists" and doesn't open but my application still works?
Also everything works well if I don't use IntelliJ IDEA but deploy my app with Wildfly web interface.
Possibly it is an IntelliJ IDEA issue but it looks very strange from Wildfly side.
Could anyone explain why Wildfly reports that it doesn't see datasource when it exists and why it prevents Wildfly from loading "Deployments tab"? I missing something in how Wildfly works or it is a bug in Wildfly?