[keycloak-user] Error upgrading database, 1.2.0.Final to 1.6.1.Final

Stian Thorgersen sthorger at redhat.com
Tue Nov 24 14:18:38 EST 2015


If you can create a realm export or provides us to step to reproduce the
issue then we could look into it. Otherwise it's pretty difficult for us to
reproduce.

On 24 November 2015 at 17:26, Travis Masselink <tmasselink at selcouth.org>
wrote:

> I had been playing with the admin api as I was trying to script
> realm/client creation. So I deleted the one realm that was there that I had
> created that way. I also deleted one user that had a duplicate email
> address. Now I just upgraded from 1.2 -> 1.5 -> 1.6.1.
>
> I was going to connect a debugger, set some break points and figure out
> exactly where it was failing today but as I don't have a lot of time on my
> hands I'm grateful for the help. Thanks!
>
> On Tue, Nov 24, 2015 at 6:15 AM, Hipfinger Martin (BCC.EXTERN) <
> Martin.Hipfinger at oebb.at> wrote:
>
>> Hi,
>>
>>
>>
>> with 1.2 username and e-mail wasn’t converted to lowercase & newer
>> versions introduce a constraint on those two fields to enforce uniqueness –
>> did you check for duplicate values upfront?
>>
>>
>>
>> br,
>>
>> martin
>>
>>
>>
>> *Von:* keycloak-user-bounces at lists.jboss.org [mailto:
>> keycloak-user-bounces at lists.jboss.org] *Im Auftrag von *Travis Masselink
>> *Gesendet:* Samstag, 21. November 2015 00:27
>> *An:* Lohitha Chiranjeewa <kalc04 at gmail.com>
>> *Cc:* keycloak-user at lists.jboss.org
>> *Betreff:* Re: [keycloak-user] Error upgrading database, 1.2.0.Final to
>> 1.6.1.Final
>>
>>
>>
>> That didn't work for me. I Tried 1.2 -> 1.5, 1.2 -> 1.4 and then 1.2 ->
>> 1.3.1 (success) -> 1.4. But all failed. I then cloned the project and built
>> 1.7 and tried 1.2 -> 1.7. This also failed. In all cases it looks like 1.4
>> is the problem as this is the exception I get with all versions but 1.3.1:
>>
>>
>>
>> 6:10:43,401 ERROR [org.keycloak.services.resources.KeycloakApplication]
>> (ServerService Thread Pool -- 62) Failed to migrate datamodel:
>> java.lang.NullPointerException
>>
>>             at
>> org.keycloak.models.ImpersonationConstants.setupMasterRealmRole(ImpersonationConstants.java:26)
>>
>>             at
>> org.keycloak.models.ImpersonationConstants.setupImpersonationService(ImpersonationConstants.java:47)
>>
>>             at org.keycloak.migration.migrators.*MigrateTo1_4_0*
>> .migrate(MigrateTo1_4_0.java:30)
>>
>>
>>
>> On Tue, Nov 17, 2015 at 12:39 AM, Lohitha Chiranjeewa <kalc04 at gmail.com>
>> wrote:
>>
>> Had the exact problem a few moments ago, thanks for clarifying.
>>
>> Regards,
>>
>> Lohitha.
>>
>>
>>
>> On Tue, Nov 17, 2015 at 12:48 AM, Felipe Braun Azambuja <
>> felipe.braun at intelbras.com.br> wrote:
>>
>> Great! Thanks for the quick reply. Upgraded now :)
>>
>> Il 16/11/2015 16:13, Stian Thorgersen ha scritto:
>> > Hi,
>> >
>> > There's an issue with upgrading to 1.6 from 1.2. It will be fixed in
>> > 1.7, but you can bypass the issue by first upgrading to 1.5 then to 1.6
>> >
>> > On 16 November 2015 at 18:13, Felipe Braun Azambuja
>> > <felipe.braun at intelbras.com.br <mailto:felipe.braun at intelbras.com.br>>
>>
>> > wrote:
>> >
>> >     Hey all,
>> >
>> >     I'm trying to upgrade Keycloak in our test instance, but I'm
>> getting a
>> >     really generic error while trying to start the service:
>> >
>> >     15:09:35,559 INFO
>> >     [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory]
>> >     (ServerService Thread Pool -- 60) HHH000397: Using
>> >     ASTQueryTranslatorFactory
>> >     15:09:35,594 INFO  [org.hibernate.validator.internal.util.Version]
>> >     (ServerService Thread Pool -- 60) HV000001: Hibernate Validator
>> >     5.1.3.Final
>> >     15:09:38,643 ERROR
>> [org.keycloak.services.resources.KeycloakApplication]
>> >     (ServerService Thread Pool -- 60) Failed to migrate datamodel:
>> >     java.lang.NullPointerException
>> >               at
>> >
>>  org.keycloak.migration.migrators.MigrateTo1_6_0.migrate(MigrateTo1_6_0.java:81)
>> >               at
>> >
>>  org.keycloak.migration.MigrationModelManager.migrate(MigrationModelManager.java:55)
>> >               at
>> >
>>  org.keycloak.services.resources.KeycloakApplication.migrateModel(KeycloakApplication.java:101)
>> >               at
>> >
>>  org.keycloak.services.resources.KeycloakApplication.<init>(KeycloakApplication.java:86)
>> >               at
>> >     sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>> >     (...)
>> >
>> >     Is there any way to increase logging level on the migration part, so
>> >     that I can try and understand where's the problem with our database?
>> >
>> >
>> >     Thanks!
>> >     --
>> >     Felipe Braun Azambuja
>> >     DBA
>> >     Tecnologia da Informação e Comunicação
>> >     (48) 3281 9577
>>
>> >     felipe.braun at intelbras.com.br <mailto:felipe.braun at intelbras.com.br
>> >
>> >     Esta mensagem, incluindo seus anexos, contém informações protegidas
>> >     por lei, sujeitas a privilégios e/ou confidencialidades, não podendo
>> >     ser retransmitida, arquivada, divulgada ou copiada sem autorização
>> >     do remetente. O remetente utiliza o correio eletrônico no exercício
>> >     do seu trabalho ou em razão dele, eximindo esta instituição de
>> >     qualquer responsabilidade por utilização indevida. Caso tenha
>> >     recebido esta mensagem por engano, por favor informe o remetente
>> >     respondendo imediatamente a este e-mail, e em seguida apague-a do
>> >     seu computador.
>> >
>> >     The information contained in this e-mail and its attachments are
>> >     protected by law, subjected to privilege and/or confidentiality and
>> >     cannot be retransmitted, filed, disclosed or copied without
>> >     authorization from the sender. The sender uses the electronic mail
>> >     in the exercise of his/her work or by virtue thereof, and the
>> >     institution accepts no liability from its undue use. If you have
>> >     received this message by mistake, please notify us immediately by
>> >     returning the e-mail and deleting this message from your system.
>> >
>> >     _______________________________________________
>> >     keycloak-user mailing list
>> >     keycloak-user at lists.jboss.org <mailto:keycloak-user at lists.jboss.org
>> >
>> >     https://lists.jboss.org/mailman/listinfo/keycloak-user
>>
>> >
>> >
>>
>> --
>> Felipe Braun Azambuja
>> DBA
>> Tecnologia da Informação e Comunicação
>> (48) 3281 9577
>> felipe.braun at intelbras.com.br
>> Esta mensagem, incluindo seus anexos, contém informações protegidas por
>> lei, sujeitas a privilégios e/ou confidencialidades, não podendo ser
>> retransmitida, arquivada, divulgada ou copiada sem autorização do
>> remetente. O remetente utiliza o correio eletrônico no exercício do seu
>> trabalho ou em razão dele, eximindo esta instituição de qualquer
>> responsabilidade por utilização indevida. Caso tenha recebido esta mensagem
>> por engano, por favor informe o remetente respondendo imediatamente a este
>> e-mail, e em seguida apague-a do seu computador.
>>
>> The information contained in this e-mail and its attachments are
>> protected by law, subjected to privilege and/or confidentiality and cannot
>> be retransmitted, filed, disclosed or copied without authorization from the
>> sender. The sender uses the electronic mail in the exercise of his/her work
>> or by virtue thereof, and the institution accepts no liability from its
>> undue use. If you have received this message by mistake, please notify us
>> immediately by returning the e-mail and deleting this message from your
>> system.
>>
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>
>>
>>
>>
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>
>>
>>
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20151124/432ed76d/attachment-0001.html 


More information about the keycloak-user mailing list