[keycloak-user] Provider + Entity SPI + hot redeploy = exception

Dmitry Telegin mitya at cargosoft.ru
Thu Jul 20 13:48:53 EDT 2017


Hi,

I've got a provider using Entity SPI. If I hot redeploy it, I've got
the following exception upon the first access to my custom entity:

20:37:54,227 ERROR [io.undertow.request] (default task-10) UT005023:
Exception handling request to /auth/realms/master/beer:
org.jboss.resteasy.spi.UnhandledException:
org.keycloak.models.ModelException: java.lang.IllegalArgumentException:
Type specified for TypedQuery
[beercloak.models.jpa.entities.BeerEntity] is incompatible with query
return type [class beercloak.models.jpa.entities.BeerEntity]

Full stacktrace: https://pastebin.com/i6jXfQMY

Seems like upon redeployment JPA entity classes are not unloaded, and
Hibernate keeps using them, while the reloaded provider code uses newly
loaded classes. Is there anything we can do about it?

Dmitry


More information about the keycloak-user mailing list