[jboss-user] [JBoss Seam] - Exception with basic authentication
lowecg2004
do-not-reply at jboss.com
Fri Nov 30 04:08:27 EST 2007
If I try to access a page that has basic HTTP authentication in place, I get the following exception:
08:47:28,131 ERROR [ExceptionFilter] handling uncaught exception
| java.lang.NullPointerException
| at org.jboss.seam.web.AuthenticationFilter.processBasicAuth(AuthenticationFilter.java:158)
| at org.jboss.seam.web.AuthenticationFilter.doFilter(AuthenticationFilter.java:118)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:595)
I'm using Seam 2.0.0.GA, JBossAS 4.2.2.GA, JBossWS 2.0.2.GA
To recreate:
I created a Seam project in RHDS RC1. Under WebContent, I created a folder called "auth". Then I added the following page under auth, called "authenticate.xhtml",
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets">
|
| <ui:define name="body">
| Authenticate
| </ui:define>
| </ui:composition>
I added the following config to components.xml
<components ...
| xmlns:web="http://jboss.com/products/seam/web"
| xsi:schemaLocation=
| "...
| http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.0.xsd">
|
| ...
|
| <web:authentication-filter url-pattern="/auth/*" auth-type="basic"/>
|
| </components>
If I deploy to JBossAS and access the page, I get the exception.
I'm actually looking to use basic authentication to lock down some web services as described here:
http://jbws.dyndns.org/mediawiki/index.php?title=Authentication
Is this possible using Seam web services?
Best Regards,
Chris.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109183#4109183
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109183
More information about the jboss-user
mailing list