[Installation, Configuration & DEPLOYMENT] - Another deployment ClassCastException
by dnwiebe
I've got a JEE 5.2 application that ran fine under Glassfish that I'm trying to regress to run under JBoss 4.2.1.GA (because while Glassfish may completely implement EE 5, it's exasperatingly unstable).
I've read a number of complaints about ClassCastExceptions involved with JNDI lookups, and how they're related either to the lack of a .../remote or .../local suffix on the JNDI name, or to classes loaded by different classloaders. I've tried to take care of all that. Here's (part of) my global JNDI namespace:
| +- BackEnd (class: org.jnp.interfaces.NamingContext)
| | +- GeneralService (class: org.jnp.interfaces.NamingContext)
| | | +- remote (proxy: $Proxy97 implements interface pkg.GeneralService,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)
|
I recognize the stuff in bold: that's my stuff. I'm careful to use the JNDI name only with the .../remote suffix, so as to grab something that's compatible with my GeneralService interface.
But during deployment, I get this exception when I try to cast the result of InitialContext.lookup () to pkg.GeneralService:
| java.lang.ClassCastException: $Proxy97 cannot be cast to pkg.GeneralService
|
Can't be cast to it? But the JNDI catalog says $Proxy97 implements it! What's going on? Is this an instance of the classloader incompatibility? Why would JBoss be written to use two different classloaders in the process of loading an EJB from JNDI?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076496#4076496
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076496
18Â years, 8Â months
[JBoss Seam] - Configuring Seam Filters through components.xml
by RMcFadden94
All,
Is it possible to configure Seam Filters through the components.xml?
My Filter on Seam 1.2.1 :
@Scope(ScopeType.APPLICATION)
@Name("common.WebTrendsFilter")
public class WebTrendsFilter extends AbstractFilter {
public static final String FILTER_ENABLED = "FILTER_ENABLED";
/**
* _log - Default Logger injected from SEAM.
*/
@Logger
private Log _log;
/**
* Club configuration provider for page information.
*/
@In(value="common.clubConfigProvider")
private IClubConfigProvider _clubConfig;
My issue is that when I try to configure the filter through the web.xml, the objects with the @In annotation come up Null, and are not injected by Seam. Therefore, I tried adding it to the components.xml, but have not had any luck whatsoever. Here is what I have tried placing in components.xml:
#{common.clubConfigProvider}
#{common.viewContentProvider}
#{common.commonModuleConfig}
Is there a special tag to designate a component as a filter? If so, I am assuming you can designate a url-pattern to apply the filter too? Any help would be greatly appreciated. Thanks.
~Greg
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076490#4076490
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076490
18Â years, 8Â months