1 Reply Latest reply on Jul 29, 2018 1:21 PM by Jace C

    Operation ("deploy") failed    Services with missing/unavailable dependencies

    Jace C Newbie

      Hello,

      i strugle for days with this problem. I have app which uses of EJB Scheduler and there was everything fine till i wanted to add REALM to Wildfly 13. When i added realm, added proper lane in jboss-web.xml there is deploy problem. I noticed: when i remove @Singleton annotation(same with @Statefull, @StateLess)  from my scheduler class it works (ofc scheduler doesnt work but realm works and deploy is OK . To run scheduler i need to remove lane with domain security from jboss-web.xml but than realm doesnt work. Anyone has idea where is the couse of this problem?

       

      jboss-web.xml

       

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss-web>

        <security-domain>exampleApplicationDomain</security-domain>

      </jboss-web>

       

      standalone.xml

       

      <?xml version='1.0' encoding='UTF-8'?>

       

       

      <server xmlns="urn:jboss:domain:7.0">

          <extensions>

              <extension module="org.jboss.as.clustering.infinispan"/>

              <extension module="org.jboss.as.connector"/>

              <extension module="org.jboss.as.deployment-scanner"/>

              <extension module="org.jboss.as.ee"/>

              <extension module="org.jboss.as.ejb3"/>

              <extension module="org.jboss.as.jaxrs"/>

              <extension module="org.jboss.as.jdr"/>

              <extension module="org.jboss.as.jmx"/>

              <extension module="org.jboss.as.jpa"/>

              <extension module="org.jboss.as.jsf"/>

              <extension module="org.jboss.as.logging"/>

              <extension module="org.jboss.as.mail"/>

              <extension module="org.jboss.as.naming"/>

              <extension module="org.jboss.as.pojo"/>

              <extension module="org.jboss.as.remoting"/>

              <extension module="org.jboss.as.sar"/>

              <extension module="org.jboss.as.security"/>

              <extension module="org.jboss.as.transactions"/>

              <extension module="org.jboss.as.webservices"/>

              <extension module="org.jboss.as.weld"/>

              <extension module="org.wildfly.extension.batch.jberet"/>

              <extension module="org.wildfly.extension.bean-validation"/>

              <extension module="org.wildfly.extension.core-management"/>

              <extension module="org.wildfly.extension.discovery"/>

              <extension module="org.wildfly.extension.ee-security"/>

              <extension module="org.wildfly.extension.elytron"/>

              <extension module="org.wildfly.extension.io"/>

              <extension module="org.wildfly.extension.request-controller"/>

              <extension module="org.wildfly.extension.security.manager"/>

              <extension module="org.wildfly.extension.undertow"/>

          </extensions>

          <management>

              <security-realms>

                  <security-realm name="ManagementRealm">

                      <authentication>

                          <local default-user="$local" skip-group-loading="true"/>

                          <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>

                      </authentication>

                      <authorization map-groups-to-roles="false">

                          <properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>

                      </authorization>

                  </security-realm>

                  <security-realm name="ApplicationRealm">

                      <server-identities>

                          <ssl>

                              <keystore path="application.keystore" relative-to="jboss.server.config.dir" keystore-password="password" alias="server" key-password="password" generate-self-signed-certificate-host="localhost"/>

                          </ssl>

                      </server-identities>

                      <authentication>

                          <local default-user="$local" allowed-users="*" skip-group-loading="true"/>

                          <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>

                      </authentication>

                      <authorization>

                          <properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>

                      </authorization>

                  </security-realm>

              </security-realms>

              <audit-log>

                  <formatters>

                      <json-formatter name="json-formatter"/>

                  </formatters>

                  <handlers>

                      <file-handler name="file" formatter="json-formatter" path="audit-log.log" relative-to="jboss.server.data.dir"/>

                  </handlers>

                  <logger log-boot="true" log-read-only="false" enabled="false">

                      <handlers>

                          <handler name="file"/>

                      </handlers>

                  </logger>

              </audit-log>

              <management-interfaces>

                  <http-interface security-realm="ManagementRealm">

                      <http-upgrade enabled="true"/>

                      <socket-binding http="management-http"/>

                  </http-interface>

              </management-interfaces>

              <access-control provider="simple">

                  <role-mapping>

                      <role name="SuperUser">

                          <include>

                              <user name="$local"/>

                          </include>

                      </role>

                  </role-mapping>

              </access-control>

          </management>

          <profile>

              <subsystem xmlns="urn:jboss:domain:logging:5.0">

                  <console-handler name="CONSOLE">

                      <level name="INFO"/>

                      <formatter>

                          <named-formatter name="COLOR-PATTERN"/>

                      </formatter>

                  </console-handler>

                  <periodic-rotating-file-handler name="FILE" autoflush="true">

                      <formatter>

                          <named-formatter name="PATTERN"/>

                      </formatter>

                      <file relative-to="jboss.server.log.dir" path="server.log"/>

                      <suffix value=".yyyy-MM-dd"/>

                      <append value="true"/>

                  </periodic-rotating-file-handler>

                  <logger category="com.arjuna">

                      <level name="WARN"/>

                  </logger>

                  <logger category="org.jboss.as.config">

                      <level name="DEBUG"/>

                  </logger>

                  <logger category="sun.rmi">

                      <level name="WARN"/>

                  </logger>

                  <root-logger>

                      <level name="INFO"/>

                      <handlers>

                          <handler name="CONSOLE"/>

                          <handler name="FILE"/>

                      </handlers>

                  </root-logger>

                  <formatter name="PATTERN">

                      <pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>

                  </formatter>

                  <formatter name="COLOR-PATTERN">

                      <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/>

                  </formatter>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:batch-jberet:2.0">

                  <default-job-repository name="in-memory"/>

                  <default-thread-pool name="batch"/>

                  <job-repository name="in-memory">

                      <in-memory/>

                  </job-repository>

                  <thread-pool name="batch">

                      <max-threads count="10"/>

                      <keepalive-time time="30" unit="seconds"/>

                  </thread-pool>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:bean-validation:1.0"/>

              <subsystem xmlns="urn:jboss:domain:core-management:1.0"/>

              <subsystem xmlns="urn:jboss:domain:datasources:5.0">

                  <datasources>

                      <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" 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>

                      <datasource jndi-name="java:/examplePostgresDS" pool-name="examplePostgresDS">

                          <connection-url>jdbc:mysql://localhost:3306/sakila</connection-url>

                          <driver-class>com.mysql.jdbc.Driver</driver-class>

                          <driver>mysql-connector-java-5.1.44-bin.jar_com.mysql.jdbc.Driver_5_1</driver>

                          <security>

                              <user-name>root</user-name>

                              <password>password</password>

                          </security>

                          <validation>

                              <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>

                              <background-validation>true</background-validation>

                              <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>

                          </validation>

                      </datasource>

                      <xa-datasource jndi-name="java:/MysqlXADS" pool-name="MysqlXADS">

                          <xa-datasource-property name="ServerName">

                              localhost

                          </xa-datasource-property>

                          <xa-datasource-property name="DatabaseName">

                              raportgenerator

                          </xa-datasource-property>

                          <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>

                          <driver>mysql-connector-java-5.1.44-bin.jar_com.mysql.jdbc.Driver_5_1</driver>

                          <security>

                              <user-name>root</user-name>

                              <password>password</password>

                          </security>

                          <validation>

                              <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>

                              <background-validation>true</background-validation>

                              <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>

                          </validation>

                      </xa-datasource>

                      <drivers>

                          <driver name="h2" module="com.h2database.h2">

                              <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

                          </driver>

                      </drivers>

                  </datasources>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">

                  <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:discovery:1.0"/>

              <subsystem xmlns="urn:jboss:domain:ee:4.0">

                  <spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>

                  <concurrent>

                      <context-services>

                          <context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default" use-transaction-setup-provider="true"/>

                      </context-services>

                      <managed-thread-factories>

                          <managed-thread-factory name="default" jndi-name="java:jboss/ee/concurrency/factory/default" context-service="default"/>

                      </managed-thread-factories>

                      <managed-executor-services>

                          <managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-threshold="60000" keepalive-time="5000"/>

                      </managed-executor-services>

                      <managed-scheduled-executor-services>

                          <managed-scheduled-executor-service name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default" context-service="default" hung-task-threshold="60000" keepalive-time="3000"/>

                      </managed-scheduled-executor-services>

                  </concurrent>

                  <default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:ee-security:1.0"/>

              <subsystem xmlns="urn:jboss:domain:ejb3:5.0">

                  <session-bean>

                      <stateless>

                          <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>

                      </stateless>

                      <stateful default-access-timeout="5000" cache-ref="simple" passivation-disabled-cache-ref="simple"/>

                      <singleton default-access-timeout="5000"/>

                  </session-bean>

                  <pools>

                      <bean-instance-pools>

                          <strict-max-pool name="mdb-strict-max-pool" derive-size="from-cpu-count" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                          <strict-max-pool name="slsb-strict-max-pool" derive-size="from-worker-pools" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                      </bean-instance-pools>

                  </pools>

                  <caches>

                      <cache name="simple"/>

                      <cache name="distributable" passivation-store-ref="infinispan" aliases="passivating clustered"/>

                  </caches>

                  <passivation-stores>

                      <passivation-store name="infinispan" cache-container="ejb" max-size="10000"/>

                  </passivation-stores>

                  <async thread-pool-name="default"/>

                  <timer-service thread-pool-name="default" default-data-store="default-file-store">

                      <data-stores>

                          <file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir"/>

                      </data-stores>

                  </timer-service>

                  <remote connector-ref="http-remoting-connector" thread-pool-name="default">

                      <channel-creation-options>

                          <option name="READ_TIMEOUT" value="${prop.remoting-connector.read.timeout:20}" type="xnio"/>

                          <option name="MAX_OUTBOUND_MESSAGES" value="1234" type="remoting"/>

                      </channel-creation-options>

                  </remote>

                  <thread-pools>

                      <thread-pool name="default">

                          <max-threads count="10"/>

                          <keepalive-time time="100" unit="milliseconds"/>

                      </thread-pool>

                  </thread-pools>

                  <default-security-domain value="other"/>

                  <default-missing-method-permissions-deny-access value="true"/>

                  <log-system-exceptions value="true"/>

              </subsystem>

              <subsystem xmlns="urn:wildfly:elytron:3.0" final-providers="combined-providers" disallowed-providers="OracleUcrypto">

                  <providers>

                      <aggregate-providers name="combined-providers">

                          <providers name="elytron"/>

                          <providers name="openssl"/>

                      </aggregate-providers>

                      <provider-loader name="elytron" module="org.wildfly.security.elytron"/>

                      <provider-loader name="openssl" module="org.wildfly.openssl"/>

                  </providers>

                  <audit-logging>

                      <file-audit-log name="local-audit" path="audit.log" relative-to="jboss.server.log.dir" format="JSON"/>

                  </audit-logging>

                  <security-domains>

                      <security-domain name="ApplicationDomain" default-realm="ApplicationRealm" permission-mapper="default-permission-mapper">

                          <realm name="ApplicationRealm" role-decoder="groups-to-roles"/>

                          <realm name="local"/>

                      </security-domain>

                      <security-domain name="ManagementDomain" default-realm="ManagementRealm" permission-mapper="default-permission-mapper">

                          <realm name="ManagementRealm" role-decoder="groups-to-roles"/>

                          <realm name="local" role-mapper="super-user-mapper"/>

                      </security-domain>

                      <security-domain name="jdbcdomain" default-realm="jdbcRealm">

                          <realm name="jdbcRealm"/>

                      </security-domain>

                      <security-domain name="exampleDbSD" default-realm="exampleDbRealm" permission-mapper="default-permission-mapper">

                          <realm name="exampleDbRealm" role-decoder="groups-to-roles"/>

                      </security-domain>

                  </security-domains>

                  <security-realms>

                      <identity-realm name="local" identity="$local"/>

                      <jdbc-realm name="jdbcRealm">

                          <principal-query sql="[{sql=&quot;SELECT password from USER where username=?&quot;,data-source=MySQLPool,clear-password-mapper={password-index=&quot;1&quot;}}]" data-source="MysqlXADS"/>

                      </jdbc-realm>

                      <jdbc-realm name="exampleDbRealm">

                          <principal-query sql="SELECT password,roles FROM eap_users WHERE username=?" data-source="examplePostgresDS">

                              <attribute-mapping>

                                  <attribute to="groups" index="2"/>

                              </attribute-mapping>

                              <clear-password-mapper password-index="1"/>

                          </principal-query>

                      </jdbc-realm>

                      <properties-realm name="ApplicationRealm">

                          <users-properties path="application-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ApplicationRealm"/>

                          <groups-properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>

                      </properties-realm>

                      <properties-realm name="ManagementRealm">

                          <users-properties path="mgmt-users.properties" relative-to="jboss.server.config.dir" digest-realm-name="ManagementRealm"/>

                          <groups-properties path="mgmt-groups.properties" relative-to="jboss.server.config.dir"/>

                      </properties-realm>

                  </security-realms>

                  <mappers>

                      <simple-permission-mapper name="default-permission-mapper" mapping-mode="first">

                          <permission-mapping>

                              <principal name="anonymous"/>

                              <permission-set name="default-permissions"/>

                          </permission-mapping>

                          <permission-mapping match-all="true">

                              <permission-set name="login-permission"/>

                              <permission-set name="default-permissions"/>

                          </permission-mapping>

                      </simple-permission-mapper>

                      <constant-realm-mapper name="local" realm-name="local"/>

                      <simple-role-decoder name="groups-to-roles" attribute="groups"/>

                      <constant-role-mapper name="super-user-mapper">

                          <role name="SuperUser"/>

                      </constant-role-mapper>

                  </mappers>

                  <permission-sets>

                      <permission-set name="login-permission">

                          <permission class-name="org.wildfly.security.auth.permission.LoginPermission"/>

                      </permission-set>

                      <permission-set name="default-permissions">

                          <permission class-name="org.wildfly.extension.batch.jberet.deployment.BatchPermission" module="org.wildfly.extension.batch.jberet" target-name="*"/>

                          <permission class-name="org.wildfly.transaction.client.RemoteTransactionPermission" module="org.wildfly.transaction.client"/>

                          <permission class-name="org.jboss.ejb.client.RemoteEJBPermission" module="org.jboss.ejb-client"/>

                      </permission-set>

                  </permission-sets>

                  <http>

                      <http-authentication-factory name="application-http-authentication" security-domain="ApplicationDomain" http-server-mechanism-factory="global">

                          <mechanism-configuration>

                              <mechanism mechanism-name="BASIC">

                                  <mechanism-realm realm-name="Application Realm"/>

                              </mechanism>

                              <mechanism mechanism-name="FORM"/>

                          </mechanism-configuration>

                      </http-authentication-factory>

                      <http-authentication-factory name="management-http-authentication" security-domain="ManagementDomain" http-server-mechanism-factory="global">

                          <mechanism-configuration>

                              <mechanism mechanism-name="DIGEST">

                                  <mechanism-realm realm-name="ManagementRealm"/>

                              </mechanism>

                          </mechanism-configuration>

                      </http-authentication-factory>

                      <http-authentication-factory name="http-db-auth" security-domain="jdbcdomain" http-server-mechanism-factory="global"/>

                      <http-authentication-factory name="example-db-http-auth" security-domain="exampleDbSD" http-server-mechanism-factory="global">

                          <mechanism-configuration>

                              <mechanism mechanism-name="FORM">

                                  <mechanism-realm realm-name="exampleDbSD"/>

                              </mechanism>

                          </mechanism-configuration>

                      </http-authentication-factory>

                      <provider-http-server-mechanism-factory name="global"/>

                  </http>

                  <sasl>

                      <sasl-authentication-factory name="application-sasl-authentication" sasl-server-factory="configured" security-domain="ApplicationDomain">

                          <mechanism-configuration>

                              <mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>

                              <mechanism mechanism-name="DIGEST-MD5">

                                  <mechanism-realm realm-name="ApplicationRealm"/>

                              </mechanism>

                          </mechanism-configuration>

                      </sasl-authentication-factory>

                      <sasl-authentication-factory name="management-sasl-authentication" sasl-server-factory="configured" security-domain="ManagementDomain">

                          <mechanism-configuration>

                              <mechanism mechanism-name="JBOSS-LOCAL-USER" realm-mapper="local"/>

                              <mechanism mechanism-name="DIGEST-MD5">

                                  <mechanism-realm realm-name="ManagementRealm"/>

                              </mechanism>

                          </mechanism-configuration>

                      </sasl-authentication-factory>

                      <configurable-sasl-server-factory name="configured" sasl-server-factory="elytron">

                          <properties>

                              <property name="wildfly.sasl.local-user.default-user" value="$local"/>

                          </properties>

                      </configurable-sasl-server-factory>

                      <mechanism-provider-filtering-sasl-server-factory name="elytron" sasl-server-factory="global">

                          <filters>

                              <filter provider-name="WildFlyElytron"/>

                          </filters>

                      </mechanism-provider-filtering-sasl-server-factory>

                      <provider-sasl-server-factory name="global"/>

                  </sasl>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:infinispan:6.0">

                  <cache-container name="server" default-cache="default" module="org.wildfly.clustering.server">

                      <local-cache name="default">

                          <transaction mode="BATCH"/>

                      </local-cache>

                  </cache-container>

                  <cache-container name="web" default-cache="passivation" module="org.wildfly.clustering.web.infinispan">

                      <local-cache name="passivation">

                          <locking isolation="REPEATABLE_READ"/>

                          <transaction mode="BATCH"/>

                          <file-store passivation="true" purge="false"/>

                      </local-cache>

                  </cache-container>

                  <cache-container name="ejb" aliases="sfsb" default-cache="passivation" module="org.wildfly.clustering.ejb.infinispan">

                      <local-cache name="passivation">

                          <locking isolation="REPEATABLE_READ"/>

                          <transaction mode="BATCH"/>

                          <file-store passivation="true" purge="false"/>

                      </local-cache>

                  </cache-container>

                  <cache-container name="hibernate" module="org.infinispan.hibernate-cache">

                      <local-cache name="entity">

                          <transaction mode="NON_XA"/>

                          <object-memory size="10000"/>

                          <expiration max-idle="100000"/>

                      </local-cache>

                      <local-cache name="local-query">

                          <object-memory size="10000"/>

                          <expiration max-idle="100000"/>

                      </local-cache>

                      <local-cache name="timestamps"/>

                  </cache-container>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:io:3.0">

                  <worker name="default"/>

                  <buffer-pool name="default"/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>

              <subsystem xmlns="urn:jboss:domain:jca:5.0">

                  <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>

                  <bean-validation enabled="true"/>

                  <default-workmanager>

                      <short-running-threads>

                          <core-threads count="50"/>

                          <queue-length count="50"/>

                          <max-threads count="50"/>

                          <keepalive-time time="10" unit="seconds"/>

                      </short-running-threads>

                      <long-running-threads>

                          <core-threads count="50"/>

                          <queue-length count="50"/>

                          <max-threads count="50"/>

                          <keepalive-time time="10" unit="seconds"/>

                      </long-running-threads>

                  </default-workmanager>

                  <cached-connection-manager/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>

              <subsystem xmlns="urn:jboss:domain:jmx:1.3">

                  <expose-resolved-model/>

                  <expose-expression-model/>

                  <remoting-connector/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:jpa:1.1">

                  <jpa default-datasource="" default-extended-persistence-inheritance="DEEP"/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:jsf:1.1"/>

              <subsystem xmlns="urn:jboss:domain:mail:3.0">

                  <mail-session name="default" jndi-name="java:jboss/mail/Default">

                      <smtp-server outbound-socket-binding-ref="mail-smtp"/>

                  </mail-session>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:naming:2.0">

                  <remote-naming/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>

              <subsystem xmlns="urn:jboss:domain:remoting:4.0">

                  <http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:request-controller:1.0"/>

              <subsystem xmlns="urn:jboss:domain:resource-adapters:5.0"/>

              <subsystem xmlns="urn:jboss:domain:sar:1.0"/>

              <subsystem xmlns="urn:jboss:domain:security:2.0">

                  <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="jaspitest" cache-type="default">

                          <authentication-jaspi>

                              <login-module-stack name="dummy">

                                  <login-module code="Dummy" flag="optional"/>

                              </login-module-stack>

                              <auth-module code="Dummy"/>

                          </authentication-jaspi>

                      </security-domain>

                  </security-domains>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:security-manager:1.0">

                  <deployment-permissions>

                      <maximum-set>

                          <permission class="java.security.AllPermission"/>

                      </maximum-set>

                  </deployment-permissions>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:transactions:4.0">

                  <core-environment>

                      <process-id>

                          <uuid/>

                      </process-id>

                  </core-environment>

                  <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>

                  <object-store path="tx-object-store" relative-to="jboss.server.data.dir"/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:undertow:6.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other">

                  <buffer-cache name="default"/>

                  <server name="default-server">

                      <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>

                      <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>

                      <host name="default-host" alias="localhost">

                          <location name="/" handler="welcome-content"/>

                          <http-invoker security-realm="ApplicationRealm"/>

                      </host>

                  </server>

                  <servlet-container name="default">

                      <jsp-config/>

                      <websockets/>

                  </servlet-container>

                  <handlers>

                      <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>

                  </handlers>

                  <application-security-domains>

                      <application-security-domain name="web-security-domain" http-authentication-factory="http-db-auth"/>

                      <application-security-domain name="exampleApplicationDomain" http-authentication-factory="example-db-http-auth"/>

                  </application-security-domains>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:webservices:2.0">

                  <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>

                  <endpoint-config name="Standard-Endpoint-Config"/>

                  <endpoint-config name="Recording-Endpoint-Config">

                      <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">

                          <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>

                      </pre-handler-chain>

                  </endpoint-config>

                  <client-config name="Standard-Client-Config"/>

              </subsystem>

              <subsystem xmlns="urn:jboss:domain:weld:4.0"/>

          </profile>

          <interfaces>

              <interface name="management">

                  <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>

              </interface>

              <interface name="public">

                  <inet-address value="${jboss.bind.address:127.0.0.1}"/>

              </interface>

          </interfaces>

          <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

              <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>

              <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>

              <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>

              <socket-binding name="http" port="${jboss.http.port:8080}"/>

              <socket-binding name="https" port="${jboss.https.port:8443}"/>

              <socket-binding name="txn-recovery-environment" port="4712"/>

              <socket-binding name="txn-status-manager" port="4713"/>

              <outbound-socket-binding name="mail-smtp">

                  <remote-destination host="localhost" port="25"/>

              </outbound-socket-binding>

          </socket-binding-group>

          <deployments>

              <deployment name="mysql" runtime-name="mysql-connector-java-5.1.44-bin.jar">

                  <content sha1="c5c76a610587bde4af517e457bc66f8f0339caac"/>

              </deployment>

          </deployments>

      </server>

       

      scheduler:

       

      import java.io.IOException;

       

       

      import java.util.ArrayList;

      import java.util.List;

       

       

      import javax.ejb.Schedule;

      import javax.ejb.Singleton;

      import javax.ejb.Timeout;

      import javax.ejb.Timer;

       

      @Singleton

      public class ProgrammaticScheduler {

        

         

       

         

          @Schedule(hour="22", minute="23")

          public void removeExpiredSearches() throws IOException{

              System.out.println("kick off"); 

            

        }

       

         @Timeout()

         public void onTimeout(Timer timer){

         

       

       

         }

      }

       

      server log:

      23:07:14,559 INFO  [org.jboss.modules] (main) JBoss Modules version 1.8.5.Final

      23:07:15,034 INFO  [org.jboss.msc] (main) JBoss MSC version 1.4.2.Final

      23:07:15,047 INFO  [org.jboss.threads] (main) JBoss Threads version 2.3.2.Final

      23:07:15,208 INFO  [org.jboss.as] (MSC service thread 1-1) WFLYSRV0049: WildFly Full 13.0.0.Final (WildFly Core 5.0.0.Final) starting

      23:07:17,402 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/core-service=management/management-interface=http-interface' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.

      23:07:17,440 INFO  [org.wildfly.security] (ServerService Thread Pool -- 2) ELY00001: WildFly Elytron version 1.3.3.Final

      23:07:17,451 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0015: Re-attempting failed deployment RaportGeneratorEE-0.0.1-SNAPSHOT.war

      23:07:17,452 INFO  [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 20) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/subsystem=undertow/server=default-server/https-listener=https' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.

      23:07:17,533 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found RaportGeneratorEE-0.0.1-SNAPSHOT.war in deployment directory. To trigger deployment create a file called RaportGeneratorEE-0.0.1-SNAPSHOT.war.dodeploy

      23:07:17,586 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)

      23:07:17,614 INFO  [org.xnio] (MSC service thread 1-7) XNIO version 3.6.3.Final

      23:07:17,623 INFO  [org.xnio.nio] (MSC service thread 1-7) XNIO NIO Implementation Version 3.6.3.Final

      23:07:17,702 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 38) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.4)

      23:07:17,717 INFO  [org.jboss.as.ee] (ServerService Thread Pool -- 41) WFLYEE0119: The system property 'ee8.preview.mode' is NOT set to 'true'. For provided EE 8 APIs where the EE 8 version of the API differs from what is supported in EE 7, the EE 7 variant of the API will be used. Support for this setting will be removed once all EE 8 APIs are provided and certified.

      23:07:17,729 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 45) WFLYCLINF0001: Activating Infinispan subsystem.

      23:07:17,745 INFO  [org.jboss.as.connector] (MSC service thread 1-1) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.4.9.Final)

      23:07:17,757 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) WFLYJCA0018: Started Driver service with driver-name = h2

      23:07:17,777 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 54) WFLYNAM0001: Activating Naming Subsystem

      23:07:17,833 INFO  [org.jboss.as.jaxrs] (ServerService Thread Pool -- 47) WFLYRS0016: RESTEasy version 3.5.1.Final

      23:07:17,852 INFO  [org.jboss.as.naming] (MSC service thread 1-6) WFLYNAM0003: Starting Naming Service

      23:07:17,845 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 60) WFLYSEC0002: Activating Security Subsystem

      23:07:17,856 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-3) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]

      23:07:17,880 INFO  [org.jboss.as.security] (MSC service thread 1-6) WFLYSEC0001: Current PicketBox version=5.0.2.Final

      23:07:17,889 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0003: Undertow 2.0.9.Final starting

      23:07:17,975 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 52) WFLYJSF0007: Activated the following JSF Implementations: [main]

      23:07:18,014 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 62) WFLYTX0013: The node-identifier attribute on the /subsystem=transactions is set to the default value. This is a danger for environments running multiple servers. Please make sure the attribute value is unique.

      23:07:18,052 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 64) WFLYWS0002: Activating WebServices Extension

      23:07:18,291 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 63) WFLYUT0014: Creating file handler for path 'C:\Users\Wiki\Downloads\wildfly-13.0.0.Final\wildfly-13.0.0.Final/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']

      23:07:18,627 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 46) WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors

      23:07:18,634 INFO  [org.jboss.as.ejb3] (MSC service thread 1-8) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 64 (per class), which is derived from thread worker pool sizing.

      23:07:18,635 INFO  [org.jboss.as.ejb3] (MSC service thread 1-6) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 16 (per class), which is derived from the number of CPUs on this host.

      23:07:18,775 INFO  [org.jboss.remoting] (MSC service thread 1-5) JBoss Remoting version 5.0.7.Final

      23:07:18,810 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0012: Started server default-server.

      23:07:18,817 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0018: Host default-host starting

      23:07:18,905 WARN  [org.jboss.as.domain.management.security] (MSC service thread 1-2) WFLYDM0111: Keystore C:\Users\Wiki\Downloads\wildfly-13.0.0.Final\wildfly-13.0.0.Final\standalone\configuration\application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost

      23:07:18,941 INFO  [org.jboss.as.patching] (MSC service thread 1-1) WFLYPAT0050: WildFly Full cumulative patch ID is: base, one-off patches include: none

      23:07:18,943 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) WFLYDS0013: Started FileSystemDeploymentService for directory C:\Users\Wiki\Downloads\wildfly-13.0.0.Final\wildfly-13.0.0.Final\standalone\deployments

      23:07:18,956 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080

      23:07:18,965 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0027: Starting deployment of "mysql" (runtime-name: "mysql-connector-java-5.1.44-bin.jar")

      23:07:18,965 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027: Starting deployment of "RaportGeneratorEE-0.0.1-SNAPSHOT.war" (runtime-name: "RaportGeneratorEE-0.0.1-SNAPSHOT.war")

      23:07:19,113 INFO  [org.jboss.as.ejb3] (MSC service thread 1-6) WFLYEJB0493: EJB subsystem suspension complete

      23:07:19,505 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]

      23:07:19,925 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443

      23:07:20,075 INFO  [org.jboss.ws.common.management] (MSC service thread 1-8) JBWS022052: Starting JBossWS 5.2.1.Final (Apache CXF 3.2.4.jbossorg-1)

      23:07:20,731 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)

      23:07:20,738 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.fabric.jdbc.FabricMySQLDriver (version 5.1)

      23:07:20,766 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0018: Started Driver service with driver-name = mysql-connector-java-5.1.44-bin.jar_com.mysql.fabric.jdbc.FabricMySQLDriver_5_1

      23:07:20,766 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = mysql-connector-java-5.1.44-bin.jar_com.mysql.jdbc.Driver_5_1

      23:07:20,959 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) WFLYJCA0001: Bound data source [java:/MysqlXADS]

      23:07:21,012 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) WFLYJCA0001: Bound data source [java:/examplePostgresDS]

      23:07:21,489 INFO  [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-1) ISPN000128: Infinispan version: Infinispan 'Gaina' 9.2.4.Final

      23:07:21,902 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 66) WFLYCLINF0002: Started client-mappings cache from ejb container

      23:07:25,240 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0059: Class Path entry xml-apis.jar in /C:/Users/Wiki/Downloads/wildfly-13.0.0.Final/wildfly-13.0.0.Final/standalone/deployments/RaportGeneratorEE-0.0.1-SNAPSHOT.war/WEB-INF/lib/serializer-2.7.2.jar  does not point to a valid jar for a Class-Path reference.

      23:07:25,245 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0059: Class Path entry xercesImpl.jar in /C:/Users/Wiki/Downloads/wildfly-13.0.0.Final/wildfly-13.0.0.Final/standalone/deployments/RaportGeneratorEE-0.0.1-SNAPSHOT.war/WEB-INF/lib/xalan-2.7.2.jar  does not point to a valid jar for a Class-Path reference.

      23:07:25,245 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0059: Class Path entry xml-apis.jar in /C:/Users/Wiki/Downloads/wildfly-13.0.0.Final/wildfly-13.0.0.Final/standalone/deployments/RaportGeneratorEE-0.0.1-SNAPSHOT.war/WEB-INF/lib/xalan-2.7.2.jar  does not point to a valid jar for a Class-Path reference.

      23:07:25,245 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0059: Class Path entry serializer.jar in /C:/Users/Wiki/Downloads/wildfly-13.0.0.Final/wildfly-13.0.0.Final/standalone/deployments/RaportGeneratorEE-0.0.1-SNAPSHOT.war/WEB-INF/lib/xalan-2.7.2.jar  does not point to a valid jar for a Class-Path reference.

      23:07:25,877 INFO  [org.jboss.weld.deployer] (MSC service thread 1-6) WFLYWELD0003: Processing weld deployment RaportGeneratorEE-0.0.1-SNAPSHOT.war

      23:07:26,030 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-6) HV000001: Hibernate Validator 5.3.6.Final

      23:07:26,124 INFO  [org.jboss.as.ejb3.deployment] (MSC service thread 1-6) WFLYEJB0473: JNDI bindings for session bean named 'ProgrammaticScheduler' in deployment unit 'deployment "RaportGeneratorEE-0.0.1-SNAPSHOT.war"' are as follows:

       

       

      java:global/RaportGeneratorEE-0.0.1-SNAPSHOT/ProgrammaticScheduler!czesak.raportgenerator.service.ProgrammaticScheduler

      java:app/RaportGeneratorEE-0.0.1-SNAPSHOT/ProgrammaticScheduler!czesak.raportgenerator.service.ProgrammaticScheduler

      java:module/ProgrammaticScheduler!czesak.raportgenerator.service.ProgrammaticScheduler

      ejb:RaportGeneratorEE-0.0.1-SNAPSHOT/ProgrammaticScheduler!czesak.raportgenerator.service.ProgrammaticScheduler

      java:global/RaportGeneratorEE-0.0.1-SNAPSHOT/ProgrammaticScheduler

      java:app/RaportGeneratorEE-0.0.1-SNAPSHOT/ProgrammaticScheduler

      java:module/ProgrammaticScheduler

       

       

      23:07:26,472 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)

      23:07:26,474 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.fabric.jdbc.FabricMySQLDriver (version 5.1)

      23:07:26,481 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.cj.jdbc.Driver (version 8.0)

      23:07:26,512 INFO  [org.jboss.weld.Version] (MSC service thread 1-6) WELD-000900: 3.0.4 (Final)

      23:07:26,605 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0018: Started Driver service with driver-name = RaportGeneratorEE-0.0.1-SNAPSHOT.war_com.mysql.fabric.jdbc.FabricMySQLDriver_5_1

      23:07:26,608 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) WFLYJCA0018: Started Driver service with driver-name = RaportGeneratorEE-0.0.1-SNAPSHOT.war_com.mysql.cj.jdbc.Driver_8_0

      23:07:26,607 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0018: Started Driver service with driver-name = RaportGeneratorEE-0.0.1-SNAPSHOT.war_com.mysql.jdbc.Driver_5_1

      23:07:26,838 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "RaportGeneratorEE-0.0.1-SNAPSHOT.war")]) - failure description: {

          "WFLYCTL0412: Required services that are not installed:" => ["jboss.security.security-domain.exampleApplicationDomain"],

          "WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"RaportGeneratorEE-0.0.1-SNAPSHOT.war\".component.ProgrammaticScheduler.CREATE is missing [jboss.security.security-domain.exampleApplicationDomain]"]

      }

      23:07:26,852 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "mysql" (runtime-name : "mysql-connector-java-5.1.44-bin.jar")

      23:07:26,885 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 39) WFLYSRV0010: Deployed "RaportGeneratorEE-0.0.1-SNAPSHOT.war" (runtime-name : "RaportGeneratorEE-0.0.1-SNAPSHOT.war")

      23:07:26,900 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report

      WFLYCTL0184:    New missing/unsatisfied dependencies:

            service jboss.security.security-domain.exampleApplicationDomain (missing) dependents: [service jboss.deployment.unit."RaportGeneratorEE-0.0.1-SNAPSHOT.war".component.ProgrammaticScheduler.CREATE]

      WFLYCTL0448: 225 additional services are down due to their dependencies being missing or failed

      23:07:26,986 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server

      23:07:26,990 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management

      23:07:26,991 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990

      23:07:26,991 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 13.0.0.Final (WildFly Core 5.0.0.Final) started (with errors) in 12902ms - Started 750 of 1172 services (229 services failed or missing dependencies, 321 services are lazy, passive or on-demand)