Bugs item #467466, was opened at 2001-10-03 04:37
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=467466&group_id=22866

Category: JBossSX
Group: v2.5 Rabbit Hole (unstable)
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Servlet BASIC authentication

Initial Comment:
(Most probably directed to Scott :)

I have implemented a simple servlet with security 
authentication. When trying to call it I get the 
following error:

[Jetty,INFO] Authenticating access, username: 
defaultuser
[simple,DEBUG] Login failure
javax.security.auth.login.LoginException: 
java.lang.NoSuchMethodError
        at 
org.jboss.security.auth.spi.UsernamePasswordLoginModule
.getUsernameAndPassword
(UsernamePasswordLoginModule.java:159)
        at 
org.jboss.security.auth.spi.UsernamePasswordLoginModule
.login(UsernamePasswordLoginModule.java:94)
        at java.lang.reflect.Method.invoke(Native 
Method)
        at 
javax.security.auth.login.LoginContext.invoke
(LoginContext.java:664)
        at 
javax.security.auth.login.LoginContext.access$000
(LoginContext.java:129)
        at javax.security.auth.login.LoginContext$4.run
(LoginContext.java:599)
        at java.security.AccessController.doPrivileged
(Native Method)
        at 
javax.security.auth.login.LoginContext.invokeModule
(LoginContext.java:596)
        at javax.security.auth.login.LoginContext.login
(LoginContext.java:523)

A java.lang.NoSuchMethodError is thrown when the 
requested method is not available on the class. Well, 
on <UsernamePasswordLoginModule.java:159> there is a 
call to CallBackHandler.handle, which is documented as:

public abstract void handle(Callback acallback[])
throws IOException, UnsupportedCallbackException;

Surfing on the code I can see that these classes 
implement this:
AppCallbackHandler, UserNamePasswordHandler(*), 
SecurityAssociationHandler(*)

(*) Forgot to add the IOException in the handle() 
declaration.

I added the throws clause, recompiled and now they 
work.



----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=467466&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to