[Red Hat JIRA] (WFLY-14253) Deployment error caused by missing java.security.acl.Group on Java 15
by Steve Brooksbank (Jira)
Steve Brooksbank created WFLY-14253:
---------------------------------------
Summary: Deployment error caused by missing java.security.acl.Group on Java 15
Key: WFLY-14253
URL: https://issues.redhat.com/browse/WFLY-14253
Project: WildFly
Issue Type: Bug
Components: CDI / Weld, EE
Affects Versions: 21.0.1.Final
Reporter: Steve Brooksbank
Assignee: Matěj Novotný
I'm getting the following error when trying to deploy a simple application that includes Container-based authentication based on the EE8 Security functionality, when WiIldfly is running on Java 15 VM:
{code:java}
23:28:59,162 INFO [org.glassfish.soteria.cdi.CdiExtension] (MSC service thread 1-5) Activating javax.security.enterprise.authentication.mechanism.http.CustomFormAuthenticationMechanismDefinition authentication mechanism from com.brooksbank.weldexamples.security.ApplicationConfig class
23:28:59,822 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."weldExamples-1.0.war".undertow-deployment.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.deployment.unit."weldExamples-1.0.war".undertow-deployment.UndertowDeploymentInfoService: Failed to start service
at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1731)
at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.NoClassDefFoundError: java/security/acl/Group
at org.wildfly.extension.undertow@21.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.handleJASPIMechanism(UndertowDeploymentInfoService.java:475)
at org.wildfly.extension.undertow@21.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:284)
at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
... 6 more
Caused by: java.lang.ClassNotFoundException: java.security.acl.Group from [Module "org.wildfly.extension.undertow" version 21.0.1.Final from local module loader @6187d1f5 (finder: local module finder @2445445a (roots: C:\Wildfly\wildfly-21.0.1.Final\modules,C:\Wildfly\wildfly-21.0.1.Final\modules\system\layers\base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
... 10 more{code}
The problem DOESN'T occur if Wildfly is running on Java 11 VM.
The issue appears to be indirectly related to https://issues.redhat.com/browse/WFCORE-4592 as the ACL module was removed from Java14, but still seems to be needed.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
4 years, 4 months
[Red Hat JIRA] (WFLY-13051) provide setRemoveOnCancelPolicy on ManagedScheduledExecutorService
by nimo stephan (Jira)
[ https://issues.redhat.com/browse/WFLY-13051?page=com.atlassian.jira.plugi... ]
nimo stephan commented on WFLY-13051:
-------------------------------------
Ok I had time to dig into this: The *ManagedScheduledExecutorService ex* can be indeed cancelled:
{code:java}
ex.cancel(false);{code}
So this works as expected.
By the way, what currently is not supported by the the *ManagedScheduledExecutorService (*which is an instance of *ScheduledExecutorService)* are the follwoing inherited method:
{code:java}
// Those methods are not supported by ManagedScheduledExecutorService and will throw an Exception
ex.shutdownNow();
ex.shutdown();
ex.isShutdown();{code}
Having this:
{code:java}
if(scheduler instanceof ScheduledExecutorService) {
log.info("scheduler instanceof ScheduledExecutorService = true");
// throws Exceptions
log.infov("scheduler.isShutdown() = {0}", scheduler.isShutdown());
ScheduledExecutorService impl = (ScheduledExecutorService) scheduler;
// impl.shutdown(); // cannot use this on JEE Envirnoment
}{code}
Throws this:
{code:java}
FLYEE0110: Failed to run scheduled task: java.lang.IllegalStateException: Lifecycle operation not supported
at org.glassfish.javax.enterprise.concurrent
//org.glassfish.enterprise.concurrent.AbstractManagedExecutorServiceAdapter.isShutdown(AbstractManagedExecutorServiceAdapter.java:45)
{code}
> provide setRemoveOnCancelPolicy on ManagedScheduledExecutorService
> ------------------------------------------------------------------
>
> Key: WFLY-13051
> URL: https://issues.redhat.com/browse/WFLY-13051
> Project: WildFly
> Issue Type: Enhancement
> Components: Concurrency Utilities
> Affects Versions: 19.0.0.Beta1
> Reporter: nimo stephan
> Assignee: Eduardo Martins
> Priority: Major
>
> Using
> {code:java}
> @Resource
> private ManagedScheduledExecutorService executor;
> {code}
> provides no possiblity to setRemoveOnCancelPolicy to true.
> A casting within a method:
> {code:java}
> ((ScheduledThreadPoolExecutor) executor).setRemoveOnCancelPolicy(true);
> {code}
> throws the error:
> {code:java}
> Caused by: javax.ejb.EJBException: java.lang.ClassCastException: class org.glassfish.enterprise.concurrent.ManagedScheduledExecutorServiceAdapter cannot be cast to class java.util.concurrent.ScheduledThreadPoolExecutor (org.glassfish.enterprise.concurrent.ManagedScheduledExecutorServiceAdapter is in unnamed module of loader 'org.glassfish.javax.enterprise.concurrent' @a93b7af; java.util.concurrent.ScheduledThreadPoolExecutor is in module java.base of loader 'bootstrap')
> at org.jboss.as.ejb3@17.0.1.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:246)
> at org.jboss.as.ejb3@17.0.1.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:388)
> at org.jboss.as.ejb3@17.0.1.Final//org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:68)
> {code}
> Please provide option to cast or if not possible to add the property
> {code:java}
> setRemoveOnCancelPolicy()
> {code}
> within the object ManagedScheduledExecutorService. Because without it, we cannot remove a task from the queue with "future.cancel(false)".
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
4 years, 4 months