I am working on a JavaEE7 tutorial ; currently I am trying to establish a security domain using wildfly 8.2.0. These are the settings I use:
jboss-web.xml:
<jboss-web>
<security-domain>my-aktion</security-domain>
</jboss-web>
The part of standalone.xml that handles this security-domain:
<subsystem xmlns="urn:jboss:domain:security:1.2">
<security-domains>
<security-domain name="other" cache-type="default">
<authentication>
<login-module code="Remoting" flag="optional">
<module-option name="password-stacking" value="useFirstPass"/>
</login-module>
<login-module code="RealmDirect" flag="required">
<module-option name="password-stacking" value="useFirstPass"/>
</login-module>
</authentication>
</security-domain>
<security-domain name="jboss-web-policy" cache-type="default">
<authorization>
<policy-module code="Delegating" flag="required"/>
</authorization>
</security-domain>
<security-domain name="jboss-ejb-policy" cache-type="default">
<authorization>
<policy-module code="Delegating" flag="required"/>
</authorization>
</security-domain>
<security-domain name="my-aktion" cache-type="default">
<authentication>
<login-module code="Database" flag="required">
<module-option name="dsJndiName" value="java:jboss/datasources/MyAktionDS"/>
<module-option name="principalsQuery" value="select password from organizer where email=?"/>
<module-option name="rolesQuery" value="select 'Organizer','Roles' from organizer where email=?"/>
<module-option name="hashAlgorithm" value="SHA-256" />
<module-option name="hashEncoding" value="hex" />
<module-option name="hashCharset" value="UTF-8" />
</login-module>
</authentication>
</security-domain>
</security-domains>
</subsystem>
And that´s the error I get when I try to deploy:
> "JBAS014771: Services with missing/unavailable dependencies" => [
> "jboss.deployment.unit.\"my-aktion.war\".component.DonationServiceBean.CREATE
> is missing [jboss.security.security-domain.my-aktion]",
> "jboss.deployment.unit.\"my-aktion.war\".component.CampaignServiceBean.CREATE
> is missing [jboss.security.security-domain.my-aktion]",
> "jboss.undertow.deployment.default-server.default-host./my-aktion.UndertowDeploymentInfoService
> is missing [jboss.security.security-domain.my-aktion]" ]}
I can´t make heads or tails from this error message, but it seems to be something I did wrong with the my-aktion security domain, maybe someone has a hint. In any case, I tried deleting jboss-web.xml, the application deploys fine, but I can´t login, probably because the querys handling the login are in the "my-aktion" security-domain. Probably a newbie error here, but I just can´t find it.
EDIT: By the way, just in case it matters: the two Beans mentioned in the error are annotated @Stateless and I have no beans.xml.
EDIT2: I solved the problem, but I still don´t know what caused it. The solution: I deleted myaktion-ds.xml, which contained the registration of my datasource and moved its content to a tag in my standalone.xml. Now everything works, although why it does is beyond me. I´ll leave this question here for a couple of days, just in case someone can enlighten me.