Error message after installing the LDAP extension / authclass Problem

Hello.

i’m a bit of a power-user of xwiki within my organisation and i’ve been working towards taking the step of “hooking up” xwiki with LDAP.
we’re trying to set up a new xwiki installation but we’re miserably failing with the LDAP Extension.
Now we have an installation of xwiki 12.1. i’m very motivated and i took the initiative of posting here.

i excuse myself if i’m not providing all/all necessary information - please tell me what i should improve in my description.

When i now try to log in, i get the following Error Message “Error number 4001 in 4: Error while evaluating velocity template htmlheader.vm” (followed by n lines of error / cause:

  • Caused by: org.xwiki.rendering.RenderingException: Failed to execute renderer
  • Caused by: org.xwiki.rendering.RenderingException: Failed to evaluate template with id [/skins/flamingo/htmlheader.vm]
  • Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with namespace [/templates/exception.vm]
  • Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method ‘url’ in class org.xwiki.rest.script.RESTScriptService threw exception java.lang.NullPointerException at /templates/exception.vm[line 52, column 63]
  • Caused by: java.lang.NullPointerException

the guy helping us says he did the same installation he’s already got up and running for years… he’s now been trying to install and reinstall the LDAP Extension many times.

he sent me this screenshot. he says, when he takes out the line indicated by the blue arrow, we don’t get the error (but also: no LDAP)

image

thank you for reading, thank you for your reply and help

The error message you see in the browser is likely to be a secondary error caused be the failure to connect to LDAP.
Do you know where the server stores it log files? Likely the actual error message is stored there, together with a long stack trace. You can try to search for “loginsubmit” to find the error message faster than scrolling through the log.

If I had to make a guess, then I’d say that the verification of the server certificate failed for some reason, probably because it is using a certificate that is not trusted by default.

How to add a certificate as “trusted” is explained here:

https://extensions.xwiki.org/xwiki/bin/view/Extension/LDAP/Authenticator/UseCases/#HUseLDAPoverSSL28ldapsauthentication29

Thank you!

i’m forwarding your answer right away. I’ll ask concerning the logs.

M.

Here I am again.
we followed your advice with the certificates, but unfortunately it didn’t work out. Could it be that it is a problem with the Xwiki LDAP Extension itself?

thak you in advance for any helpful clue!

My collegue sent me the following info:

I checked the tip with the certificates …
Unfortunately, this didn’t work.
As soon as I put the following option in the configuration file.
xwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl
config
I get the following error message in the GUI:
(This message also comes when I log in with the local admin account.)errorMessage

The following error message is displayed in the xwiki.log
fromLog

For some reason a dependency (from the file jldap-2009-10-07.jar) failed to load.

That is shown from the message

 Caused by: java.lang.NoClassDefFoundException: com/novell/ldap/LDAPException

as this class should be from that *.jar file. However the cause for this is unfortunately not shown from the excerpt in the xwiki.log. If the next error message is a java.lang.ClassNotFoundException for the same class name com/novell/ldap/LDAPException (or com.novell.ldap.LDAPException) then the jldap-2009-10-07.jar is somehow missing.

How has the LDAP Authenticator been installed? If just the ldap-authenticator-x.y.z.jar has been thrown into the WEB-INF/lib directory of the XWiki webapp folder, then the jldap-2009-10-07.jar should be added manually there, too.
It would be better to install the “LDAP Authenticator” via the Wiki Administration -> Extensions however.

Dear Clemens,
Thank you for your fast reply.

i will again, check with the collegue.

have a good weekend.

hello Clemens,

it’s been a while since i was able to visit the forum. I wanted to give an update on what helped solving the problem. I was a long, hard fight to sort this issue. my colleague ended up comparing checksums… and found out that the new installation was missing something somewhere. i think the issue has to do mainly with our infrastructure.