<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_1_1441641487373_2947">I'm developing a keycloak user-federation-provider and i need to integrate it with the JPA persistence system in order to write on my legacy db and on the keycloak db.</div><div id="yui_3_16_0_1_1441641487373_2947">I read that Jboss WildFly already uses Hiberante 4.3 JPA, so i choose to follow this line for my project.</div><div id="yui_3_16_0_1_1441641487373_2947" dir="ltr">Another requirement is to decouple the provider and the JPA model-mapping-project, so &nbsp;my JPA model-mapping-project has to be deployed a separated jar file.</div><div id="yui_3_16_0_1_1441641487373_2947" dir="ltr">Following the keycloak userguide i deploy the provider simply coping &nbsp;the built jar project into the .../standalone/configuration/providers directory.</div><div id="yui_3_16_0_1_1441641487373_2947" dir="ltr">The JPA model-mapping-project jar file is deployed into the Wildfly using the management console deployment section.</div><div id="yui_3_16_0_1_1441641487373_2947" dir="ltr">Now i'm facing up to 2 problems:</div><div id="yui_3_16_0_1_1441641487373_2947" dir="ltr">1) the user-federation-provider doesn't see the model-mapping-project &nbsp;classes (throwing the ClassNotFoundException)</div><div id="yui_3_16_0_1_1441641487373_2947" dir="ltr">2) if i simply copy the model-mapping-project.jar into the /standalone/configuration/providers directory, the fereration provider sees the classes but the EntityManager dependency injection does not work (NullPointerException)</div><div id="yui_3_16_0_1_1441641487373_2947" dir="ltr"><br></div><div id="yui_3_16_0_1_1441641487373_2947" dir="ltr">What the way i can solve this problem?</div><div id="yui_3_16_0_1_1441641487373_2947" dir="ltr">Is there another way to deploy providers? and what about the jar and the depecency injection?</div><div id="yui_3_16_0_1_1441641487373_2947" dir="ltr">Thanks</div><div id="yui_3_16_0_1_1441641487373_2947" dir="ltr">Regards.</div></div></body></html>