Hi!

I'm trying to write a Velocity directive to do some magic. This directive is placed in "genericno", Sesam's common library. I need some methods available in the Fast search commands and results, so I need to cast my search result. But here I get a strange class cast exception.

Here is some of the code in the render method:

*****

final ResultList<? extends ResultItem> searchResult =
    getDataModel(cxt).getSearch(cmdId).getResults();

LOG.debug("1. searchResult-loader: " + searchResult.getClass().getClassLoader()); LOG.debug("2. FastSearchResult-loader: " + FastSearchResult.class.getClassLoader());

final FastSearchResult fres = (FastSearchResult) searchResult;

*****

The last line gives this class cast exception:

SiteLocatorFilter: no.sesat.search.result.FastSearchResult
java.lang.ClassCastException: no.sesat.search.result.FastSearchResult

Here is the class loader info:

1:
(no.sesat.search.site.config.SpiClassLoader) Class loader for (generic.sesam:8080/[Norwegian], result=>null)

2:
(no.sesat.search.site.config.SpiClassLoader$SidekickClassLoader) [EMAIL PROTECTED]

Some of the code is copied from the existing Sesat class "MyChannelsNavigationController".

Does anyone have an idea what can be wrong here?

--
ENDRE MIDTGÅRD MECKELBORG
Seniorutvikler
Schibsted Søk AS
sesam.no

+47 930 14 504



_______________________________________________
Kernel-development mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-development

Reply via email to