[JBoss JIRA] Created: (JBAOP-348) NPE on ConstructorCallMatcher
by Flavia Rainone (JIRA)
NPE on ConstructorCallMatcher
-----------------------------
Key: JBAOP-348
URL: http://jira.jboss.com/jira/browse/JBAOP-348
Project: JBoss AOP
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 2.0.0.alpha2
Reporter: Flavia Rainone
Fix For: 2.0.0.alpha3
This bug happens on generated advsior instrumentation, in the following scenario:
- class A extends B
- B is advised by AOP
- A is not advised by AOP
- B calls constructor of A
- calls to A constructor are identified by a pointcut
During the instrumentation of a class B, the call to constructor of A is identified. As a consequence, during the matching process, A temporary advisor is required, through AspectManager.getTempClassAdvisorIfNotExist method. This method identifies A as advisable (since it extends an advisable class, B) and tries to retrieve its advisor instead of getting a temporary class advisor. Since A doesn't have the class advisor field, aspect manager retrieves its super class advisor. However, this value isn't set yet because we are still instrumenting B class. Hence, a null advisor is returned, what triggers the NullPointerException on ConstructorCallMatcher.
To reproduce this bug, it is enough to alter beforeafterArgs tests, by making TargetCallerPOJO a superclass of TargetCallerPOJO2.
The stack trace:
java.lang.ExceptionInInitializerError
at org.jboss.test.aop.beforeafterArgs.CallerTestCase.setUp(CallerTestCase.java:60)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
at org.jboss.aop.ClassAdvisor.doResolveCallerConstructorInfo(ClassAdvisor.java:1563)
at org.jboss.aop.ClassAdvisor.access$400(ClassAdvisor.java:83)
at org.jboss.aop.ClassAdvisor$ResolveCallerConstuctorInfoAction$1.run(ClassAdvisor.java:2028)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.aop.ClassAdvisor$ResolveCallerConstuctorInfoAction$1 .resolveInfo(ClassAdvisor.java:2024)
at org.jboss.aop.ClassAdvisor.resolveCallerConstructorInfo(ClassAdvisor.java:1527)
at org.jboss.test.aop.beforeafterArgs.TargetCallerPOJO$TargetCallerPOJOAdvisor.initialiseCallers(TargetCallerPOJO$TargetCallerPOJOAdvisor.java)
at org.jboss.test.aop.beforeafterArgs.TargetCallerPOJO$TargetCallerPOJOAdvisor.initialise(TargetCallerPOJO$TargetCallerPOJOAdvisor.java)
at org.jboss.test.aop.beforeafterArgs.TargetCallerPOJO$TargetCallerPOJOAdvisor.<init>(TargetCallerPOJO$TargetCallerPOJOAdvisor.java)
at org.jboss.test.aop.beforeafterArgs.TargetCallerPOJO.<clinit>(TargetCallerPOJO.java)
... 13 more
Caused by: java.lang.RuntimeException:java.lang.NullPointerException
at org.jboss.aop.pointcut.ConstructorCallMatcher.visit(ConstructorCallMatcher.java:76)
at org.jboss.aop.pointcut.ast.ASTCall.jjtAccept(ASTCall.java:41)
at org.jboss.aop.pointcut.MatcherHelper.visit(MatcherHelper.java:89)
at org.jboss.aop.pointcut.MatcherHelper.matches(MatcherHelper.java:83)
at org.jboss.aop.pointcut.PointcutExpression.matchesCall(PointcutExpression.java:243)
at org.jboss.aop.ClassAdvisor.doResolveCallerConstructorInfo(ClassAdvisor.java:1548)
... 22 more
Caused by: java.lang.NullPointerException
at org.jboss.aop.pointcut.ConstructorMatcher.<init>(ConstructorMatcher.java:61)
at org.jboss.aop.pointcut.ConstructorCallMatcher.visit(ConstructorCallMatcher.java:71)
.. 27 more
--
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 1 month
[JBoss JIRA] Created: (JBPORTAL-1492) wsrp consumer configuration issie
by Prabhat Jha (JIRA)
wsrp consumer configuration issie
---------------------------------
Key: JBPORTAL-1492
URL: http://jira.jboss.com/jira/browse/JBPORTAL-1492
Project: JBoss Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Portal WSRP
Affects Versions: 2.6 CR3
Reporter: Prabhat Jha
Assigned To: Chris Laprun
Fix For: 2.6 Final
Not sure if it's working as designed but this needs to change:
When you create a consumer and go to its configuration page and hit cancel, I see that consumer in the list which is fine because you can re-configure it again but I am not able to destroy it. I get
Couldn't deregisterConsumer with id 'cons1' Cause: Cannot deregister producer 'cons1' as it's not registered
where 'cons1' is the name I gave.
--
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 1 month