I have a custom ServerControl to retrieve taxonomies information on context Page.
With the following code get the identifier of the page:
System.Collections.IList pageMetaList = pageMetaFactory.GetMetaByUrl(pageUrl);
if (pageMetaList.Count > 0)
pageMeta = pageMetaList[0] as IPageMeta;
and after invoke the method GetTaxonomiesKeywords
CompositeFilter cf = new CompositeFilter();
Keyword[] selectedKeywords = _pmFactory.GetTaxonomyKeywords(pageUri, new Keyword[] { }, cf);
when Page is published on root folder, method GetTaxonomyKeywords return a runtime exception:
RuntimeException: com.tridion.storage.StructureGroup cannot be cast to com.tridion.storage.Keyword]
Codemesh.JuggerNET.NTypeValue.Throw(Int64 inst) +514
Codemesh.JuggerNET.JavaClass.ThrowTypedException(Int64 inst) +1243
Codemesh.JuggerNET.JavaMethod.CallObject(JavaProxy jpo, JavaMethodArguments args) +907
Com.Tridion.Meta.PageMetaFactory.GetTaxonomyKeywords(String taxonomyURI, String pageURI, KeywordArray arg2, TaxonomyFilter taxonomyFilter) +221
Tridion.ContentDelivery.Meta.PageMetaFactory.GetTaxonomyKeywords(String taxonomyUri, String pageUri, Keyword[] contextKeyword, TaxonomyFilter taxonomyFilter) +80
Tridion.ContentDelivery.Meta.PageMetaFactory.GetTaxonomyKeywords(String pageUri, Keyword[] contextKeyword, TaxonomyFilter taxonomyFilter) +22
otherwise if the Page is published in a subfolder, no exception is returned and method retrieves taxonomies info.
What could be the problem?