[Red Hat JIRA] (WFLY-13051) provide setRemoveOnCancelPolicy on ManagedScheduledExecutorService
by Eduardo Martins (Jira)
[ https://issues.redhat.com/browse/WFLY-13051?page=com.atlassian.jira.plugi... ]
Eduardo Martins commented on WFLY-13051:
----------------------------------------
[~nimo22] That's correct and required by the EE Concurrency specification, the executor lifecycle methods are not to be used by apps, and should throw such exception.
> 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, 8 months
[Red Hat JIRA] (WFCORE-5233) Galleon source needed by 'dependent' feature packs is not properly organized
by Brian Stansberry (Jira)
Brian Stansberry created WFCORE-5233:
----------------------------------------
Summary: Galleon source needed by 'dependent' feature packs is not properly organized
Key: WFCORE-5233
URL: https://issues.redhat.com/browse/WFCORE-5233
Project: WildFly Core
Issue Type: Bug
Components: Build System
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Fix For: 14.0.0.Beta5
We want users of WildFly Core to be able to utilize the Galleon source code it provides without having to have their feature pack depend on org.wildlfy.core:wildfly-core-galleon-pack. This means we want any code that is meant for re-use to not be provided via the core-feature-pack/galleon-feature-pack maven module. The source in that module should only be for things that must be used via dependency on the feature pack it builds.
If any of these items are not wanted for the longer term, create a galleon-pruned module for them.
Also, source elements that might be (really that have been) 'extended' by other feature packs by means of providing a file with the same name should be renamed in core to a name that starts with 'core-'. The 'extensions' can then work by incorporating 'core-xxx'. This last point is primarily about 'basic-profile'.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
4 years, 8 months
[Red Hat JIRA] (WFLY-14253) Deployment error caused by missing java.security.acl.Group on Java 15
by Steve Brooksbank (Jira)
[ https://issues.redhat.com/browse/WFLY-14253?page=com.atlassian.jira.plugi... ]
Steve Brooksbank updated WFLY-14253:
------------------------------------
Attachment: SecurityTestWildfly.zip
Steps to Reproduce:
[^SecurityTestWildfly.zip]
^Reproducer (Netbeans/Maven) - including deployable WAR - Valid userID's/passwords are Steve/Steve and Sara/Sara.^
It basically follows this tutorial:
[https://rieckpil.de/howto-simple-form-based-authentication-for-jsf-2-3-wi...]
Note that on the login form, the command buttom should have AJAX disabled - e.g.:
{code:java}
<p:commandButton value="Login" icon="fa fa-sign-in"
style="margin: 0 auto;"
action="#{loginController.login}"
update="@form" ajax="false" />{code}
was:
Follow this tutorial:
[https://rieckpil.de/howto-simple-form-based-authentication-for-jsf-2-3-wi...]
Note that on the login form, the command buttom should have AJAX disabled - e.g.:
{code:java}
<p:commandButton value="Login" icon="fa fa-sign-in"
style="margin: 0 auto;"
action="#{loginController.login}"
update="@form" ajax="false" />{code}
> 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ý
> Priority: Major
> Attachments: SecurityTestWildfly.zip
>
>
> 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, 8 months
[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, 8 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, 8 months