I exported a realm from an instance of keycloak 6.0.1 into a json file This was successful.
When I tried to import the data into an instance of keycloak 7.0.0 on the same machine (having stopped 6.0.1) I ad an error with regard to microfile-metrics-smallrye.
So I put that to one side. I have now tried, on a different machine, running keycloak in a container. I copied over the json data and run
~$ docker run -e KEYCLOAK_USER=admincloak -p 8080:8080 -e KEYCLOAK_PASSWORD=123456 -e “KEYCLOAK_IMPORT=/tmp/keycloak_data.json -Dkeycloak.profile.feature.upload_scripts=enabled” -v /tmp/keycloak_data.json:/tmp/keycloak_data.json jboss/keycloak
The error output is
ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (“add”) failed - address: ([(“subsystem” => “microprofile-metrics-smallrye”)]): java.lang.NullPointerException
at org.wildfly.extension.microprofile.metrics-smallrye@18.0.1.Final//org.wildfly.extension.microprofile.metrics.MicroProfileMetricsSubsystemAdd$2.execute(MicroProfileMetricsSubsystemAdd.java:86)
at org.jboss.as.controller@10.0.3.Final//org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999)
at org.jboss.as.controller@10.0.3.Final//org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:743)
at org.jboss.as.controller@10.0.3.Final//org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
at org.jboss.as.controller@10.0.3.Final//org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1413)
at org.jboss.as.controller@10.0.3.Final//org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:521)
at org.jboss.as.controller@10.0.3.Final//org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:472)
at org.jboss.as.controller@10.0.3.Final//org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:434)
at org.jboss.as.server@10.0.3.Final//org.jboss.as.server.ServerService.boot(ServerService.java:435)
at org.jboss.as.server@10.0.3.Final//org.jboss.as.server.ServerService.boot(ServerService.java:394)
at org.jboss.as.controller@10.0.3.Final//org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:374)
at java.base/java.lang.Thread.run(Thread.java:834)
I have looked at cant-import-realm-using-docker-image and importing-realm-8-0-2-docker and they were useful - I added the scripts=enabled param but I still get the microprofile.metrics.smallrye error.
Just to emphasise I am using an export from 6.0.1 to the latest container which is 9.0.2 from what I can see on the docker hub page. Is this allowed?
Just to add if I use the 6.0.1 tagged container then I get the same error.