[midPoint] [Newsletter] Re: Migrating from 3.7.x to 3.8 with custom schema

Pavol Mederly mederly at evolveum.com
Fri Jul 6 08:40:03 CEST 2018


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:
> 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:
>> 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 <midpoint-bounces at lists.evolveum.com> On Behalf Of 
>> Wojciech Staszewski
>> Sent: Thursday, July 5, 2018 1:23 PM
>> To: midpoint at lists.evolveum.com
>> 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:
>>> 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 
>>> '{http://sample.evolveum.com/xml/ns/sample-idm/extension}rsCompany' 
>>> without definition can't be saved.
>>>
>>>           at
>>> com.evolveum.midpoint.repo.sql.helpers.ObjectUpdater.createDataObjectF
>>> romJAXB(ObjectUpdater.java:604) ~[repo-sql-impl-3.8.jar!/:na]
>>>
>>>           at
>>> com.evolveum.midpoint.repo.sql.helpers.ObjectUpdater.addObjectAttempt(
>>> ObjectUpdater.java:131) ~[repo-sql-impl-3.8.jar!/:na]
>>>
>>>           at
>>> com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.addObject(SqlR
>>> epositoryServiceImpl.java:431) ~[repo-sql-impl-3.8.jar!/:na]
>>>
>>>           at
>>> com.evolveum.midpoint.ninja.action.worker.ImportConsumerWorker.run(Imp
>>> 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(DelegatingMethodAccess
>>> 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.createDataObjectF
>>> 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 
>>> '{http://sample.evolveum.com/xml/ns/sample-idm/extension}rsCompany' 
>>> without definition can't be saved.
>>>
>>>           at
>>> com.evolveum.midpoint.repo.sql.data.common.RObject.copyFromJAXB(RObjec
>>> t.java:760) ~[repo-sql-impl-3.8.jar!/:na]
>>>
>>>           at
>>> com.evolveum.midpoint.repo.sql.data.common.RObject.copyFromJAXB(RObjec
>>> 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 
>>> '{http://sample.evolveum.com/xml/ns/sample-idm/extension}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.convertTo
>>> RValue(RAnyConverter.java:168) ~[repo-sql-impl-3.8.jar!/:na]
>>>
>>>           at
>>> com.evolveum.midpoint.repo.sql.data.common.RObject.copyFromJAXB(RObjec
>>> 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
>>> midPoint at lists.evolveum.com
>>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>>
>>
>> -- 
>> Wojciech Staszewski
>> Administrator Systemów Sieciowych
>> tel. kom: 663 680 236
>> www.diagnostyka.pl
>> 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
>> midPoint at lists.evolveum.com
>> http://lists.evolveum.com/mailman/listinfo/midpoint
>> _______________________________________________
>> midPoint mailing list
>> midPoint at lists.evolveum.com
>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint




More information about the midPoint mailing list