cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Web Script Portlet rivet

rivetlogic
Champ on-the-rise
Champ on-the-rise
AWPr

AWPr is a JSR-168 portlet that can be used to expose remote Alfresco Web scripts, including those that need user authentication. With the help of a custom Alfresco authentication component that we wrote the portlet can carry the user credentials from the portal to Alfresco, authenticate the user in Alfresco and retrieve a ticket that can be used during all subsequent interactions between the end-user, the portlet and ultimately the Alfresco Web script itself.

Motivation for AWPr

When integrating Alfresco Web scripts with JBoss Portal or Liferay Portal AWPr alleviates the need for having to deploy all of Alfresco inside the portal as is the case when using Alfresco's OOTB (out-of-the-box) Web script portlet for Alfresco/Portal integration.

AWPr is also highly configurable. Through the use of portlet preferences you can create multiple instances of AWPr and configure each one with a different Web script URL and a set of parameters with default values if needed. The instance will then RESTfully fetch the result of the Web script's render phase and carry that over to the portlet finally rendering it on the screen within the confines of the portlet window.

It is hence possible to run two instances of AWPr on a single portal page where each instance is exposing a different Web script even if those Web scripts are hosted on two different Alfresco servers regardless of their geographic location.

AWPr lives here:
http://wiki.rivetlogic.org/display/AWPr/

Feel free to ask questions about AWPr in this thread.

–Alaaeldin
125 REPLIES 125

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi David

It looks like the chaining is not right. Try following the steps below.

Step 1:
  Edit you ldap-authentication-context.xml  to change bean authenticationDao to authenticationDaoLDAP.


<!– DAO that rejects changes - LDAP is read only at the moment. It does allow users to be deleted with out warnings from the UI. –>
   
    <bean name="authenticationDaoLDAP" class="org.alfresco.repo.security.authentication.DefaultMutableAuthenticationDao" >
        <property name="allowDeleteUser">
            <value>true</value>
        </property>
    </bean>   
  

Step 2:
  Change the bean  id authenticationComponent to authenticationComponentLDAP in the same file (ldap-authentication-context.xml).


    <bean id="authenticationComponentLDAP"
          class="org.alfresco.repo.security.authentication.ldap.LDAPAuthenticationComponentImpl"
          parent="authenticationComponentBase">
        <property name="LDAPInitialDirContextFactory">
            <ref bean="ldapInitialDirContextFactory"/>
        </property>
        <property name="userNameFormat">
            <!–
           
            This maps between what the user types in and what is passed through to the underlying LDAP authentication.
           
            "%s" - the user id is passed through without modification.
            Used for LDAP authentication such as DIGEST-MD5, anything that is not "simple".
           
            "cn=%s,ou=London,dc=company,dc=com" - If the user types in "Joe Bloggs" the authenticate as "cn=Joe Bloggs,ou=London,dc=company,dc=com"
            Usually for simple authentication. Simple authentication always uses the DN for the user.
           
            –>
            <value>${ldap.authentication.userNameFormat}</value>
        </property>
        <property name="nodeService">
            <ref bean="nodeService" />
        </property>
        <property name="personService">
            <ref bean="personService" />
        </property>
        <property name="transactionService">
            <ref bean="transactionService" />
        </property>  
        <property name="escapeCommasInBind">
            <value>${ldap.authentication.escapeCommasInBind}</value>
        </property>
        <property name="escapeCommasInUid">
            <value>${ldap.authentication.escapeCommasInUid}</value>
        </property>
    </bean>

Step 3:
  Add a new bean to chaining-authentication-context.xml


     <!– LDAP –>
     <bean id="authenticationServiceLDAP"  class="org.alfresco.repo.security.authentication.AuthenticationServiceImpl">
              <property name="authenticationDao">
                  <ref bean="authenticationDaoLDAP"/>
             </property>
             <property name="ticketComponent">
                  <ref bean="ticketComponent"/>
            </property>
            <property name="authenticationComponent">
                <ref bean="authenticationComponentLDAP"/>
           </property>
     </bean>

Step 4:
  Add  additional authentication component to the bean authenticationComponent in chaining-authentication-context.xml as show  below.


<bean id="authenticationComponent"
        class="org.alfresco.repo.security.authentication.ChainingAuthenticationComponentImpl">
        <property name="authenticationComponents">
            <list>
                <ref bean="authenticationComponentImplSecureToken" />
                <ref bean="authenticationComponentLDAP"/>
            </list>
        </property>
        <property name="mutableAuthenticationComponent">
            <ref bean="authenticationComponentImplAlfresco" />
        </property>
    </bean>


Step 5:

Add LDAP authentication service to existing list in the bean authenticationService in chaining-authentication-service.xml as shown below.

<bean id="authenticationService"
        class="org.alfresco.repo.security.authentication.ChainingAuthenticationServiceImpl">
        <property name="authenticationServices">
            <list>
                <ref bean="authenticationServiceImplSecureToken" />
                <ref bean ="authenticationServiceLDAP"/>
            </list>
        </property>
        <property name="mutableAuthenticationService">
            <ref bean="authenticationServiceImplAlfresco" />
        </property>
        <property name="sysAdminCache">
            <ref bean="sysAdminCache" />
        </property>
    </bean>

Once you restart alfresco, you should be able to see the  AWPr portlet display appropriate contents in liferay. 
Above configuration has Alfresco, LDAP and STAr chained together.

A few ways to debug if your chaining is working or not is listed below.

1) Check if you can login to alfresco directly using a ldap username and password
2) With the above configuration see if you can login as "admin" user when ldap is not accessible or turned off.
3) AWPr should display appropriate contents using STAr authentication.


Best Regards,
Shagul

mmostafa79
Champ in-the-making
Champ in-the-making
Thanks for your previous reply. I have a different problem now. After installing the portlet and configuring it to work with awprmyspaces. The portlet works however no files appears on my spaces.
When I tried to run it on IE7 and I got the message
"A Runtime Error has occurred.
Do you wish to Debug?
Line: 29
Error: Access is denied."

I also tried it on IE 6 I got the following message
"This page is accessing information that is not under its control"
when I click yes, Myspaces content appears with some icons missing

Any ideas how to solve that.

dnavarro
Champ in-the-making
Champ in-the-making
Hi Shagul,

     Let's go to try it:

A few ways to debug if your chaining is working or not is listed below.

1) Check if you can login to alfresco directly using a ldap username and password
2) With the above configuration see if you can login as "admin" user when ldap is not accessible or turned off.
3) AWPr should display appropriate contents using STAr authentication.

  • Yes, I can login to alfresco directly using a ldap username and password
  • I will check the second point below
  • Sorry, I don't understand the point 3), I think you are saying something like… "and it must be working now!  🙂 "

Step 1:
  Edit you ldap-authentication-context.xml  to change bean authenticationDao to authenticationDaoLDAP.

I don't need change it, the file has that bean same as yours example.

Step 2:
  Change the bean  id authenticationComponent to authenticationComponentLDAP in the same file (ldap-authentication-context.xml).

Checked it. Again, no changes were needed.


Step 3:
  Add a new bean to chaining-authentication-context.xml

No changes were needed.

Step 4:
Add additional authentication component to the bean authenticationComponent in chaining-authentication-context.xml as show below.

YES. I hadn't this line:
<ref bean="authenticationComponentImplSecureToken" />


Step 5:
Add LDAP authentication service to existing list in the bean authenticationService in chaining-authentication-service.xml as shown below.

AGAIN I needed add a line:
<ref bean="authenticationServiceImplSecureToken" />


restarting Alfresco……………………and………………………. YES, Alfresco is working well.

restarting Liferay  (why not?  🙂 )…….and………………………. YES !!!

Liferay and Alfresco are connected.


But, I have created a new document in Alfresco and a new Space with a document too… and Liferay doesn't show nothing more than a "clock icon".

The Liferay's catalina.out file shows:
10:18:47,553 WARN  [HttpMethodBase:682] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
10:18:48,698 WARN  [HttpMethodBase:682] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
10:18:49,634 WARN  [HttpMethodBase:682] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
10:18:49,742 WARN  [HttpMethodBase:682] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.




Thank you very much for your time, Shagul.


Best regards,

  David Navarro.

marco_altieri
Star Contributor
Star Contributor
Hi all,
I want to use rivet logic awpr portlet and so I'm trying to understand how it works and how secure it is.

I would like to know if someone can confirm that:
1)
The Util.java class uses

      usernName = liferayUser.getLogin()

as the alfresco user. When Liferay uses email address for user credentials, liferayUser.getLogin()  is the user email that can hardly be used as a username on Alfresco. It seems not possible to use the screenName.

2)
AWPR is able to access Alfresco webscript using the Liferay user, but it does not authenticate the user on Alfresco: for example, if I configure awpr to use a webscript that requires authentication but just returns a link to an Alfresco document, the portlet works well, but I cannot access the document because I'm not authenticated on Alfresco. I have to use a portlet like MySpaces that makes an Ajax call and creates the ticket on Alfresco and than I'm authenticated and I can navigate inside the Alfresco web client.

3) The MySpaces portlet uses a call like this one:


Can somene sniffs the http traffic, reads the ticket and uses it to get access on Alfresco?

Thanks
Mar...



'>http://localhost:8080/alfresco/wcservice/ui/awprmyspacespanel?p=/Company%20Home/User%20Homes/liferayuser&f=0&h=workspace://SpacesStore/ed23f702-b4b4-4b45-a30d-5f6106367ef3&pid=undefined&puri=undefined&alfUrl=http://localhost:8080/alfresco&ticket=TICKET_4fb7a221e79d7be25880b1df05cdd3f6b66e9f2f

Can somene sniffs the http traffic, reads the ticket and uses it to get access on Alfresco?

Thanks
Mar...




Hi Marco,

1)

Liferay supports 3 different ways to login (userId, screenName, and email). 
liferayUser.getLogin() will return the appropriate login based on the login mechanism set. This was intentional. If the requirement is, that the screenName be always used then you should be able to get the screenName  using liferayUser.getScreenName().

2)
Currently AWPr does not support downloads. If you have a link in the ftl file that is a direct link, Alfresco will not be aware of the user.
Proxying the download is under consideration.

AWPr portlet does keep a ticket in the session for the current user and uses the same ticket for all further requests that are proxied through AWPr.

3)
MySpaces is used as an example and AWPr is not limited to any particular Web Script.
Myspaces is not a simple Web Script. It has a lot of ajax calls and supporting beans. The inner panel is populated via an AJAX call and this call will not be aware of the ticket in AWPr session.

AWPr is intended to proxy all requests and not expose alfresco directly to the end user. It is still evolving. Once all the urls can be proxied through AWPr, this should not be an issue.

Best Regards,
Shagul

Thank you very much for your quick reply.
I like very much the work of your company and the fact that you share it the community, but the Awpr portlet seems a bit unuseful. How can I use it if the user cannot access the content displayed by the portlet?
Is there something that I do not understand?

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

Firstly, thank you for your feedback and your interest. This proves that AWPr is filling a gap that needed to be filled.

Secondly, and to answer your question, Alfresco's out-of-the-box solution uses cookies to allow the inner myspacespanel Web script to authenticate using AJAX calls. This is not useful for AWPr since we want it to be completely stateless (i.e. no cookies). This is important because we want to allow multiple AWPr instances on one page to access different Alfresco servers. We are planning to support content downloads in the next release by making use of Portlet 2.0's resource phase to allow for downloads directly from AWPr instances. We'll keep the community posted regarding our progress on that front.

I would like to make it very clear that the awprmyspaces Web script was provided by us to the community merely as an example. It is not intended to be used in production since it's simply a rewrite of Alfresco's out-of-the-box myspaces Web script and exposes the Alfresco ticket in the browser.

I would also like to say that it is, in my opinion, an incorrect statement that Web scripts that don't allow you to download content are as you say "unuseful". There are many useful Web scripts that don't need the user to download content, such as reporting Web scripts or Web scripts that execute Alfresco actions.

I hope this answers your question.

Cheers,

–Alaaeldin

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hey everyone:

Since we've been getting some repeating questions about how to use AWPr I thought it would be a good idea to create a FAQ page on AWPr's wiki. Feel free to give it a look-see:

http://wiki.rivetlogic.com/display/AWPr/FAQ

Cheers,

–Alaaeldin

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hello again everyone,

I have some good news. In an effort to make AWPr more user friendly we scrambled to release version 1.4.0 today to the community with support for safe document downloads! You're probably asking yourself what this means. Well, in a nutshell we have made use of Portlet 2.0's resource phase to allow users to download Alfresco content directly through AWPr. Right now we're only proxying the following Web script API call:

GET /alfresco/service/api/node/content/{store_type}/{store_id}/{id}/{file-name}?a={attach?}

Basically all you need to do is have this Web script call in the markup of your Web scripts and AWPr will proxy it using a Portlet 2.0 resource URL. This way the Alfresco ticket does not need to be exposed to the browser and the downloads are in that sense safe.

You can download AWPr 1.4.0 here.

P.S. We also externalized the star-key and star-password into init-params in portlet.xml. That way you can use any key/password combination you want. A new version of STAr (1.1.0) was also released to support the same kind of externalization. Note that the STAr key is any 16 character string that is Base64 encoded. The default key we released with the latest AWPr and STAr bundles is: QVdQclJvY2tzQmFieSEhIQ==  :wink: 

Enjoy!

–Alaaeldin

dnavarro
Champ in-the-making
Champ in-the-making
Hi,

  I'm trying to work with AWPr 1.3.0, Liferay 5.2.3 and Alfresco 3StableLabs (3.0).

  I'm getting next exception in Liferay when I save the configuration for the AWPr Portlet.

  Before paste the exception, my portlet configuration is:
  • Alfresco Host: http:10.128.128.13

  • Alfresco Context Path: /alfresco

  • Script Url: /ui/awprmyspaces

  • Script Parameters: {alfUrl}[http://10.128.128.13/alfresco]

  • Proxy all URLs in this portlet: CHECK

  • Javascript Variable:

  • REST Method Type: GET

  • URL Encoding Type: UTF-8

  And the exception is:

08:04:35,505 ERROR [PortletServlet:104] javax.portlet.PortletException: org.apache.jasper.JasperException: An exception occurred processing JSP page /html/edit.jsp at line 24

21:    String scriptUrl = prefs.getValue(Constants.PORTLET_PREF_WEBSCRIPT_URL, "");
22:    String scriptParams = prefs.getValue(Constants.PORTLET_PREF_WEBSCRIPT_PARAMS, "");
23:    String proxyUrls = prefs.getValue(Constants.PORTLET_PREF_PROXY_URLS, "");
24:    boolean proxyAllUrls = (prefs.getValue(Constants.PORTLET_PREF_PROXY_ALL_URLS, "true").equalsIgnoreCase("true"));
25:    String charEncodingType = prefs.getValue(Constants.PORTLET_PREF_CHAR_ENCODING_TYPE, Constants.CHAR_ENCODING_UTF8);
26:    String methodType = prefs.getValue(Constants.PORTLET_PREF_HTTP_METHOD, Constants.HTTP_METHOD_GET);
27:    String jsVariable = prefs.getValue(Constants.PORTLET_PREF_JS_VARIABLE, "");


Stacktrace:
javax.portlet.PortletException: org.apache.jasper.JasperException: An exception occurred processing JSP page /html/edit.jsp at line 24

21:    String scriptUrl = prefs.getValue(Constants.PORTLET_PREF_WEBSCRIPT_URL, "");
22:    String scriptParams = prefs.getValue(Constants.PORTLET_PREF_WEBSCRIPT_PARAMS, "");
23:    String proxyUrls = prefs.getValue(Constants.PORTLET_PREF_PROXY_URLS, "");
24:    boolean proxyAllUrls = (prefs.getValue(Constants.PORTLET_PREF_PROXY_ALL_URLS, "true").equalsIgnoreCase("true"));
25:    String charEncodingType = prefs.getValue(Constants.PORTLET_PREF_CHAR_ENCODING_TYPE, Constants.CHAR_ENCODING_UTF8);
26:    String methodType = prefs.getValue(Constants.PORTLET_PREF_HTTP_METHOD, Constants.HTTP_METHOD_GET);
27:    String jsVariable = prefs.getValue(Constants.PORTLET_PREF_JS_VARIABLE, "");


Stacktrace:
   at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:318)
   at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:122)
   at org.rivetlogic.rivet.portlet.awpr.JSPPortlet.include(JSPPortlet.java:362)
   at org.rivetlogic.rivet.portlet.awpr.JSPPortlet.doEdit(JSPPortlet.java:139)
   at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:330)
   at org.rivetlogic.rivet.portlet.awpr.JSPPortlet.doDispatch(JSPPortlet.java:131)
   at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
   at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(FilterChainImpl.java:126)
   at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:69)
   at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:100)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
   at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
   at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
   at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:618)
   at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:700)
   at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:419)
   at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(Unknown Source)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
   at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
   at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
   at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:2884)
   at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:897)
   at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:170)
   at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:90)
   at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:77)
   at com.liferay.portlet.layoutconfiguration.util.velocity.PortletLogic.processContent(PortletLogic.java:85)
   at com.liferay.portlet.layoutconfiguration.util.velocity.TemplateProcessor.processMax(TemplateProcessor.java:85)
   at sun.reflect.GeneratedMethodAccessor391.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
   at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
   at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
   at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:252)
   at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:332)
   at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
   at org.apache.velocity.Template.merge(Template.java:328)
   at org.apache.velocity.Template.merge(Template.java:235)
   at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:381)
   at com.liferay.portal.velocity.VelocityEngineImpl.mergeTemplate(VelocityEngineImpl.java:179)
   at com.liferay.portal.kernel.velocity.VelocityEngineUtil.mergeTemplate(VelocityEngineUtil.java:84)
   at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:237)
   at org.apache.jsp.html.portal.layout.view.portlet_jsp._jspService(Unknown Source)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
   at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
   at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
   at com.liferay.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:294)
   at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:471)
   at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:195)
   at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
   at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:157)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
   at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:608)
   at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:846)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
   at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
   at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
   at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:143)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:142)
   at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:140)
   at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:282)
   at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.servlet.filters.cache.CacheFilter.processFilter(CacheFilter.java:425)
   at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:257)
   at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.servlet.filters.sso.opensso.OpenSSOFilter.processFilter(OpenSSOFilter.java:73)
   at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:193)
   at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:191)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.servlet.filters.threadlocalcache.ThreadLocalCacheFilter.processFilter(ThreadLocalCacheFilter.java:55)
   at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
   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:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.jasper.JasperException: An exception occurred processing JSP page /html/edit.jsp at line 24

21:    String scriptUrl = prefs.getValue(Constants.PORTLET_PREF_WEBSCRIPT_URL, "");
22:    String scriptParams = prefs.getValue(Constants.PORTLET_PREF_WEBSCRIPT_PARAMS, "");
23:    String proxyUrls = prefs.getValue(Constants.PORTLET_PREF_PROXY_URLS, "");
24:    boolean proxyAllUrls = (prefs.getValue(Constants.PORTLET_PREF_PROXY_ALL_URLS, "true").equalsIgnoreCase("true"));
25:    String charEncodingType = prefs.getValue(Constants.PORTLET_PREF_CHAR_ENCODING_TYPE, Constants.CHAR_ENCODING_UTF8);
26:    String methodType = prefs.getValue(Constants.PORTLET_PREF_HTTP_METHOD, Constants.HTTP_METHOD_GET);
27:    String jsVariable = prefs.getValue(Constants.PORTLET_PREF_JS_VARIABLE, "");


Stacktrace:
   at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
   at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
   at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
   at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:307)
   … 156 more
Caused by: java.lang.NullPointerException
   at org.apache.jsp.html.edit_jsp._jspService(edit_jsp.java:221)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
   … 165 more


Any idea?.


Ah!, one think more. After that exception I can't change the portlet preferences, because when I try to do it next message appears:
AWPr is temporarily unavailable.




Best regards,

  David Navarro.

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi David,

I'm not sure why you're getting this error without some more info but try removing the AWPr instance, adding a new one and give it the same configuration.

Cheers,

–Alaaeldin

kr1stof
Champ in-the-making
Champ in-the-making
Hi!

I am getting troubles with installing AWPr and STAr on Alfresco Labs Stable 3.1.
I copied the chaining-authentication-context.xml from the STAr installation guide for Alfresco 3.1 + STAr and ran the apply_amps.sh on the STAR amp.
After I started Alfresco, the following errors appeared:

ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luceneFullTextSearchIndexer' defined in class path resource [alfresco/core-serv
ices-context.xml]: Cannot resolve reference to bean 'indexerAndSearcherFactory' while setting bean property 'indexerAndSearcherFactory';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'indexerAndSearcherFactory' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'admLuceneIndexerAndSearcherFactory' while setting bean property 'defaultBinding'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'admLuceneIndexerAndSearcherFactory' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'contentService' while setting bean property 'contentService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contentService' defined in class path resource [alfresco/content-services-context.xml]: Cannot resolve reference to bean 'nodeService' while setting bean property 'nodeService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mlPropertyInterceptor' defined in class path resource [alfresco/node-services-context.xml]: Cannot resolve reference to bean 'multilingualContentService' while setting bean property 'multilingualContentService';

And so on with the exception being:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'userNameMatcher' is defined
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:356)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:916)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:243)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)

Looks to me like a Spring exception. I tried installing it on a virgin alfresco installation, but no change. I am using Ubuntu Linux.

Thanks for any help Smiley Happy