[ http://jira.jboss.com/jira/browse/JBAOP-56?page=history ] Ben Wang reopened JBAOP-56: ---------------------------
Bill, I am re-opening this issue since I just realized perhaps nothing has been done according to Adrian's comment. I thought I have made myself clear and the comemnts in the forum thread as well. But I will re-iterate the problem here again. Please keep in mind this has nothing to do with JBossCache. Any aop user will run into this problem when doing instrumentation. 1. For import package statements that are not used anywhere in the code. True, a user needs to clean up. But it can happen that during compile time, the package library is in the classpath, but during runtime it is not. Aop/Javassist will spew out a huge exception stack that is diccifult to trace during load time. I propose we need to re-package the exception and make it more verbose. 2. For import package statement that is actually used in the code but is not needed in particular runtime (for example, I don't need JNDI lookup when I am running outside AS). In this case, Javassist will puke if the package is not around. Now this is a legitimate use case since, for example, we package JBossCache to be run inside and outside of AS with the same jar. Solution? Offer a flag maybe to allow Javassist to continue even if the package is not found. What do you think? -Ben > Better handling of unused import package by Javassist at runtime > ---------------------------------------------------------------- > > Key: JBAOP-56 > URL: http://jira.jboss.com/jira/browse/JBAOP-56 > Project: JBoss AOP > Type: Feature Request > Reporter: Ben Wang > Assignee: Bill Burke > Fix For: 1.1 > > > We run into this problem in JBossCache and I have seen this at a customer > site as well. > In JBossCache, for example, we import a jboss jndi package since we need to > expose jndi inside JBoss AS. However, this code path is not used when running > as a standalone. So once it is compiled properly inside JBoss, I can still > run JBossCache outside the container. > But this will generate error when running JBossCacheAop as a standalone. The > reason is that Javassist will try to byte-code generate every single import > package specified in the class. If not found, an exception will be thrown and > stopped. In the aforementioned example, I should expect to see Javassist to > just generate a warning against this and keep going. > So I see two possible enhancements: > 1. Generate better debugging message so user realize what's going on. Current > one is burried inside a huge stack trace. > 2. Have a switch somewhere (can be inside aopc) that allows the user to carry > forward. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development