title: EJB: Incompatible conflicting binding at java:module/env/
body: <p>I am deploying war to JBoss using Arquillian:</p>
  
  <p>I see from the log that my class was successfully deployed:</p>
  
  <pre><code>14:10:54,125 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-5) JNDI bindings for session bean named MyClass in deployment unit deployment "test.war" are as follows:
          java:global/test/MyClass!com.package.MyInterface
          java:app/test/MyClass!com.package.MyInterface
          java:module/MyClass!com.package.MyInterface
  </code></pre>
  
  <p>It loads another beans, after a while application fails with exception:</p>
  
  <pre><code>14:10:54,985 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."test.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."test.war".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "test.war"
          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
          at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
  Caused by: java.lang.IllegalArgumentException: JBAS011053: Incompatible conflicting binding at java:module/env/MyClass source: org.jboss.as.ejb3.deployment.processors.EjbInjectionSource@b5aac489
          at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.addJndiBinding(ModuleJndiBindingProcessor.java:239)
          at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor$1.handle(ModuleJndiBindingProcessor.java:196)
          at org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:54)
          at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.processClassConfigurations(ModuleJndiBindingProcessor.java:164)
          at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:157)
          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
          ... 5 more
  
  14:10:55,050 ERROR [org.jboss.as.server] (management-handler-thread - 2) JBAS015870: Deploy of deployment "test.war" was rolled back with the following failure message: 
  {"JBAS014671: Failed services" =&gt; {"jboss.deployment.unit.\"test.war\".INSTALL" =&gt; "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"test.war\".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \"test.war\"
      Caused by: java.lang.IllegalArgumentException: JBAS011053: Incompatible conflicting binding at java:module/env/MyClass source: org.jboss.as.ejb3.deployment.processors.EjbInjectionSource@b5aac489"}}
  </code></pre>
  
  <blockquote>
    <p>conflicting binding at java:module/env/MyClass</p>
  </blockquote>
  
  <p><strong>Questions:</strong></p>
  
  <ol>
  <li>Why did it start deploy <code>MyClass</code> again?</li>
  <li>What is <code>java:module/env</code> namespace for?</li>
  <li>I think, I am absolutely happy without <code>java:module/env/</code> how to switch it off? </li>
  </ol>