Announcement Announcement Module
Collapse
No announcement yet.
Acegi in portlets Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Presumably you have checked

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

    ??

    Comment


    • #32
      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?

      Comment


      • #33
        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.

        Comment


        • #34
          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.

          Comment


          • #35
            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.

            Comment


            • #36
              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.

              Comment


              • #37
                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.

                Comment


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

                  Comment

                  Working...
                  X