geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder (JIRA)" <>
Subject [jira] Commented: (GERONIMO-1851) Proxy logic busted
Date Sat, 15 Apr 2006 00:33:00 GMT
    [ ] 

Aaron Mulder commented on GERONIMO-1851:

That is, appears to be caused by *a change to* BasicProxyManager.createProxy(name, ClassLoader)
to include classes with an empty constructor in addition to interfaces (this was a change
made in 1.1 but not HEAD).  So I'm changing the behavior back to match HEAD.  (I'm not touching
the method where you give it a class or interface and it builds a proxy for exactly that.)

The 1.1 behavior also had the side effect (in the console) of a lot of complaints that "interface
'concrete-class-name' could not be found in the specified class loader".  I'll be just as
happy to eliminate those by making this change.

Assigned this issue to Dain because we discussed the issue previously before I realized that
it had actual harmful side effects and I'd like him to review the change.

(PostScript: Spoke to Dain and he blessed the change).

> Proxy logic busted
> ------------------
>          Key: GERONIMO-1851
>          URL:
>      Project: Geronimo
>         Type: Bug
>     Security: public(Regular issues) 
>   Components: kernel
>     Versions: 1.1
>     Reporter: Aaron Mulder
>     Assignee: Dain Sundstrom
>     Priority: Critical
>      Fix For: 1.1

> If you go to the Import/Export portlet in 1.1, you get this:
> UNEXPECTED ERROR for class org.apache.geronimo.jetty.JettyWebAppContext$$EnhancerByCGLIB$$1b72c5bb
> java.lang.ArrayIndexOutOfBoundsException: -1
>         at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.createGBeanInvokers(
>         at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.<init>(
>         at org.apache.geronimo.kernel.basic.BasicProxyManager.getMethodInterceptor(
>         at org.apache.geronimo.kernel.basic.BasicProxyManager$ManagedProxyFactory.createProxy(
>         at org.apache.geronimo.kernel.basic.BasicProxyManager.createProxy(
>         at org.apache.geronimo.console.util.KernelManagementHelper.getModuleForConfiguration(
> The error is generated at the last line of this snippet of ProxyMethodInterceptor:
>             invokers[getSuperIndex(proxyType, proxyType.getMethod("equals", new Class[]{Object.class}))]
= new EqualsInvoke(kernel);
>             invokers[getSuperIndex(proxyType, proxyType.getMethod("hashCode", null))]
= new HashCodeInvoke();
>             invokers[getSuperIndex(proxyType, proxyType.getMethod("toString", null))]
= new ToStringInvoke(proxyType.getName());
>             if(GeronimoManagedBean.class.isAssignableFrom(proxyType)) {
>                 invokers[getSuperIndex(proxyType, proxyType.getMethod("getState", null))]
= new GetStateInvoke(kernel);
>                 invokers[getSuperIndex(proxyType, proxyType.getMethod("getStateInstance",
null))] = new GetStateInstanceInvoke(kernel);
>                 invokers[getSuperIndex(proxyType, proxyType.getMethod("start", null))]
= new StartInvoke(kernel);
> In other words, it is returning a -1 from getSuperIndex on the "start()" method for the
proxyType.  However, the "if" statement established that ProxyType is assignable to GeronimoManagedBean,
which has a "start()" method.
> So it seems like the logic that constructs the invokers and/or whatever getSuperIndex
uses is not finding all the methods that the proxy exposes, or else there are some classloader
issues causing identical methods to be detected as different, etc.
> The logic displayed above is unchanged from HEAD where the same portlet works, though
the portlet code has changed significantly.  I'm not sure what's different elsewhere in the
ProxyMethodInterceptor class or the rest of the proxy infrastructure.
> To replicate this, start Geronimo, and click the "Plugins" entry in the console.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message