[keycloak-user] Receive "NoClassDefFoundError" during *deployment* not at _runtime_ with/by java class derivation.

Christian Kayssner Christian.Kayssner at muthpartners.de
Wed Sep 20 13:05:45 EDT 2017


Hallo,

I would extend a keycloak core class 'org.keycloak.authentication.authenticators.browser.UsernamePasswordFormFactory'. The idea was, to get an additional field in the first form.

For the first tests, I changes the shipped providers/authentication example.

The derivation factory class become the name 'org.example.derivations.MyUsernamePasswordFormFactory'.

I checked the java visibilities (Nothing protected or private or final).
The core class reside in the artefactId 'keycloak-services', and the pom file has a direct dependency entry.
Eclipse (the maven-plugin) is satisfied. 

But if I deploy the example, I get a 'NoClassDefFoundError' exception.


The base is the 'https://downloads.jboss.org/keycloak/3.2.1.Final/keycloak-demo-3.2.1.Final.tar.gz' archive.

For comprehending, you will:
a)	display my colored logfile (cat ./keycloak-demo-3.2.1.Final.log) from the attachment, or (for see yourself) you

b)	need:
	1.	a current linux system with network name resolution, *working* maven and _without_ running keycloak/wildfly service,
	2.	a directory of your own choice to hold all necessary files (space about 410MB),
	3.	the above mentioned keycloak archive,
	4.	and the unpacked attachment.

	Then you have to open two terminals, go in both to your chosen directory,  and:
	*	start in the first terminal the preparing/patching step: ./01.patch.it
		This bash-script
		o	remove the (last) ruins (for the second and more run(s)),
		o	provide the original keycloak environment,
		o	do the necessary patches,
		o	and start the standalone keycloak service.
	*	If the keycloak service is started, start in the second terminal the deployment: ./02.deploy.it
		This bash-script
		o	move to the chosen example,
		o	and start the maven deploy.
	At this point you can see, how the deployment will fail!


Does anyone have an idea why the *deployment* fails?
Have I missed note something?
Or is a derivation, per se, not desired??


Best regards.

Christian Kayssner
--
G. Muth Partners GmbH
Borsigstraße 32
D - 65205 Wiesbaden
HRB 10196 Amtsgericht Wiesbaden
Geschäftsführer: Klaus Gockel / Oliver Mächold

Tel. : +49(0)6122/5981-0
FAX. : +49(0)6122/5981-50

eMail: christian.kayssner at muthpartners.de
www  : www.muthpartners.de



More information about the keycloak-user mailing list