NullPointerException in
ComponentInterceptorAnnotationParsingProcessor.processInterceptorConfigs
------------------------------------------------------------------------------------------------
Key: JBAS-8964
URL:
https://issues.jboss.org/browse/JBAS-8964
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 7.0.0.Beta1
Environment: JBoss AS7 trunk (as well as 7.0 Beta1)
Reporter: jaikiran pai
Assignee: jaikiran pai
For some (EJB3) deployments the following NullPointerException is thrown.
{code}
Caused by: java.lang.NullPointerException
at
org.jboss.as.ee.component.ComponentInterceptorAnnotationParsingProcessor.processInterceptorConfigs(ComponentInterceptorAnnotationParsingProcessor.java:100)
at
org.jboss.as.ee.component.ComponentInterceptorAnnotationParsingProcessor.processInterceptorConfigs(ComponentInterceptorAnnotationParsingProcessor.java:74)
at
org.jboss.as.ee.component.ComponentInterceptorAnnotationParsingProcessor.processComponentConfig(ComponentInterceptorAnnotationParsingProcessor.java:67)
at
org.jboss.as.ee.component.AbstractComponentConfigProcessor.deploy(AbstractComponentConfigProcessor.java:53)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:102)
... 4 more
{code}
The root cause is a typo in the for loop:
{code}
final List<AnnotationInstance> excludeDefaultAnnotations =
classAnnotations.get(EXCLUDE_DEFAULT_ANNOTATION_NAME);
....
....
//process the ExcludeClassInterceptors annotation
final List<AnnotationInstance> excludeClassAnnotations =
classAnnotations.get(EXCLUDE_CLASS_ANNOTATION_NAME);
if(excludeClassAnnotations != null ) {
for(AnnotationInstance annotation : excludeDefaultAnnotations) {
{code}
Notice the use of excludeDefaultAnnotations in the for loop instead of
excludeClassAnnotations.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira