Hi.
I'm using cocoon 2.1.7. In a  javaflow class. I have this code:
if

( getComponent(DataSourceComponent.ROLE + "Selector")instanceof ComponentSelector);
{


ComponentSelector selector = (ComponentSelector) getComponent (DataSourceComponent.ROLE + "Selector");
}

But I obtain:

ERROR (2005-11-16) 09:38.57:718 [sitemap.handled-errors] (/ mysis/login.do) http-8080-Processor25/ErrorHandlerHelper:
java.lang.ClassCastException

Hm... try something like this (from the top of my head)

Object o = getComponent(DataSourceComponent.ROLE + "Selector");

System.out.println(o.getClass() + "@" + o.getClass().getClassLoader());
System.out.println(ComponentSelector.class + "@" + ComponentSelector.class.getClassLoader());

That way you should see the exact class being returned as well
as the classloader that has loaded it.

But I don't know how to do this in a java flow.

Just like you would do in an action.

HTH

cheers
--
Torsten


Attachment: PGP.sig
Description: This is a digitally signed message part