Page 4 of 4 FirstFirst ... 234
Results 31 to 38 of 38

Thread: Acegi in portlets

  1. #31
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    Presumably you have checked

    "whether you have multiple ContextLoader* definitions in your web.xml!"

    ??

  2. #32
    Join Date
    Jul 2007
    Posts
    7

    Default

    Hi Luke,

    In liferay-portal-4.2.1.ear, there are four war files. One of the war files tunnel-web.war containts SpringServletContextListener (which is instantiating org.springframework.web.context.ContextLoaderListe ner)
    I added ContextLoaderListener Listener (org.springframework.web.context.ContextLoaderList ener) required for Acegi into web.xml of portal-web.war. No other ContextLoader is present inside web.xml of portal-web.war. But when I am trying to deploy the liferay-portal-4.2.1.ear I am getting the following error.

    <Oct 31, 2007 4:48:36 PM IST> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListe ner failed: java.lang.IllegalStateException: Cannot initialize context because there is already a root application context present - check whether you have multiple ContextLoader* definitions in your web.xml!.
    java.lang.IllegalStateException: Cannot initialize context because there is already a root application context present - check whether you have multiple ContextLoader* definitions in your web.xml!
    at org.springframework.web.context.ContextLoader.init WebApplicationConte
    xt(ContextLoader.java:167)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitiali
    zed(ContextLoaderListener.java:49)
    at weblogic.servlet.internal.EventsManager$FireContex tListenerAction.run
    (EventsManager.java:376)
    at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:
    121)
    Truncated. see log file for complete stacktrace
    >
    <Oct 31, 2007 4:48:36 PM IST> <Error> <HTTP> <BEA-101165> <Could not load user d
    efined filter in web.xml: org.acegisecurity.util.FilterToBeanProxy.
    java.lang.IllegalStateException: BeanFactory not initialized or already closed -
    call 'refresh' before accessing beans via the ApplicationContext
    at org.springframework.context.support.AbstractRefres hableApplicationCon
    text.getBeanFactory(AbstractRefreshableApplication Context.java:118)
    at org.springframework.context.support.AbstractApplic ationContext.contai
    nsBean(AbstractApplicationContext.java:648)
    at org.acegisecurity.util.FilterToBeanProxy.doInit(Fi lterToBeanProxy.jav
    a:123) ......

    Now in which web.xml file should I do the modification as per the document (AcegiSecurityPortletIntegration-0.1), So that I can solve the above error?

  3. #33
    Join Date
    Jul 2007
    Posts
    7

    Default Acegi Portlet Integration

    Hi Kenan,

    Thanks a lot for the document (AcegiSecurityPortletIntegration-0.1) given by you.

    I tried to integrate Acegi into Liferay Portlet by following the document (AcegiSecurityPortletIntegration-0.1). When I am deploying the ear file the following error is displaying. Please give me solution for this.

    User defined listener org.springframework.web.context.ContextLoaderListe ner failed: org.springframework.beans.factory.CannotLoadBeanCl assException: Error loading class [org.acegisecurity.portlet.liferay.auth.LiferayUser PopulatingAuthenticationProcessingFilter] for bean with name 'authenticationProcessingFilter' defined in ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/acegisecurity/ui/webapp/AuthenticationProcessingFilter.
    org.springframework.beans.factory.CannotLoadBeanCl assException: Error loading class [org.acegisecurity.portlet.liferay.auth.LiferayUser PopulatingAuthenticationProcessingFilter] for bean with name 'authenticationProcessingFilter' defined in
    ServletContext resource [/WEB-INF/applicationContext-acegi-security.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/acegisecurity/ui/webapp/AuthenticationProcessingFilter
    at org.springframework.beans.factory.support.Abstract BeanFactory.resolve
    BeanClass(AbstractBeanFactory.java:1014)
    at org.springframework.beans.factory.support.Abstract BeanFactory.isBeanC
    lassMatch(AbstractBeanFactory.java:1036)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.
    getBeanNamesForType(DefaultListableBeanFactory.jav a:165)
    at org.springframework.context.support.AbstractApplic ationContext.getBea
    nNamesForType(AbstractApplicationContext.java:689)
    at org.springframework.context.support.AbstractApplic ationContext.invoke
    BeanFactoryPostProcessors(AbstractApplicationConte xt.java:395)
    Truncated. see log file for complete stacktrace
    java.lang.NoClassDefFoundError: org/acegisecurity/ui/webapp/AuthenticationProces
    singFilter
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java :620)
    at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:12
    4)
    at java.net.URLClassLoader.defineClass(URLClassLoader .java:260)
    at java.net.URLClassLoader.access$100(URLClassLoader. java:56)
    Truncated. see log file for complete stacktrace

    Thanks in Advance.

    Manohar.

  4. #34
    Join Date
    Jul 2007
    Posts
    7

    Default Liferay portal authorization

    Hi All,

    Can any body please help me how to authorize the Portlets with in Liferay portal for an individual users? I want to restrict a user from few portlets based on his authorized role. How can I achieve this.

    Thanks,
    Manohar.

  5. #35
    Join Date
    Jul 2007
    Posts
    7

    Post Acegi Portlet Integration

    Hi All,

    I am trying to deploy acegi-portlet-samples-liferay. For that i I am not able to find the following configuration files in the application.

    classpath:/context/spring-beans.base.core.xml
    classpath:/context/spring-beans.base.db.xml
    classpath:/context/spring-beans.base.aop.xml

    can any body help me, where can i get these files?

    Thanks,
    Manohar.

  6. #36
    Join Date
    Jan 2008
    Posts
    1

    Default

    Quote Originally Posted by ksevindik View Post
    Hi all,

    I have recently intagrated Acegi Security Framework with Liferay and JBoss portals. My solution allows us to use all of Acegi's authorization features within individual portlets.

    The solution is applicaple for all other JSR-168 compliant portals, though I have currently applied it to only Liferay 4.2.2 and JBoss 2.6.1.

    I have put the solution together with sample web applications into acegi-ext open source project. You can access it from this URL: http://sourceforge.net/projects/acegi-ext/

    There is also another sub component called acegi-acl-management under acegi-ext,which helps us ACL management of domain objects decleratively.

    You can also see documentation in which I explain the solution and use of Acegi Security features inside portals. Documenation url: http://ksevindik.googlepages.com/Ace...ration-0.1.doc

    Kind Regards

    Kenan Sevindik
    http://ksevindik.blogspot.com
    Hi Kenan, I'm trying to integrate acegi-security in gridsphere. You did it already for liferay and jboss, did you also do it for integration with gridsphere?
    Do you know where to find this information?


    Thanks a lot in advance.

    Paul.

  7. #37

    Default

    Unfortunately, i have stopped working on this topic, and the only portals I made acegi work are liferay and jboss. However, the basic idea should apply to other portals. You need to have a customization on how your portal invokes portlets. You just need to put current Authentication object into request and extract it on the portlet side and put again into SecurityContextHolder.

  8. #38
    Join Date
    May 2006
    Location
    Oldenburg, Germany
    Posts
    14

    Default

    Created an issue on gridsphere's jira for it: http://bugs.gridsphere.org/browse/GPF-518

Similar Threads

  1. Replies: 8
    Last Post: Mar 19th, 2008, 11:13 AM
  2. Acegi running fine. Howto add roles, ...
    By ThomasBecker in forum Security
    Replies: 9
    Last Post: Sep 16th, 2007, 08:16 AM
  3. Replies: 0
    Last Post: Jul 30th, 2005, 08:09 PM
  4. Acegi for LDAP
    By vaibhav.gandhi in forum Security
    Replies: 12
    Last Post: Jul 13th, 2005, 12:33 AM
  5. Replies: 4
    Last Post: Nov 2nd, 2004, 02:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •