Melloware created MYFACES-4446:
----------------------------------
Summary: ViewScopeBeanHolder register for Quarkus native image
Key: MYFACES-4446
URL: https://issues.apache.org/jira/browse/MYFACES-4446
Project: MyFaces Core
Issue Type: Improvement
Components: Extension Feature
Affects Versions: 2.3-next-M8, 4.0.0-RC2
Reporter: Melloware
Because *ViewScopeBeanHolder* has a *`private static final Random
RANDOM_GENERATOR = new Random();`* for creating GraalVm native images this
class must be registered as a special native runtime initialization class.
{noformat}
Caused by: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError:
com.oracle.graal.pointsto.constraints.UnsupportedFeatureException:
Detected an instance of Random/SplittableRandom class in the image heap.
Instances created during image generation have cached seed values and don't
behave as expected. To see how this object got instantiated use
--trace-object-instantiation=java.util.Random. The object was probably created
by a class initializer and is reachable from a static field. You can request
class initialization at image runtime by using the option
--initialize-at-run-time=<class-name>.
Or you can write your own initialization methods and call them explicitly from
your main entry point.
at parsing
org.apache.myfaces.cdi.view.ViewScopeBeanHolder.generateUniqueViewScopeId(ViewScopeBeanHolder.java:222)
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)