[keycloak-user] Uncaught server error: java.lang.NoClassDefFoundError: org/keycloak/services/validation/Validation

Bo.Y at dell.com Bo.Y at dell.com
Tue Jul 23 05:07:19 EDT 2019


Hi, Did any one has any ideas?
From: Yang, Bo
Sent: Friday, July 19, 2019 10:57 AM
To: 'Vlasta Ramik'; keycloak-user at lists.jboss.org
Subject: RE: [keycloak-user] Uncaught server error: java.lang.NoClassDefFoundError: org/keycloak/services/validation/Validation

Hi Vlasta,
I think I have had them in "jboss-deployment-structure"

[/opt/jboss/keycloak/modules/system/layers/keycloak/org/keycloak/keycloak-server-subsystem/main/server-war/WEB-INF/ jboss-deployment-structure]
<jboss-deployment-structure>
    <deployment>
        <dependencies>
            <module name="org.keycloak.keycloak-server-subsystem.dependencies"/>
            <!-- Kie requires access to kie.conf files from META-INF -->
            <module name="org.kie">
                <imports>
                    <include path="META-INF"/>
                </imports>
            </module>
        </dependencies>
        <exclude-subsystems>
            <subsystem name="webservices"/>
            <subsystem name="weld"/>
        </exclude-subsystems>
   </deployment>
</jboss-deployment-structure>

[/opt/jboss/keycloak/modules/system/layers/keycloak/org/keycloak/keycloak-server-subsystem/dependencies/main/module.xml]
<module name="org.keycloak.keycloak-server-subsystem.dependencies" xmlns="urn:jboss:module:1.1">
    <resources>
    </resources>

    <dependencies>
        <module name="org.keycloak.keycloak-services" export="true"/>
        <module name="org.jboss.msc"/>
        <module name="org.infinispan" export="true"/>
    </dependencies>
</module>

Thanks,
Bo
From: Vlasta Ramik <vramik at redhat.com<mailto:vramik at redhat.com>>
Sent: Thursday, July 18, 2019 7:28 PM
To: Yang, Bo; keycloak-user at lists.jboss.org<mailto:keycloak-user at lists.jboss.org>
Subject: Re: [keycloak-user] Uncaught server error: java.lang.NoClassDefFoundError: org/keycloak/services/validation/Validation


[EXTERNAL EMAIL]

Hey,

I think you could try to add dependency to the keycloak-services, see https://docs.jboss.org/author/display/WFLY/Class+Loading+in+WildFly section JBoss Deployment Structure File.

V.
On 7/18/19 12:59 PM, Bo.Y at dell.com<mailto:Bo.Y at dell.com> wrote:

Hi Experts,



When I follow https://www.keycloak.org/docs/latest/server_development/index.html#packaging-the-action step by step to do customize the validation in keycloak. After I throw my jar into standalone/deployment, it creates a deployed file and the log shows the jar is deployed.  I can found my execution in keycloak admin console which shows in the screen shot below. But when it comes to register page, after I click register button with my filled content I got exception in keycloak log file. I also checked `standalone.xml` and `jboss-deployment-structure.xml` which seems fine too which means it include "keycloak-services-4.7.0.Final.jar". I don't find any useful information in the search. So could anyone help to have a look please?



Keycloak  version:

    compile group: 'org.keycloak', name: 'keycloak-core', version: '4.7.0.Final'

    compile group: 'org.keycloak', name: 'keycloak-server-spi', version: '4.7.0.Final'

    compile group: 'org.keycloak', name: 'keycloak-server-spi-private', version: '4.7.0.Final'

    compile group: 'org.keycloak', name: 'keycloak-services', version: '4.7.0.Final'



[Screen Shot]

[cid:image003.jpg at 01D53D9A.DBB94DF0]



[Exception]

09:04:01,128 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-35) Uncaught server error: java.lang.NoClassDefFoundError: org/keycloak/services/validation/Validation

               at com.xxxxxx.registerformcustom.validate(registerformcustom.java:51)

               at org.keycloak.authentication.FormAuthenticationFlow.processAction(FormAuthenticationFlow.java:214)

               at org.keycloak.authentication.DefaultAuthenticationFlow.processAction(DefaultAuthenticationFlow.java:97)

               at org.keycloak.authentication.AuthenticationProcessor.authenticationAction(AuthenticationProcessor.java:873)

               at org.keycloak.services.resources.LoginActionsService.processFlow(LoginActionsService.java:292)

               at org.keycloak.services.resources.LoginActionsService.processRegistration(LoginActionsService.java:627)

               at org.keycloak.services.resources.LoginActionsService.registerRequest(LoginActionsService.java:681)

               at org.keycloak.services.resources.LoginActionsService.processRegister(LoginActionsService.java:661)

               at sun.reflect.GeneratedMethodAccessor1030.invoke(Unknown Source)

               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegati










_______________________________________________

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


More information about the keycloak-user mailing list