07-22-2009 04:28 PM
<constraint name=”my:customConstraint”
type=”org.alfresco.sample.constraints.LuceneSearchBasedListConstraint” >
<parameter name=”query”>
<value> TYPE:”{http://www.alfresco.org/model/content/1.0}folder” AND@\http://www.alfresco.org/model/content/1.0\}name:'Customer"
</value>
</parameter>
</constraint>
22:35:01,259 User:System ERROR [web.context.ContextLoader] Context initialization failed
net.sf.acegisecurity.AuthenticationCredentialsNotFoundException: A valid SecureContext was not provided in the RequestContext
at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:477)
at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:355)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy23.query(Unknown Source)
at org.alfresco.sample.constraints.LuceneSearchBasedListConstraint.getSearchResult(LuceneSearchBasedListConstraint.java:69)
at org.alfresco.sample.constraints.SearchBasedListConstraint.getAllowedValues(SearchBasedListConstraint.java:62)
07-30-2009 12:36 PM
why is he failing to create the instance? do i need to provide any default value maybe for the dynamic list of custom:AKunde (generated out of a Space) but normally that should be handled by custom component generator….
07-30-2009 07:09 PM
<constraint name="me:group_constraint" type="org.alfresco.sample.constraints.LuceneSearchBasedListConstraint" >
<parameter name="query">
<value> PATH:"/cm:generalclassifiable/cm:Group/*" </value>
</parameter>
/constraint>
The log says:15:53:54,295 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
net.sf.acegisecurity.AuthenticationCredentialsNotFoundException: A valid SecureContext was not provided in the RequestContext
at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:477)
at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:355)
at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy44.query(Unknown Source)
at org.alfresco.sample.constraints.LuceneSearchBasedListConstraint.getSearchResult(LuceneSearchBasedListConstraint.java:71)
Am I missing something simple? If you have any ideas, please let me know. I found the feature very useful. Thanks
07-30-2009 10:36 PM
07-30-2009 11:37 PM
<constraint name="custom:Auftragsliste"
type="org.alfresco.sample.constraints.LuceneSearchBasedListConstraint" >
<parameter name="query">
<value> PATH:"/app:company_home/cm:ComTeam_x20020_AG/cm:${custom:AKunde}/cm:_x0030_2_x0020_Auftragsordner/*" AND TYPE:"{http://www.alfresco.org/model/content/1.0}folder" </value>
</parameter>
</constraint>
<property name="custom:AKunde">
<title>Kunde</title>
<type>d:text</type>
<mandatory>true</mandatory>
<default>BMW</default>
<constraints>
<constraint ref="custom:Kundenliste" />
</constraints>
</property>
08-03-2009 12:40 PM
10-05-2009 09:25 PM
<constraint name="custom:Themenliste"
type="org.alfresco.sample.constraints.LuceneSearchBasedListConstraint" >
<parameter name="query">
<value> PATH:"/app:company_home/cm:ComTeam_x0020_AG/cm:Kunden/cm:${custom:AKunde}/cm:_x0030_2_x0020_Auftragsordner/cm:${custom:AAuftrag}//*" AND TYPE:"{http://www.alfresco.org/model/content/1.0}folder" </value>
</parameter>
</constraint>
the error i get:
javax.faces.FacesException: org.alfresco.repo.search.SearcherException: Failed to parse query: PATH:"/app:company_home/cm:ComTeam_x0020_AG/cm:Kunden/cm:ComTeam/cm:_x0030_2_x0020_Auftragsordner/cm:${custom:AAuftrag}//*" AND TYPE:"{http://www.alfresco.org/model/content/1.0}folder"
caused by:
org.apache.jasper.JasperException: org.alfresco.repo.search.SearcherException: Failed to parse query: PATH:"/app:company_home/cm:ComTeam_x0020_AG/cm:Kunden/cm:ComTeam/cm:_x0030_2_x0020_Auftragsordner/cm:${custom:AAuftrag}//*" AND TYPE:"{http://www.alfresco.org/model/content/1.0}folder"
caused by:
org.alfresco.repo.search.SearcherException: Failed to parse query: PATH:"/app:company_home/cm:ComTeam_x0020_AG/cm:Kunden/cm:ComTeam/cm:_x0030_2_x0020_Auftragsordner/cm:${custom:AAuftrag}//*" AND TYPE:"{http://www.alfresco.org/model/content/1.0}folder"
caused by:
org.alfresco.repo.search.impl.lucene.ParseException: Failed to parse XPath…
Unexpected '$'
/**
* Pulls out tokens corresponding to property names
*
* @param query
* @return
*/
private String replaceQueryParametersWithValues(String query, Map<String, String> props)
{
String finalQuery = query;
for (String key : props.keySet())
{
String token = "\\$\\{" + key + "\\}";
finalQuery = query.replaceAll(token, props.get(key));
}
return finalQuery;
}
10-07-2009 03:04 PM
javax.faces.FacesException: org.alfresco.repo.search.SearcherException: Failed to parse query: PATH:"/app:company_home/cm:ComTeam_x0020_AG/cm:Kunden/cm:ComTeam/cm:_x0030_2_x0020_Auftragsordner/cm:${custom:AAuftrag}/cm:${custom:AStruktur}//*" AND TYPE:"{http://www.alfresco.org/model/content/1.0}folder"
private List<String> getPropertyNames(String query, String tokenRegexpExpression)
{
Pattern patternMatcher = Pattern.compile(tokenRegexpExpression);
Matcher matcher = patternMatcher.matcher(query);
List<String> arr = new ArrayList<String>();
while (matcher.find())
{
String propToken = matcher.group();
propToken = propToken.substring(2, propToken.length() - 1);
arr.add(propToken);
}
return arr;
}
/**
* Pulls out tokens corresponding to property names
*
* @param query
* @return
*/
private String replaceQueryParametersWithValues(String query, Map<String, String> props)
{
String finalQuery = query;
for (String key : props.keySet())
{
String token = "\\$\\{" + key + "\\}";
finalQuery = query.replaceAll(token, props.get(key));
}
return finalQuery;
}
finalQuery = query.replaceAll(token, props.get(key));
finalQuery = finalQuery.replaceAll(token, props.get(key));
03-30-2010 05:26 AM
03-30-2010 07:41 AM
03-30-2010 08:22 AM
<%
EditNodeCategoriesDialog dialog2 = (EditNodeCategoriesDialog) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "EditNodeCategoriesDialog"););
%>
….
<f:verbatim>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tr>
<td colspan="2" class="paddingRow"></td></tr>
<tr>
<td></f:verbatim><h:outputText value="#{msg.categories}" /><f:verbatim>:</td>
<td width="98%">
</f:verbatim>
<r:multiValueSelector id="multi-category-selector"
value="#{dialog2.getCategories}"
lastItemAdded="#{dialog2.getAddedCategory}"
selectItemMsg="#{msg.select_category}"
selectedItemsMsg="#{msg.selected_categories}"
noSelectedItemsMsg="#{msg.no_selected_categories}"
styleClass="multiValueSelector">
<f:subview id="categorySelector">
<r:ajaxCategorySelector id="catSelector" styleClass="selector"
value="#{dialog2.getAddedCategory}"
label="#{msg.select_category_prompt}" />
</f:subview>
</r:multiValueSelector>
<f:verbatim>
</td>
</tr>
<tr><td colspan="2" class="paddingRow"></td></tr>
</table>
</f:verbatim>
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.