Blueprint Collaborator fails on finalize
----------------------------------------
Key: ARIES-274
URL: https://issues.apache.org/jira/browse/ARIES-274
Project: Aries
Issue Type: Bug
Components: Blueprint
Affects Versions: 0.1
Reporter: Valentin Mahrwald
Priority: Minor
A Blueprint bean with interceptors gets wrapped in a Collaborator object. When
the blueprint bundle goes away and the beans gets garbage collected the GC will
call finalize on the actual bean instance and also the wrapper that was created
around it to support interceptors. The call to the wrapper is interpreted as an
attempt to invoke the finalize method on the actual bean, which fails since
finalize is (by default) protected.
For example:
Collaborator E org.apache.aries.blueprint.proxy.Collaborator invoke
java.lang.Error: Unreachable catch statement
at org.apache.aries.blueprint.proxy.Collaborator$1.
onUnexpectedException(Collaborator.java:59)
at org.apache.aries.blueprint.proxy.Collaborator$1.
invoke(Collaborator.java:72)
at org.apache.aries.blueprint.proxy.Collaborator. invoke(Collaborator.java:148)
at <some blueprint bean with interceptors>. finalize(Unknown Source)
at java.lang.J9VMInternals.runFinalize(J9VMInternals. java:412)
Caused by: java.lang.IllegalAccessException: Class
org.apache.aries.blueprint.proxy.Collabor ator$1 can not access a member of
class java.lang.Object with modifiers "protected"
at sun.reflect.Reflection.ensureMemberAccess(Reflection. java:77)
at java.lang.reflect.Method.invoke(Method.ja va:591)
at org.apache.aries.blueprint.proxy.Collaborator$1.
invoke(Collaborator.java:66)
... 3 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.