After upgrade Keycloak 17 with quarkus, EJB inject not working

Hi all,

we just try upgrade keycloak to 17 with quarkus

we unfortunately found our customized provider not working, we have provider like:


public class CustomizedPasswordHashProviderFactory implements PasswordHashProviderFactory
{

...
public PasswordHashProvider create(KeycloakSession session)
	{
		try
		{
			InitialContext ctx = new InitialContext();
			return (HktvPasswordHashProvider) ctx.lookup("java:global/" + Constants.PROVIDER_JAR_NAME + "/" + CustomizedPasswordHashProviderFactory .class);
		}

and when server start, below exception throw and crash the startup

Error in creating PasswordHashProvider: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or in an application resource file: java.naming.factory.initial
  at java.naming/javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:702)
  at java.naming/javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
   at java.naming/javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:342)
...

Our provide will have use hibernate to connect to our another datasource so we follow
i guess this is due to EJB context not correctly load or Initialized (something like that, i am not familiar with EJB context) in quarkus?
May i konw any encounter that problem and any advise how to solve?
We previousely follow this to implement Server Developer Guide.
And build keycloak in docker container

It’s mentioned in the upgrade docs that there are no more Java/Jakarta EE APIs available starting with Quarkus-based Keycloak.