我使用的是嵌入在spring启动应用程序中的keydepot,我从github导入了该应用程序的代码。
我在运行应用程序时出现以下错误。我使用的是keydape11.0.2版本,您可以在下面找到依赖关系。
密钥斗篷依赖项:
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-dependencies-server-all</artifactId>
<version>${keycloak.version}</version>
<type>pom</type>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
错误:
Caused by: java.lang.IllegalArgumentException: No enum constant org.keycloak.theme.Theme.Type.ADMİN
at java.lang.Enum.valueOf(Enum.java:238) ~[na:1.8.0_231]
at org.keycloak.theme.Theme$Type.valueOf(Theme.java:31) ~[keycloak-server-spi-11.0.2.jar:11.0.2]
at org.keycloak.theme.ClasspathThemeProviderFactory.loadThemes(ClasspathThemeProviderFactory.java:109) ~[keycloak-services-11.0.2.jar:11.0.2]
... 48 common frames omitted
Caused by: org.springframework.boot.web.server.WebServerException: Servlet [httpServlet30Dispatcher] in web application [] threw load() exception
at org.springframework.boot.web.embedded.tomcat.TomcatEmbeddedContext.load(TomcatEmbeddedContext.java:87) ~[spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
Caused by: java.lang.RuntimeException: RESTEASY003325: Failed to construct public com.baeldung.auth.config.EmbeddedKeycloakApplication()
at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:164) ~[resteasy-jaxrs-3.12.1.Final.jar:3.12.1.Final]
at org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2811) ~[resteasy-jaxrs-3.12.1.Final.jar:3.12.1.Final]
at org.jboss.resteasy.spi.ResteasyDeployment.createApplication(ResteasyDeployment.java:371) ~[resteasy-jaxrs-3.12.1.Final.jar:3.12.1.Final]
at org.jboss.resteasy.spi.ResteasyDeployment.startInternal(ResteasyDeployment.java:283) ~[resteasy-jaxrs-3.12.1.Final.jar:3.12.1.Final]
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:93) ~[resteasy-jaxrs-3.12.1.Final.jar:3.12.1.Final]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:140) ~[resteasy-jaxrs-3.12.1.Final.jar:3.12.1.Final]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:42) ~[resteasy-jaxrs-3.12.1.Final.jar:3.12.1.Final]
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1134) ~[tomcat-embed-core-9.0.33.jar:9.0.33]
... 28 common frames omitted
Caused by: java.lang.NullPointerException: null
at com.baeldung.auth.config.EmbeddedKeycloakApplication.createMasterRealmAdminUser(EmbeddedKeycloakApplication.java:43) ~[classes/:na]
at com.baeldung.auth.config.EmbeddedKeycloakApplication.<init>(EmbeddedKeycloakApplication.java:36) ~[classes/:na]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_231]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_231]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_231]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_231]
at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:152) ~[resteasy-jaxrs-3.12.1.Final.jar:3.12.1.Final]
... 35 common frames omitted
暂无答案!
目前还没有任何答案,快来回答吧!