« Return to Thread: cglib 2.1_3 no dep and NPE in AbstractClassGenerator
Hi Tim,
I'll update the test case and make it available shortly - thank for your interest. However, in the mean time please see the rest of this thread - the problem is that the retrieval from the weak hash map always returns a non-null object. I think some analysis tools (like findbugs) will also point this out.
Thanks
Hi Costin,
I know this is an old item, but the JIRA is still open. Is that test code you wrote still available someplace? For some odd reason I feel like debugging this :-)
Maybe best to attach the source to the JIRA item actually
thanks
-tim
Costin wrote:Hi Chris,
I've uploaded a test case which, at least on my machine, gives the error after multiple runs.
You can d/l from here: http://www.gigasize.com/get.php/-1100218755/cglib.bug.zip
It's a maven project which d/ls the requires the libraries and then bootstraps the OSGi platform and runs the test.
From what I can see, as OSGi handles the classloaders, the weakHashMap that CGLIB uses can have a certain key reclaimed during a class generation which leads to the NPE problem.
A simple if/cache population on the fly should do the trick but maybe it's something bigger.
Thanks for looking into this!
Cheers,
CostinCostin wrote:I suspect that my environment (OSGi) is to quite different then the traditional J2EEChris Nokleberg wrote:On 4/25/07, Costin <costin.leau@gmail.com> wrote:
> Basically, it seems that there the classloader asked from the cache, does
> not exist.
> The problem occured when doing some proxying on OSGi for
> java.util.ArrayList. I'm completely buffled on why this occurs - seems to be
> working fine with other java classes such as java.util.Date.
That is pretty strange. Have you made any progress? I don't really
have a good way to test this problem. If you could put a zip together
with all the necessary jars and a sample program we can probably track
it down quickly. Of course the answer may just end up being an issue
in OSGi.
Chris
but so far I haven't been able to identify the exact cause. By looking at the cglib code, it seems that the classloader should be already in the cache but I can't figure out where the initialization occurs.
I'll post back more information once I have it.
Cheers,
Costin
« Return to Thread: cglib 2.1_3 no dep and NPE in AbstractClassGenerator
| Free embeddable forum powered by Nabble | Forum Help |