I have gotten a little further with this issue now. I can now access the
site and click the login button and be directed to my CAS server, but
when im being directed back to my dspace (XMLUI) installation im getting
a loop error:
/
/ /"The webpage at
*http://xxxx.xxxx.xxx/login?ticket=_3d933dxb5bxa0x4c3x2bdex5a117x26a34b85c1a9*
has resulted in too many redirects. Clearing your cookies for this site
or allowing third-party cookies may fix the problem. If not, it is
possibly a server configuration issue and not a problem with your com"/
To fix the first/old issue, i added the file CASAuthentication.java to
the path
[dspace-soruce]/dspace-api/src/main/java/org/dspace/authenticate/AuthenticationManager.java
and changed some of the import lines in the beginning of the file from:
import org.apache.log4j.Logger;
import org.dspace.app.webui.util.JSPManager;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.core.LogManager;
import org.dspace.eperson.EPerson;
import org.dspace.eperson.Group;
import org.dspace.eperson.AuthenticationMethod;
import org.dspace.eperson.AuthenticationManager;
import org.dspace.authorize.AuthorizeException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.jstl.fmt.LocaleSupport;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedReader;
import java.sql.SQLException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
To:
import org.apache.log4j.Logger;
//import org.dspace.app.webui.util.JSPManager;
import org.dspace.core.ConfigurationManager;
import org.dspace.core.Context;
import org.dspace.core.LogManager;
import org.dspace.eperson.EPerson;
import org.dspace.eperson.Group;
//import org.dspace.eperson.AuthenticationMethod;
//import org.dspace.eperson.AuthenticationManager;
import org.dspace.authenticate.AuthenticationManager;
import org.dspace.authenticate.AuthenticationMethod;
import org.dspace.authorize.AuthorizeException;
import javax.servlet.jsp.PageContext;
//import javax.servlet.jsp.jstl.fmt.LocaleSupport;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedReader;
import java.sql.SQLException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.Collection;
I have uploaded the CASAuthentication.java here, so hopefully someone
could take a look at it, and maybe find the bug/fix -
http://pastebin.com/f5cb0c40d
Thanks,
Tonny
Den 15-02-2010 12:04, Tonny Hjelmberg Laursen skrev:
Im trying to add CAS (http://www.jasig.org/cas) to a DSPace XMLUI
1.5.2 installation, but im getting an error, when I try to access the
site.
The error is:
javax.servlet.ServletException: Servlet execution threw an exception
org.dspace.app.xmlui.cocoon.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:142)
org.dspace.app.xmlui.cocoon.DSpaceCocoonServletFilter.doFilter(DSpaceCocoonServletFilter.java:244)
org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:131)
*root cause*
java.lang.NoClassDefFoundError: Could not initialize class
org.dspace.authenticate.AuthenticationManager
org.dspace.app.xmlui.utils.ContextUtil.obtainContext(ContextUtil.java:100)
org.dspace.app.xmlui.aspect.general.AuthenticatedSelector.select(AuthenticatedSelector.java:100)
org.apache.cocoon.sitemap.impl.DefaultExecutor.invokeSelector(DefaultExecutor.java:89)
org.apache.cocoon.components.treeprocessor.sitemap.SelectNode.invoke(SelectNode.java:78)
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
I have followed this "guide" -
https://sourceforge.net/tracker/index.php?func=detail&aid=2812747&group_id=19984&atid=319984
In short it is:
1. Added this patch, that creates the file:
src/org/dspace/eperson/CASAuthentication.java -
https://sourceforge.net/tracker/index.php?func=detail&aid=1601221&group_id=19984&atid=319984
2. Made changes to dspace.cfg
- plugin.sequence.org.dspace.eperson.AuthenticationMethod = \
org.dspace.eperson.CASAuthentication
- cas.server.url= https://xxxxx.xxx.xx/login
cas.validate.url= https://xxxxx.xxx.xx/serviceValidate
cas.logout.url= https://xxxxx.xxx.xx/logout
## Create e-persons for no matching user in dspace
webui.cas.autoregister = true
3. Made changes to different pom.xml files -
https://sourceforge.net/tracker/index.php?func=detail&aid=2812747&group_id=19984&atid=319984
4. Cleared Tomcat webapps folder.
5. mvn clean -> mvn package -> ant update.
6. I can see that maven is downloading the casclient from the
repository: Downloading:
http://repo1.maven.org/maven2/cas/casclient/2.1.1/casclient-2.1.1.jar
and the .jar file is installed in the different lib folders
Any idea why it's not working? Running Redhat ES_5_64.
Thanks,
--
Venlig hilsen | Kind Regards
Tonny Hjelmberg Laursen
Systemadministrator
CBS Library IT
Copenhagen Business School
Solbjerg Plads 3 (D2.30), DK-2000 Frederiksberg
Tel.: (+45) 3815 3697 | Mob.: (+45) 2427 3242 |thl....@cbs.dk
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech