Paulo Almeida wrote:
> I tried testing the POP3Authenticator and I also can't get it to work. It
> gives me this error when I try to login:
>
> The authentication
> driver 'net.sf.basedb.core.authentication.POP3Authenticator' could not be
> loaded. The error message is: null
>
> I compiled the POP3Authenticator, put the .jar file in
> <basedir>/www/WEB-INF/lib and uncommented the auth.driver line in the default
> base.config file.
Hmmm... The POP3Authenticator is part of BASE, so if you have compiled
it a second time you now have two classes with the same name, and that
is usually not a good idea.
Also, have you set the initialization string auth.init to a valid pop3
mail server?
Can you submit the complete stacktrace?
> I think this is the only problem now. I've been able to compile my
> LDAPAuthenticator with a different package name (I'm using
> just 'authentication' now), but I'm missing something when I try to tell Base
> to use an authentication module.
>
> Can you figure out what may be wrong? I'm attaching my latest
> LDAPAuthenticator.java
I am not familiar with LDAP so I can't comment on anything is related to
that. Here are some points:
* It is considered bad practice to import anything with a * at the end.
Only import the classes that you are actually using. The reason for this
is that it becomes harder to know from which package a certain class is
coming. It may also create name clashes when you update a package to a
newer version and there are new classes with the same names as are found
in other packages.
* Why do you have a 'void main()' method?
* If you are getting a NamingException this code only prints the error
message and the returns indicating a successful login.
} catch (NamingException e) {
e.printStackTrace();
}
return new AuthenticationInformation(login, login);
If the user/password is not correct you must throw either an
UnknownLoginException or an InvalidPasswordException. For other problems
you must throw an AuthenticationException.
/Nicklas
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
The BASE general discussion mailing list
[email protected]
unsubscribe: send a mail with subject "unsubscribe" to
[EMAIL PROTECTED]