You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "Howard M. Lewis Ship (JIRA)" <hi...@jakarta.apache.org> on 2004/11/09 20:38:24 UTC

[jira] Updated: (HIVEMIND-76) Interface inheritance can cause Javassist errors

     [ http://nagoya.apache.org/jira/browse/HIVEMIND-76?page=history ]

Howard M. Lewis Ship updated HIVEMIND-76:
-----------------------------------------

    Summary: Interface inheritance can cause Javassist errors  (was: Errors generated classes around complex interfaces)

> Interface inheritance can cause Javassist errors
> ------------------------------------------------
>
>          Key: HIVEMIND-76
>          URL: http://nagoya.apache.org/jira/browse/HIVEMIND-76
>      Project: HiveMind
>         Type: Bug
>   Components: framework
>     Versions: 1.0, 1.1
>     Reporter: Howard M. Lewis Ship
>     Assignee: Howard M. Lewis Ship
>      Fix For: 1.1

>
> For certain complex interfaces, HiveMind gets runtime errors generating a class:
>                             PM [DEBUG] Creating SingletonProxy for service kd.PM
> org.apache.hivemind.ApplicationRuntimeException: Unable to add method void close() throws javax.resource.ResourceExcepti
> on to class $SingletonProxy_1001ed04167_14: duplicate method: close
> 	at org.apache.hivemind.impl.servicemodel.SingletonServiceModel.createSingletonProxy(SingletonServiceModel.java:114)
> 	at org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getService(SingletonServiceModel.java:58)
> 	at org.apache.hivemind.impl.ServicePointImpl.getService(ServicePointImpl.java:171)
> 	at org.apache.hivemind.impl.ServicePointImpl.getService(ServicePointImpl.java:184)
> 	at org.apache.hivemind.impl.RegistryInfrastructureImpl.getService(RegistryInfrastructureImpl.java:162)
> 	at org.apache.hivemind.impl.RegistryImpl.getService(RegistryImpl.java:66)
> 	at kd.Main.main(Main.java:25)
> Caused by: org.apache.hivemind.ApplicationRuntimeException: Unable to add method void close() throws javax.resource.Reso
> urceException to class $SingletonProxy_1001ed04167_14: duplicate method: close
> 	at org.apache.hivemind.service.impl.ClassFabImpl.addMethod(ClassFabImpl.java:310)
> 	at org.apache.hivemind.impl.ProxyBuilder.addServiceMethods(ProxyBuilder.java:93)
> 	at org.apache.hivemind.impl.servicemodel.SingletonServiceModel.createSingletonProxyClass(SingletonServiceModel.java:169
> )
> 	at org.apache.hivemind.impl.servicemodel.SingletonServiceModel.createSingletonProxy(SingletonServiceModel.java:89)
> 	... 6 more
> Caused by: javassist.CannotCompileException: duplicate method: close
> 	at javassist.bytecode.ClassFile.testExistingMethod(ClassFile.java:456)
> 	at javassist.bytecode.ClassFile.addMethod(ClassFile.java:440)
> 	at javassist.CtClassType.addMethod(CtClassType.java:848)
> 	at org.apache.hivemind.service.impl.ClassFabImpl.addMethod(ClassFabImpl.java:306)
> 	... 9 more
> Exception in thread "main" 
> Investigation found that the interface in question, kodo.runtime.KodoPersistenceManager extended a number of other interfaces,
> and has conflicting definitions for method close():
> void close() throws Exception ... from com.solarmetric.util.Closeable
> void close() throws javax.resource.ResourceException ... from javax.resource.cci.Connection
> void close() ... from javax.jdo.PersistenceManager
> HiveMind was attempting to implement all of these, causing problems (same return type, same name, same parameters means there can be only one such method).
> HiveMind needs to more carefully analyze these method signatures and implement the most general case; in this case "void close() throws Exception".  This logic is centralized in the MethodIterator and MethodSignature classes.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org