I have exactly the same problem. So, as per your example, suppose that we change line 83 to
Object probablyTreeSiteManager = selector.select(publication.getSiteManagerHint()); then probablyTreeSiteManager.toString() prints [EMAIL PROTECTED] which looks like it's what we want. However, probablyTreeSiteManager instanceof TreeSiteManager gives false and probablyTreeSiteManager.getClass().getName() prints $Proxy193. However, probablyTreeSiteManager.getClass().getPackage().getName() throws an NPE, so the package is null! This reminds me of Hibernate proxies but other than that i have no clue of what is going on. Anyone with a better idea? Manos On Friday 11 November 2005 15:49, Damjan S. Vujnovic wrote: > After further exploring the ClassCastException issue, here's what we > came to... > > First we modified the > src/modules/sitetree/java/src/org/apache/lenya/cms/cocoon/components/module >s/inputSitetreeModule.java and added some extra debug info near the place > where the exception is thrown: > > selector = (ServiceSelector) > this.manager.lookup(SiteManager.ROLE + "Selector"); > Object treeSiteManager = > selector.select(publication.getSiteManagerHint()); > System.out.println("treeSiteManager : "+treeSiteManager ); > System.out.println("treeSiteManager class: > "+treeSiteManager.getClass().getName() ); > System.out.println("Is TreeSiteManager instance : "+ > (treeSiteManager instanceof TreeSiteManager)); > System.out.println("_manager: "+_manager); > System.out.println("class = " + treeSiteManager); > System.out.println("classloader = " + > treeSiteManager.getClass().getClassLoader()); > System.out.println("TreeSiteManager.classloader = " + > TreeSiteManager.class.getClassLoader()); > _manager = (TreeSiteManager) treeSiteManager; > > > and here's the output, just because the exception is thrown > > 14:33:18,711 INFO [STDOUT] treeSiteManager : > [EMAIL PROTECTED] > 14:33:18,711 INFO [STDOUT] treeSiteManager class: $Proxy193 > 14:33:18,711 INFO [STDOUT] Is TreeSiteManager instance : false > 14:33:18,711 INFO [STDOUT] _manager: null > 14:33:18,711 INFO [STDOUT] class = > [EMAIL PROTECTED] > 14:33:18,711 INFO [STDOUT] classloader = > [EMAIL PROTECTED] > url=file:/opt/jboss-4.0.3/server/default/tmp/deploy/tmp63963pis-web.ear > ,addedOrder=43} > 14:33:18,712 INFO [STDOUT] TreeSiteManager.classloader = > [EMAIL PROTECTED] > url=file:/opt/jboss-4.0.3/server/default/tmp/deploy/tmp63963pis-web.ear > ,addedOrder=43} > > Pay attention to the line: > > 14:33:18,711 INFO [STDOUT] treeSiteManager class: $Proxy193 > > Does anyone knows how to tell JBoss (4.0.3) NOT to proxy that class > (btw, does anyone knows why&when JBoss does that at all)? > > Any help/pointers is highly appreciated, > Damjan S. Vujnovic > > P.S. I'm aware that it might be better to raise this question on JBoss > forum, but I'd like to hear opinions from here first... > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]