[jboss-jira] [JBoss JIRA] (WFLY-9978) resource adapter sometimes fails to start when it uses legacy security-domain
Martin Simka (JIRA)
issues at jboss.org
Wed Apr 25 11:54:00 EDT 2018
[ https://issues.jboss.org/browse/WFLY-9978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13566893#comment-13566893 ]
Martin Simka commented on WFLY-9978:
------------------------------------
It looks like this is caused by WFLY-8323.
{code:java|title=RaServicesFactory.java}
if (ActivationSecurityUtil.isLegacySecurityRequired(raxml)) {
builder.addDependency(SubjectFactoryService.SERVICE_NAME, SubjectFactory.class,
service.getSubjectFactoryInjector())
.addDependency(SimpleSecurityManagerService.SERVICE_NAME,
ServerSecurityManager.class, service.getServerSecurityManager());
}
{code}
the part
{code:java}
if (ActivationSecurityUtil.isLegacySecurityRequired(raxml)) {
{code}
is what causes troubles. {{raxml}} might not be available yet because some services aren't started ({{ConnectionDefinitionService}} or {{CDConfigPropertiesService}}). {{ModifiableResourceAdapter}} doesn't contain all data yet. So there is no full {{raxml}} with security definitions.
I'm not sure if that code is needed in {{RaServicesFactory.java}}. Dependency on SubjectFactoryService is added on other places. Also what I don't understand is direction of dependencies. {{ConnectionDefinitionService}} depends on {{ResourceAdapterService}}, shouldn't it be opposite or shouldn't they depend on each other?
> resource adapter sometimes fails to start when it uses legacy security-domain
> -----------------------------------------------------------------------------
>
> Key: WFLY-9978
> URL: https://issues.jboss.org/browse/WFLY-9978
> Project: WildFly
> Issue Type: Bug
> Components: JCA
> Affects Versions: 11.0.0.Final, 12.0.0.Final
> Environment: WildFly 11
> JBoss EAP 7.1.0
> Reporter: Martin Simka
> Assignee: Stefano Maestri
> Priority: Blocker
> Attachments: bad.txt, good.txt, standalone.xml
>
>
> When resource adapter is configured with legacy security domain, it sometimes fails to start.
> Error:
> {noformat}
> 2018-03-07 16:04:34,300 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 62) MSC000001: Failed to start service jboss.ra.deployment."org.jboss.genericjms:main_generic-jms-ra": org.jboss.msc.service.StartException in service jboss.ra.deployment."org.jboss.genericjms:main_generic-jms-ra": WFLYJCA0046: Failed to start RA deployment [generic-jms-ra]
> at org.jboss.as.connector.services.resourceadapters.deployment.AbstractResourceAdapterDeploymentService$2.run(AbstractResourceAdapterDeploymentService.java:332)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1349)
> at java.lang.Thread.run(Thread.java:748)
> at org.jboss.threads.JBossThread.run(JBossThread.java:485)
> Caused by: org.jboss.jca.deployers.common.DeployException: IJ020056: Deployment failed: file:/tmp/wildfly-13.0.0.Alpha1-SNAPSHOT/modules/system/layers/base/org/jboss/genericjms/main/
> at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2064)
> at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService$WildFlyRaXmlDeployer.doDeploy(ResourceAdapterXmlDeploymentService.java:173)
> at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:116)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1714)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1693)
> at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1540)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalStateException
> at org.jboss.msc.value.InjectedValue.getValue(InjectedValue.java:47)
> at org.jboss.as.connector.services.resourceadapters.deployment.AbstractResourceAdapterDeploymentService$AbstractWildFlyRaDeployer.getSubjectFactory(AbstractResourceAdapterDeploymentService.java:635)
> at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1666)
> ... 10 more
> {noformat}
> Full logs for good and bad start with enabled trace logging for {{org.jboss.as.connector}}, {{org.jboss.as.security}} and {{org.jboss.security}} are attached.
> Priority set to blocker because it seems to be regression against WildFly 10 (and JBoss EAP 7.0.0) where I wasn't able to reproduce this.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list