<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_1441647142133_2784" dir="ltr">shouldn't be the same having a separated JPA project in charge of talking with our legacy database? Eventually what about entitymanager null pointer exception? do you have an idea? should the jpa project be part of an ejb project?</div><div id="yui_3_16_0_1_1441647142133_2784" dir="ltr">thanks</div> <br><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font size="2" face="Arial"> Il Lunedì 7 Settembre 2015 19:29, Scott Rossillo <srossillo@smartling.com> ha scritto:<br> </font> </div> <br><br> <div class="y_msg_container"><div id="yiv7543484492"><div>We'll publish an example of how to do this soon, but I'd recommend writing an API based provider on your legacy system instead of using a direct database connection from Keycloak. Sorry, doesn't exactly answer your question but it's a more elegant solution.<br clear="none"><div class="yiv7543484492gmail_quote"><div class="yiv7543484492yqt6489241336" id="yiv7543484492yqt44134"><div dir="ltr">On Mon, Sep 7, 2015 at 12:18 PM alex orl <<a rel="nofollow" shape="rect" ymailto="mailto:alex_orl1079@yahoo.it" target="_blank" href="mailto:alex_orl1079@yahoo.it">alex_orl1079@yahoo.it</a>> wrote:<br clear="none"></div><blockquote class="yiv7543484492gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px;"><div>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>I read that Jboss WildFly already uses Hiberante 4.3 JPA, so i choose to follow this line for my project.</div><div dir="ltr">Another requirement is to decouple the provider and the JPA model-mapping-project, so my JPA model-mapping-project has to be deployed a separated jar file.</div><div dir="ltr">Following the keycloak userguide i deploy the provider simply coping the built jar project into the .../standalone/configuration/providers directory.</div><div dir="ltr">The JPA model-mapping-project jar file is deployed into the Wildfly using the management console deployment section.</div><div dir="ltr">Now i'm facing up to 2 problems:</div><div dir="ltr">1) the user-federation-provider doesn't see the model-mapping-project classes (throwing the ClassNotFoundException)</div><div 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 dir="ltr"><br clear="none"></div><div dir="ltr">What the way i can solve this problem?</div><div dir="ltr">Is there another way to deploy providers? and what about the jar and the depecency injection?</div><div dir="ltr">Thanks</div><div dir="ltr">Regards.</div></div></div>_______________________________________________<br clear="none">
keycloak-dev mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:keycloak-dev@lists.jboss.org" target="_blank" href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="https://lists.jboss.org/mailman/listinfo/keycloak-dev">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a></blockquote></div></div></div></div><br><br></div> </div> </div> </div></div></body></html>