<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello Chris,</p>
    <p>yes, this is exactly the same as in that other case.</p>
    <p>Which is really strange. Please, could you tell me which
      ninja-3.7.2.jar you used to do the export?</p>
    <p>Mine - which produces correct xsi:type information - has <b
        class="">73,380,649</b> bytes, is dated <b class="">13.6.2018
        10:22</b>, and its sha1 is <b class="">
        27320463CE95EDFB40EDFC009CEBA89FAAD505AD</b>.</p>
    Just btw, it is possible to fix the export XML simply by deleting <b>xsi:type="c:ExtensionType"</b>
    string. But if you used wrong JAR, it is fairly possible that the
    export of attributes in shadows will be wrong (xsi:type is
    obligatory for their values).<br>
    <br>
    Best regards,<br>
    <pre class="moz-signature" cols="72">Pavol Mederly
Software developer
evolveum.com
</pre>
    <div class="moz-cite-prefix">On 06.07.2018 11:27, Chris Woods wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:61e1144e249d4f74886baa9a6f185801@rohde-schwarz.com">
      <pre wrap="">Hi Pavol,

yes, no problem - there are quite a few objects that can't be imported, but here's a snippet from one of the services (Radovan should recognize it ;-): btw. the attribute is rsExtensionXXX because it is supposed to represent a telephone extension - and nothing to do with schema extension :-)

<extension xmlns:gen774=<a class="moz-txt-link-rfc2396E" href="http://sample.evolveum.com/xml/ns/sample-idm/extension">"http://sample.evolveum.com/xml/ns/sample-idm/extension"</a> xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a> xsi:type="c:ExtensionType">
        <gen774:rsExtensionFirstName>Foo</gen774:rsExtensionFirstName>
        <gen774:rsExtensionLastName>Bar</gen774:rsExtensionLastName>
        <gen774:rsExtensionNumber>123</gen774:rsExtensionNumber>
        <gen774:rsExtensionDecomissioned>false</gen774:rsExtensionDecomissioned>
    </extension>

Regards,
Chris.

-----Original Message-----
From: midPoint <a class="moz-txt-link-rfc2396E" href="mailto:midpoint-bounces@lists.evolveum.com"><midpoint-bounces@lists.evolveum.com></a> On Behalf Of Pavol Mederly
Sent: Friday, July 6, 2018 8:40 AM
To: <a class="moz-txt-link-abbreviated" href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</a>
Subject: *EXT* [Newsletter] Re: [midPoint] [Newsletter] Re: Migrating from 3.7.x to 3.8 with custom schema

Hello Chris,

I have seen such an error recently. In that particular case it was probably caused by doing the export by a different version of ninja-3.7, resulting in wrong placement of xsi:type declarations in resulting XML.

Could you paste a snipped of <extension> element of an object that couldn't be imported in your case just to verify this?

Best regards,

Pavol Mederly
Software developer
evolveum.com

On 05.07.2018 14:05, Wojciech Staszewski wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Hmmm... then I have no idea how to import this data. Maybe someone 
from Evolveum should reply.
Regards!
WS

W dniu 05.07.2018 o 13:37, Chris Woods pisze:
</pre>
        <blockquote type="cite">
          <pre wrap="">Hi Wojciech,

I kept the installation directory the same (I used the upgrade.sh 
scripts from the 3.8 dist beforehand) so the schema extensions are 
still there. Originally I didn't start midpoint 3.8 before starting 
the import (there is now mention in the upgrade instructions that 
this is necessary). Even after starting midpoint and then retrying 
the import I still received the same errors.

Cheers,
Chris.

-----Original Message-----
From: midPoint <a class="moz-txt-link-rfc2396E" href="mailto:midpoint-bounces@lists.evolveum.com"><midpoint-bounces@lists.evolveum.com></a> On Behalf Of 
Wojciech Staszewski
Sent: Thursday, July 5, 2018 1:23 PM
To: <a class="moz-txt-link-abbreviated" href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</a>
Subject: *EXT* [Newsletter] Re: [midPoint] Migrating from 3.7.x to
3.8 with custom schema

Is your custom schema xml copied to the v3.8 and was MidPoint 
restarted after that?

W dniu 05.07.2018 o 12:22, Chris Woods pisze:
</pre>
          <blockquote type="cite">
            <pre wrap="">Hi!

I am currently trying to migrate our 3.7.2 installation (PoC) to 
3.8. The export worked fine (after realizing I also needed to use –U 
with the jdbc url,not just the –j option for the jdbc driver). I 
also have my backup.zip containing all the objects – these were 
backed up from our existing MySQL 5.6 database.

I am, however, restoring to a fresh MySQL v8.0 database (used the
3.8 create script to create the tables). The only problem seems to 
be with objects that have a value in an attribute from our custom 
schema – ninja skips those objects with the following Exception(s):

com.evolveum.midpoint.util.exception.SchemaException: Item 
'{<a class="moz-txt-link-freetext" href="http://sample.evolveum.com/xml/ns/sample-idm/extension">http://sample.evolveum.com/xml/ns/sample-idm/extension</a>}rsCompany'
without definition can't be saved.

          at
com.evolveum.midpoint.repo.sql.helpers.ObjectUpdater.createDataObjec
tF
romJAXB(ObjectUpdater.java:604) ~[repo-sql-impl-3.8.jar!/:na]

          at
com.evolveum.midpoint.repo.sql.helpers.ObjectUpdater.addObjectAttemp
t(
ObjectUpdater.java:131) ~[repo-sql-impl-3.8.jar!/:na]

          at
com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.addObject(Sq
lR
epositoryServiceImpl.java:431) ~[repo-sql-impl-3.8.jar!/:na]

          at
com.evolveum.midpoint.ninja.action.worker.ImportConsumerWorker.run(I
mp
ortConsumerWorker.java:65) ~[classes!/:na]

          at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor
.j
ava:1142) [na:1.8.0_131]

          at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
java:617) [na:1.8.0_131]

          at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]

Caused by: java.lang.reflect.InvocationTargetException: null

          at sun.reflect.GeneratedMethodAccessor309.invoke(Unknown
Source) ~[na:na]

          at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
ss
orImpl.java:43) ~[na:1.8.0_131]

          at java.lang.reflect.Method.invoke(Method.java:498)
~[na:1.8.0_131]

          at
com.evolveum.midpoint.repo.sql.helpers.ObjectUpdater.createDataObjec
tF
romJAXB(ObjectUpdater.java:594) ~[repo-sql-impl-3.8.jar!/:na]

          ... 6 common frames omitted

Caused by: 
com.evolveum.midpoint.repo.sql.util.DtoTranslationException: Item 
'{<a class="moz-txt-link-freetext" href="http://sample.evolveum.com/xml/ns/sample-idm/extension">http://sample.evolveum.com/xml/ns/sample-idm/extension</a>}rsCompany'
without definition can't be saved.

          at
com.evolveum.midpoint.repo.sql.data.common.RObject.copyFromJAXB(RObj
ec
t.java:760) ~[repo-sql-impl-3.8.jar!/:na]

          at
com.evolveum.midpoint.repo.sql.data.common.RObject.copyFromJAXB(RObj
ec
t.java:726) ~[repo-sql-impl-3.8.jar!/:na]

          at
com.evolveum.midpoint.repo.sql.data.common.RFocus.copyFromJAXB(RFocus.
java:312) ~[repo-sql-impl-3.8.jar!/:na]

          at
com.evolveum.midpoint.repo.sql.data.common.RUser.copyFromJAXB(RUser.
ja
va:248) ~[repo-sql-impl-3.8.jar!/:na]

          ... 10 common frames omitted

Caused by: java.lang.IllegalArgumentException: Item 
'{<a class="moz-txt-link-freetext" href="http://sample.evolveum.com/xml/ns/sample-idm/extension">http://sample.evolveum.com/xml/ns/sample-idm/extension</a>}rsCompany'
without definition can't be saved.

          at
org.apache.commons.lang.Validate.notNull(Validate.java:192)
~[commons-lang-2.6.jar!/:2.6]

          at
com.evolveum.midpoint.repo.sql.data.common.any.RAnyConverter.convert
To
RValue(RAnyConverter.java:168) ~[repo-sql-impl-3.8.jar!/:na]

          at
com.evolveum.midpoint.repo.sql.data.common.RObject.copyFromJAXB(RObj
ec
t.java:752) ~[repo-sql-impl-3.8.jar!/:na]

          ... 13 common frames omitted

Does anyone know what I’m doing wrong?

Regards,

Chris.



_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>

</pre>
          </blockquote>
          <pre wrap="">
--
Wojciech Staszewski
Administrator Systemów Sieciowych
tel. kom: 663 680 236
<a class="moz-txt-link-abbreviated" href="http://www.diagnostyka.pl">www.diagnostyka.pl</a>
Diagnostyka Sp. z o. o.
ul. Prof. M. Życzkowskiego 16, 31-864 Kraków Numer KRS: 0000381559 
(Sąd Rejonowy dla Krakowa-Śródmieścia w Krakowie, XI Wydział 
Gospodarczy KRS)
NIP: 675-12-65-009; REGON: 356366975
Kapitał zakładowy: 33 756 500 zł.

Pomyśl o środowisku zanim wydrukujesz ten e-mail.
_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>

</pre>
        </blockquote>
        <pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
      </blockquote>
      <pre wrap="">
_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>