<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Could you send me the JSON with your
rep? I will try in my environment. Btv. which keycloak version are
you using?<br>
<br>
Thanks,<br>
Marek<br>
<br>
On 01/09/15 09:37, Nangunoori, Srinivas wrote:<br>
</div>
<blockquote
cite="mid:8FD052C8E2EC9B40B07B148AF2E1E77A39EDFF78@G9W0758.americas.hpqcorp.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Courier New \;color\:black";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">There are no
errors in server logs,
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">07:32:58,073
INFO
[org.keycloak.exportimport.singlefile.SingleFileImportProvider]
(ServerService Thread Pool -- 62) Full importing from file
/opt/jboss/keycloak/paas.json<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">07:33:01,517
INFO [org.keycloak.exportimport.util.ImportUtils]
(ServerService Thread Pool -- 62) Realm 'Test2' imported<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">07:33:01,531
INFO [org.keycloak.exportimport.ExportImportManager]
(ServerService Thread Pool -- 62) Import finished
successfully<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Test2 is last
realm entry in my paas.json file. Here Test1 was not
imported.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">JSON has
following entries.,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">[ {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> "realm" :
"Test1",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> -----<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">}, {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> "realm" :
"Test2",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> -----<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">}]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">-Srini<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
style="color:windowtext"> Marek Posolda
[<a class="moz-txt-link-freetext" href="mailto:mposolda@redhat.com">mailto:mposolda@redhat.com</a>]
<br>
<b>Sent:</b> Monday, August 31, 2015 8:30 PM<br>
<b>To:</b> Nangunoori, Srinivas;
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<b>Subject:</b> Re: [keycloak-user] Query regarding
import multiple realms through single json file<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Is there something in server log when you
start the server? Especially look at logged lines from
"ExportImportManager" and "ImportUtils" categories.<br>
<br>
Could you also try to use absolute path for the file (just
for sure?). You used "paas.json", but later you mentioned
"pass.json", but I believe this is just typo in email rather
than bad file path?<br>
<br>
Marek<br>
<br>
On 31/08/15 15:16, Nangunoori, Srinivas wrote:<span
style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi Experts,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I am trying to import multiple relams
info through single json file using following command, here
pass.json has multiple realm info. But, only last realm is
getting imported in keycloak<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:13.5pt;font-family:"Courier New
;color:black",serif">bin/standalone.sh -c
standalone-ha.xml -b=<server name>
-bmanagement=<server name>
-Djboss.node.name=<server name>
-Dkeycloak.migration.action=import
-Dkeycloak.migration.provider=singleFile
-Dkeycloak.migration.file=paas.json</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:13.5pt;font-family:"Courier New
;color:black",serif"> </span><o:p></o:p></p>
<p class="MsoNormal">Here pass.json has multiple realm info.
But, only last realm is getting imported in keycloak.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">JSON has info.,<o:p></o:p></p>
<p class="MsoNormal">[<o:p></o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal"> "realm" : "Test1",<o:p></o:p></p>
<p class="MsoNormal"> -----<o:p></o:p></p>
<p class="MsoNormal">},<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal"> "realm" : "Test2",<o:p></o:p></p>
<p class="MsoNormal"> -----<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal">]<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">In this case, always “Test2” is getting
imported not the “Test1”.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Srini<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>keycloak-user mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><o:p> </o:p></span></p>
</div>
</blockquote>
<br>
</body>
</html>