payara / Payara

Payara Server is an open source middleware platform that supports reliable and secure deployments of Java EE (Jakarta EE) and MicroProfile applications in any environment: on premise, in the cloud or hybrid.
http://www.payara.fish
Other
883 stars 306 forks source link

Bug Report: Custom taglibs broken because old Mojarra version /FISH-8142 #6578

Open tandraschko opened 9 months ago

tandraschko commented 9 months ago

Brief Summary

Currently im working on the upcoming DeltaSpike 2.0 integration tests and 2 of them are failing because of a old mojarra version?

This is the actually fix in Mojarra: https://github.com/eclipse-ee4j/mojarra/commit/040259ec02994f89d419f0284132575757761d9b

The version used is here:

            <artifactItem>
                <groupId>fish.payara.distributions</groupId>
                <artifactId>payara</artifactId>
                <version>6.2024.2</version>
                <outputDirectory>${container.unpack.directory}</outputDirectory>
                <type>zip</type>
                <overWrite>false</overWrite>
            </artifactItem>

Expected Outcome

no exception in server.log and test works

Current Outcome

exception and startup failure:

org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5772)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:619)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:958)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:941)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1813)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1565)
    at com.sun.enterprise.web.WebApplication.start(WebApplication.java:107)
    at org.glassfish.internal.data.EngineRef.start(EngineRef.java:123)
    at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:292)
    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:361)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.initialize(ApplicationLifecycle.java:633)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:574)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:556)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:552)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/javax.security.auth.Subject.doAs(Subject.java:376)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:551)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:582)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:574)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/javax.security.auth.Subject.doAs(Subject.java:376)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:573)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1497)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1879)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1755)
    at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:272)
    at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:240)
    at org.glassfish.admin.rest.utils.ResourceUtil.runCommand(ResourceUtil.java:294)
    at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:332)
    at org.glassfish.admin.rest.resources.TemplateListOfResource.post(TemplateListOfResource.java:166)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:146)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:189)
    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:93)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:478)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:400)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81)
    at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:261)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:240)
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:697)
    at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:367)
    at org.glassfish.admin.rest.adapter.RestAdapter$2.service(RestAdapter.java:335)
    at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:189)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:520)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:217)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:174)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:153)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:196)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:88)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:246)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:178)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:118)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:96)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:51)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:510)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:82)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:83)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:101)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:535)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:515)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:247)
    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:5172)
    at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:681)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5750)
    ... 72 more
Caused by: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
    at com.sun.faces.config.manager.Documents.getXMLDocuments(Documents.java:104)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:311)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:179)
    ... 75 more
Caused by: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
    at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
    at com.sun.faces.config.manager.Documents.getXMLDocuments(Documents.java:92)
    ... 77 more
Caused by: java.lang.UnsupportedOperationException
    at java.base/java.util.AbstractList.add(AbstractList.java:153)
    at java.base/java.util.AbstractList.add(AbstractList.java:111)
    at com.sun.faces.config.configprovider.MetaInfFaceletTaglibraryConfigProvider.getResources(MetaInfFaceletTaglibraryConfigProvider.java:60)
    at com.sun.faces.config.manager.tasks.FindConfigResourceURIsTask.call(FindConfigResourceURIsTask.java:67)
    at com.sun.faces.config.manager.tasks.FindConfigResourceURIsTask.call(FindConfigResourceURIsTask.java:39)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at com.sun.faces.config.manager.Documents.getXMLDocuments(Documents.java:82)
    ... 77 more

Reproducer

clone deltaspike and build via: mvn clean package -Ppayara-build-managed

Operating System

Windows 10

JDK Version

JDK 17

Payara Distribution

Payara Server Full Profile

shub8968 commented 6 months ago

Hi @tandraschko ,

Would you be kind enough to let me know from which branch I do need to build and test it?

tandraschko commented 6 months ago

what exactly do you mean? the DeltaSpike or Mojarra branch?

If DeltaSpike, just the master of Github.

github-actions[bot] commented 6 months ago

Greetings, It's been more than 5 days since we requested more information or an update from you on the details of this issue. Could you provide an update soon, please? We're afraid that if we do not receive an update, we'll have to close this issue due to inactivity.

shub8968 commented 6 months ago

Hi @tandraschko,

We won't be able to clone the complete DeltaSpike project and test it. Can you provide a simple-to-follow scenario on how to reproduce this on the latest version? A reproducer should ideally follow the SSCCE rules: http://www.sscce.org/. It will greatly help us to find the cause and fix it

tandraschko commented 6 months ago

Sorry i dont have this time.

Its very simple to clone deltaspike and run the tests. No need to reinvent the wheel here as i also linked the PR of mojarra here.

Also see: https://github.com/eclipse-ee4j/mojarra/issues/5198

lprimak commented 6 months ago

@shub8968 You don't even need to test anything... it's just that Mojarra needs to be updated, that's all. Also, there are many more important Mojarra fixes that need to get updated in Payara anyway. This bug breaks lots of apps, so it needs to be fixed

github-actions[bot] commented 6 months ago

Greetings, It's been more than 5 days since we requested more information or an update from you on the details of this issue. Could you provide an update soon, please? We're afraid that if we do not receive an update, we'll have to close this issue due to inactivity.

tandraschko commented 6 months ago

Still an issue...

fturizo commented 6 months ago

Greetings @tandraschko,

You are correct in that the reported issue is pretty straightforward and doesn't require a SSCCE reproducer as the fix is already present in upstream Mojarra. We already have a planned upgrade/synchronization of Payara Server's Patched Mojarra implementation in the form of the internal issue FISH-8142 so this upgrade should also include this fix.

seinecle commented 1 month ago

Using payara-micro version 6.2024.10 and the issue is fixed. Thank you!