title: Wildfly unable to load deployments after IntelliJ IDEA deploy
body: <p>I am running my local dev <strong>Wildfly 9.0.1</strong> server and faced a problem that after I deploy my .war application via IntelliJ IDEA I cant open <strong>Deployments</strong>  tab it says "<code>Unable to load deployments</code>".</p>
  
  <p>And in logs there is a record:</p>
  
  <pre><code>16:20:15,868 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-10) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
      ("deployment" =&gt; "modules-journal"),
      ("subsystem" =&gt; "datasources"),
      ("data-source" =&gt; "java:jboss/datasources/mj2")
  ]) - failure description: "WFLYJCA0065: No DataSource exists at address [
      (\"deployment\" =&gt; \"modules-journal\"),
      (\"subsystem\" =&gt; \"datasources\"),
      (\"data-source\" =&gt; \"java:jboss/datasources/mj2\")
  ]"
  </code></pre>
  
  <p>Yes, my application contains datasource definition in <code>WEB-INF</code> folder:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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"&gt;
     &lt;!-- The datasource is bound into JNDI at this location. We reference 
        this in META-INF/persistence.xml --&gt;
     &lt;datasource jndi-name="java:jboss/datasources/mj2"
        pool-name="hibernate4-quickstart" enabled="true"
        use-java-context="true"&gt;
        &lt;connection-url&gt;jdbc:h2:~/test:mj2&lt;/connection-url&gt;
        &lt;driver&gt;h2&lt;/driver&gt;
        &lt;security&gt;
           &lt;user-name&gt;test&lt;/user-name&gt;
           &lt;password&gt;test&lt;/password&gt;
        &lt;/security&gt;
     &lt;/datasource&gt;
  &lt;/datasources&gt;
  </code></pre>
  
  <p>And my deployed application works successfully with it.</p>
  
  <p>Why Wildfly <strong>Deployments</strong> tab says that "No DataSource exists" and doesn't open but my application still works?</p>
  
  <p>Also everything works well if I don't use IntelliJ IDEA but deploy my app with Wildfly web interface.</p>
  
  <p>Possibly it is an IntelliJ IDEA issue but it looks very strange from Wildfly side.</p>
  
  <p>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?</p>