Wildfly missing/unavailable dependencies - deployment

Wildfly 10 on deploy
Can you help me with such error
11:25:36,039 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "console-dev.war")]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => [
"jboss.naming.context.java.global.\"services-1.0.5\".\"api.ejb-1.1\".\"ActionsFacadeBean!by.common.api.IActionsService\""
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.naming.context.java.module.console-dev.console-dev.env.\"by.abank.admin.ui.factory.EJBFactory\".iActionsService is missing [jboss.naming.context.java.global.\"services-1.0.5\".\"api.ejb-1.1\".\"ActionsFacadeBean!by.common.api.IActionsService\"]",
]
}
I have service.ear with
#Stateless #Remote ActionsFacadeBean
And console-dev.war
#EJB(lookup = "java:global/services-1.0.5/api.ejb-1.1/ActionsFacadeBean!by.common.api.IActionsService")
protected IActionsService iActionsService;

Related

WFLYCTL0180: Services with missing/unavailable dependencies in Wildfly 26 with EJB SecurityDomain annotation

We've got an application with several web services annotated with #SecurityDomain("our-ws") (I've also tried setting this in jboss-web.xml). For example:
#Stateless
#Interceptors(OurTransactionInterceptor.class)
#WebService(targetNamespace = "...", portName = "AddStuff", serviceName = "AddStuffService")
#SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
#WebContext(authMethod = "BASIC", contextRoot = "/service", urlPattern = "/AddStuffService")
#SecurityDomain("our-ws")
public class AddStuffService { ... }
We are upgrading to Wildfly 26, and attempting to use elytron following the example from
WildFly Elytron Security, section 4.1.3. However, on startup, I'm getting an error like:
13 Jan 2023 11:26:01,763 ERROR [management-operation Controller Boot Thread] WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "service.war")]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => ["jboss.security.security-domain.our-ws"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"service.war\".component.AddStuffService.CREATE is missing [jboss.security.security-domain.our-ws]"]
}
In standalone.xml, under <subsystem xmlns="urn:wildfly:elytron:15.1"...> We've got a datasource, which I'll call 'ourDS' (not shown) used by a jdbc-realm, jdbc:
<jdbc-realm name="jdbc">
<principal-query sql="SELECT password FROM CFG_WS_USERS_T WHERE username=?" data-source="evercoreDS">
<clear-password-mapper password-index="1"/>
</principal-query>
<principal-query sql="SELECT roles from CFG_WS_ROLES_T r join CFG_WS_USERS_T u on u.WS_USERS_PK=r.WS_USERS_FK where u.username=?" data-source="ourDS">
<attribute-mapping>
<attribute to="roles" index="1"/>
</attribute-mapping>
</principal-query>
</jdbc-realm>
And a security-domain for those web services:
<security-domain name="our-ws" default-realm="jdbc" permission-mapper="default-permission-mapper">
<realm name="jdbc" role-decoder="groups-to-roles"/>
</security-domain>
So I don't get why jboss.security.security-domain.our-ws is not installed (unless, maybe, it is looking for it in the legacy security configuration.).
How, do I get the SecurityDomain annotation (or the security-domain tag in jboss-web.xml) to refer to the elytron configuration, or why would my security-domain under elytron not be installed?
EDIT: In response to #ehsavoie's comment, I'll note that, per section 4.1.3 of the doc, we also have an http-authentication-factory and application-security-domain:
<http-authentication-factory name="our-ws-http-auth" security-domain="our-ws" http-server-mechanism-factory="global">
<mechanism-configuration>
<mechanism mechanism-name="BASIC">
<mechanism-realm realm-name="our-ws"/>
</mechanism>
</mechanism-configuration>
</http-authentication-factory>
<application-security-domains>
<application-security-domain name="defaultASD" security-domain="ApplicationDomain"/>
<application-security-domain name="our-ws-appsecurity-domain" http-authentication-factory="our-ws-http-auth"/>
</application-security-domains>
(I'm a bit confused by the mechanism-realm realm-name="our-ws", since our-ws is not a security-realm, but a security-domain, but it follows the documentation - again section 4.1.3-- and I also tried using the jdbc security-realm there, with the the same error.)

Wildfly 2x | Server resume

I am experiencing an unexpected automatic EAR restart from Wildfly 23.0.2.Final (also verified with 22.0.1.Final and 23.0.0.Final).
Basically, what happens is that the application is started, but when everything is up and running, I receive a message that reads WFLYSRV0212: Resuming server and the deploy process starts over again. This also seems to jeopardize JMS queues definition (defined from within the EJB module as #JMSResourceDestinations).
Below the snippet of the logs when this happens (just a bit anonymized):
13:16:12,228 INFO [org.jboss.as.server] (ServerService Thread Pool -- 48) WFLYSRV0010: Deployed "XXXX.ear" (runtime-name : "XXXX.ear")
13:16:12,250 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) WFLYJCA0019: Stopped Driver service with driver-name = XXXXX.ear_org.postgresql.Driver_42_2
13:16:12,251 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
13:16:12,260 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 9) WFLYUT0022: Unregistered web context: '/api' from server 'default-server'
13:16:12,269 INFO [io.undertow.servlet] (ServerService Thread Pool -- 9) Closing Spring root WebApplicationContext
13:16:12,303 WARN [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 25) AMQ222061: Client connection failed, clearing up resources for session 1610e737-d282-11eb-9d4b-0242e77fb65d
13:16:12,309 WARN [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 25) AMQ222107: Cleared up resources for session 1610e737-d282-11eb-9d4b-0242e77fb65d
13:16:12,313 WARN [org.apache.activemq.artemis.ra] (default-threads - 1) AMQ152005: Failure in broker activation org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec(ra=org.wildfly.extension.messaging.activemq.ActiveMQResourceAdapter#9f1bfbc destination=java:global/XXXX/jms/queue/queue1 destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15): ActiveMQUnBlockedException[errorType=UNBLOCKED message=AMQ219016: Connection failure detected. Unblocking a blocking call that will never get a response]
at org.apache.activemq.artemis#2.16.0//org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:540)
at org.apache.activemq.artemis#2.16.0//org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:434)
at org.apache.activemq.artemis#2.16.0//org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.createSessionContext(ActiveMQClientProtocolManager.java:300)
at org.apache.activemq.artemis#2.16.0//org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.createSessionContext(ActiveMQClientProtocolManager.java:249)
at org.apache.activemq.artemis#2.16.0//org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSessionChannel(ClientSessionFactoryImpl.java:1401)
at org.apache.activemq.artemis#2.16.0//org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:705)
at org.apache.activemq.artemis#2.16.0//org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:316)
at org.apache.activemq.artemis.ra#2.16.0//org.apache.activemq.artemis.ra.ActiveMQResourceAdapter.createSession(ActiveMQResourceAdapter.java:1602)
at org.apache.activemq.artemis.ra#2.16.0//org.apache.activemq.artemis.ra.inflow.ActiveMQActivation.setupSession(ActiveMQActivation.java:491)
at org.apache.activemq.artemis.ra#2.16.0//org.apache.activemq.artemis.ra.inflow.ActiveMQActivation.setup(ActiveMQActivation.java:316)
at org.apache.activemq.artemis.ra#2.16.0//org.apache.activemq.artemis.ra.inflow.ActiveMQActivation$SetupActivation.run(ActiveMQActivation.java:764)
at org.wildfly.extension.messaging-activemq//org.wildfly.extension.messaging.activemq.ActiveMQResourceAdapter$WorkWrapper.run(ActiveMQResourceAdapter.java:161)
at org.jboss.ironjacamar.impl#1.4.27.Final//org.jboss.jca.core.workmanager.WorkWrapper.runWork(WorkWrapper.java:445)
at org.jboss.as.connector#23.0.2.Final//org.jboss.as.connector.services.workmanager.WildflyWorkWrapper.runWork(WildflyWorkWrapper.java:69)
at org.jboss.ironjacamar.impl#1.4.27.Final//org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:223)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:29)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:789)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:44)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:809)
at java.base/java.lang.Thread.run(Thread.java:829)
at org.jboss.threads#2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
13:16:12,329 INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-5) WFLYMSGAMQ0006: Unbound messaging object to jndi name java:global/XXXX/jms/queue/queue1
The EAR was created with the specific Wildfly archetype. The configuration of the Wildfly instance is the standalone-full, as it comes out of the box.
Anyone who can help me understand what's happening?
UPDATE: Wildfly logs
Increasing the root log level and goinf through it, I've found the following:
2021-06-22 18:44:59,357 DEBUG [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) Deployment scan of [/home/xxxx/wildfly-23.0.2.Final/standalone/deployments] found update action [{
"operation" => "composite",
"address" => [],
"steps" => [
{
"operation" => "add",
"address" => [("deployment" => "togather-engine.ear")],
"content" => [{
"archive" => false,
"path" => "deployments/XXXX.ear",
"relative-to" => "jboss.server.base.dir"
}],
"persistent" => false,
"owner" => [
("subsystem" => "deployment-scanner"),
("scanner" => "default")
]
},
{
"operation" => "deploy",
"address" => [("deployment" => "XXXX.ear")],
"owner" => [
("subsystem" => "deployment-scanner"),
("scanner" => "default")
]
}
],
"operation-headers" => {"rollback-on-runtime-failure" => false}
}]
After a bit
2021-06-22 18:45:11,886 DEBUG [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) Deployment scan of [/home/xxxxx/wildfly-23.0.2.Final/standalone/deployments] found update action [{
"operation" => "redeploy",
"address" => [("deployment" => "XXXX.ear")],
"owner" => [
("subsystem" => "deployment-scanner"),
("scanner" => "default")
]
}]
It looks that it's actually that is going through the deployment twice.

deploying a project to wildfly server getting issues with required service are not installed

I have created the maridb folder inside Wildfly/module.../mariadb/ and added the required module.xml file and appropriate jar file.
08:36:58,152 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "dgpa")
]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => ["jboss.jdbc-driver.mariadb-java-client-2_3_0_jar"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.driver-demander.java:jboss/datasources/Archive is missing [jboss.jdbc-driver.mariadb-java-client-2_3_0_jar]",
"org.wildfly.data-source.dbpa is missing [jboss.jdbc-driver.mariadb-java-client-2_3_0_jar]"
]
}
08:36:58,192 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "dbagpa")
]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => [
"jboss.jdbc-driver.mariadb-java-client-2_3_0_jar",
"jboss.jdbc-driver.mariadb-java-client-2_3_0_jar"
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.driver-demander.java:jboss/datasources/Archive is missing [jboss.jdbc-driver.mariadb-java-client-2_3_0_jar]",
"org.wildfly.data-source.dbpa is missing [jboss.jdbc-driver.mariadb-java-client-2_3_0_jar]",
"org.wildfly.data-source.dbpa is missing [jboss.jdbc-driver.mariadb-java-client-2_3_0_jar]"
I am posting answer to my question, I messed up with my standalone.xml and I followed the below-mentioned link and it worked.
https://issues.redhat.com/browse/JBEAP-2405

WildFly10 - unable to deploy my ears

Unable to deploy my ears into WildFly10.0.0 and same ear working fine in JBoss7.1.1 server. Here are the details of my project and error which i'm facing while adding my ear to server. Jar file used in ejbModule to prepare ear file attached as a screen shot. Giving an exception while adding it to server. same ear working fine in JBoss7.1.1 Final version.
**jboss-deployment-structure.xml**
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="com.hway.blz.fm" export="true"/>
<module name="com.hway.blz.common" export="true"/>
<module name="com.blazesoft" export="true"/>
<module name="com.thoughtworks" export="true"/>
<module name="org.jboss.ws.cxf.jbossws-cxf-client" services="true" export="true"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
fm-web.jar:
Jar having two classes to expose my object model as wsdl using RPC\soap binding
\fm-web\ejbModule\com\hway\blz\fm\Fmbean.java
[Error details provided in the attached screen shot][1] Pls. help me on this issue resolution.
Dismiss
Wed Apr 19 21:51:18 GMT-500 2017
Unable to assign fm-rules.ear.
Unexpected HTTP response: 500
Request
{
"operation" => "composite",
"address" => undefined,
"steps" => [{
"operation" => "add",
"address" => [
("server-group" => "main-server-group"),
("deployment" => "fm-rules.ear")
],
"runtime-name" => "fm-rules.ear",
"enabled" => true
}]
}
Response
Internal Server Error
{
"outcome" => "failed",
"result" => {"step-1" => {
"outcome" => "failed",
"rolled-back" => true
}},
"failure-description" => {"WFLYDC0074: Operation failed or was rolled back on all servers. Server failures:" => {"server-group" => {"main-server-group" => {"host" => {"master" => {
"server-one" => {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" => {
"jboss.module.service.\"deployment.fm-rules.ear\".main" => "org.jboss.msc.service.StartException in service jboss.module.service.\"deployment.fm-rules.ear\".main: WFLYSRV0179: Failed to load module: deployment.fm-rules.ear:main
Caused by: org.jboss.modules.ModuleNotFoundException: com.hway.blz.fm:main",
"jboss.module.service.\"deployment.fm-rules.ear.fm-web.jar\".main" => "org.jboss.msc.service.StartException in service jboss.module.service.\"deployment.fm-rules.ear.fm-web.jar\".main: WFLYSRV0179: Failed to load module: deployment.fm-rules.ear.fm-web.jar:main
Caused by: org.jboss.modules.ModuleNotFoundException: com.hway.blz.fm:main"
}}}},
"server-two" => {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" => {
"jboss.module.service.\"deployment.fm-rules.ear.fm-web.jar\".main" => "org.jboss.msc.service.StartException in service jboss.module.service.\"deployment.fm-rules.ear.fm-web.jar\".main: WFLYSRV0179: Failed to load module: deployment.fm-rules.ear.fm-web.jar:main
Caused by: org.jboss.modules.ModuleNotFoundException: com.hway.blz.fm:main",
"jboss.module.service.\"deployment.fm-rules.ear\".main" => "org.jboss.msc.service.StartException in service jboss.module.service.\"deployment.fm-rules.ear\".main: WFLYSRV0179: Failed to load module: deployment.fm-rules.ear:main
Caused by: org.jboss.modules.ModuleNotFoundException: com.hway.blz.fm:main"
}}}}
}}}}}}
[1]: https://i.stack.imgur.com/UEP0O.png
[1]: https://i.stack.imgur.com/W9WHi.png
It looks like you're missing a module Caused by: org.jboss.modules.ModuleNotFoundException: com.hway.blz.fm:main. You'll need to make sure that module is installed in the $JBOSS_HOME/modules directory.

Archiva deployment on wildfly 10

I have the following problem when i try to deploy archiva 2.2.1 on wildfly 10.
Can someone help me to resolve it ?
Unexpected HTTP response: 500
Request
{
"operation" => "deploy",
"address" => [("deployment" => "archiva.war")]
}
Response
Internal Server Error
{
"outcome" => "failed",
"failure-description" => {"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.archiva.archiva.env.mail.Session is missing [jboss.naming.context.java.jboss.resources.mail.Session]"]},
"rolled-back" => true
}
You need to specify the JNDI name in your WEB-INF/web.xml file in the archiva JAR.
<resource-ref>
<res-ref-name>mail/Session</res-ref-name>
<res-type>javax.mail.Session</res-type>
<jndi-name>java:jboss/mail/Default</jndi-name>
</resource-ref>
You can find the JNDI name by referring to the standalone/configurations/standalone-full.xml.
<subsystem xmlns="urn:jboss:domain:mail:2.0">
<mail-session name="default" jndi-name="java:jboss/mail/Default">
<smtp-server outbound-socket-binding-ref="mail-smtp"/>
</mail-session>
</subsystem>
Note the JNDI name of the mail session is java:jboss/mail/Default.