Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004512 [Resin] major always 04-19-11 00:23 04-26-11 14:18
Reporter andreaskaltenbach View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 4.0.17
Summary 0004512: IllegalStateException for stateless session bean implementing generic interface
Description Given the following hierarchy:

interface Importer<T>
interface StringImporter extends Importer<String>
@Stateless class StringImporterImpl implements StringImporter

The Importer<T> interface defines a generic method: void doImport(T t)

For the stateless bean, Resin tries to generate a proxy class and fails with the following message:
java.lang.IllegalStateException: AnnotatedMethodImpl[public abstract void bugreport.beans.Importer.doImport(java.lang.Object)] does not have a matching base method in AnnotatedTypeImpl[class bugreport.beans.StringImporterImpl]

It seems that the generic type on method level is misinterpreted when generating the proxy class. Instead of String, java.lang.Object is taken as argument.

Note: This issue is a more detailed variant of bug 0004467. Enclosed you find an example maven project which reproduces the bug. A patch (inevidently just a workaround) is provided in bug 0004467.
Additional Information Full stack trace:

java.lang.IllegalStateException: AnnotatedMethodImpl[public abstract void bugreport.beans.Importer.doImport(java.lang.Object)] does not have a matching base method in AnnotatedTypeImpl[class bugreport.beans.StringImporterImpl]
                                   at com.caucho.ejb.gen.SessionGenerator.introspectMethod(SessionGenerator.java:244)
                                   at com.caucho.ejb.gen.SessionGenerator.introspectType(SessionGenerator.java:226)
                                   at com.caucho.ejb.gen.SessionGenerator.introspect(SessionGenerator.java:206)
                                   at com.caucho.ejb.gen.StatelessGenerator.introspect(StatelessGenerator.java:177)
                                   at com.caucho.ejb.session.AbstractSessionManager.bind(AbstractSessionManager.java:251)
                                   at com.caucho.ejb.manager.EjbManager.bind(EjbManager.java:540)
                                   at com.caucho.ejb.manager.EjbManager.environmentBind(EjbManager.java:662)
                                   at com.caucho.loader.EnvironmentClassLoader.bind(EnvironmentClassLoader.java:864)
                                   at com.caucho.loader.EnvironmentClassLoader.start(EnvironmentClassLoader.java:883)
                                   at com.caucho.server.webapp.WebApp.start(WebApp.java:3136)
                                   at com.caucho.env.deploy.DeployController.startImpl(DeployController.java:652)
                                   at com.caucho.env.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:77)
                                   at com.caucho.env.deploy.DeployController.startOnInit(DeployController.java:515)
                                   at com.caucho.env.deploy.DeployContainer.start(DeployContainer.java:171)
                                   at com.caucho.server.webapp.WebAppContainer.start(WebAppContainer.java:713)
                                   at com.caucho.server.host.Host.start(Host.java:676)
                                   at com.caucho.env.deploy.DeployController.startImpl(DeployController.java:652)
                                   at com.caucho.env.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:77)
                                   at com.caucho.env.deploy.DeployController.startOnInit(DeployController.java:515)
                                   at com.caucho.env.deploy.DeployContainer.start(DeployContainer.java:171)
                                   at com.caucho.server.host.HostContainer.start(HostContainer.java:542)
                                   at com.caucho.server.cluster.Server.start(Server.java:1227)
                                   at com.caucho.server.cluster.ServletService.start(ServletService.java:72)
                                   at com.caucho.env.service.ResinSystem.startServices(ResinSystem.java:508)
                                   at com.caucho.env.service.ResinSystem.start(ResinSystem.java:476)
                                   at com.caucho.server.resin.Resin.start(Resin.java:950)
                                   at com.caucho.server.resin.Resin.initMain(Resin.java:1078)
                                   at com.caucho.server.resin.Resin.main(Resin.java:1375)
Attached Files  BugReport.zip [^] (7,894 bytes) 04-19-11 00:23

- Relationships

- Notes
(0005202)
ferg
04-26-11 14:18

ejb/40c7
 

- Issue History
Date Modified Username Field Change
04-19-11 00:23 andreaskaltenbach New Issue
04-19-11 00:23 andreaskaltenbach File Added: BugReport.zip
04-26-11 14:18 ferg Note Added: 0005202
04-26-11 14:18 ferg Assigned To  => ferg
04-26-11 14:18 ferg Status new => closed
04-26-11 14:18 ferg Resolution open => fixed
04-26-11 14:18 ferg Fixed in Version  => 4.0.18


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
31 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker