[jboss-jira] [JBoss JIRA] (WFLY-4200) WAR MDB cannot obtain superclass on module classpath
Eduardo Silva (JIRA)
issues at jboss.org
Sat May 2 17:41:45 EDT 2015
[ https://issues.jboss.org/browse/WFLY-4200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064793#comment-13064793 ]
Eduardo Silva commented on WFLY-4200:
-------------------------------------
The error is getMessageListenerInterface of MessageDrivenComponentDescriptionFactory:
private String getMessageListenerInterface(final CompositeIndex compositeIndex, final AnnotationInstance messageBeanAnnotation) throws DeploymentUnitProcessingException {
final AnnotationValue value = messageBeanAnnotation.value("messageListenerInterface");
if (value != null)
return value.asClass().name().toString();
final ClassInfo beanClass = (ClassInfo) messageBeanAnnotation.target();
final Set<DotName> interfaces = new HashSet<DotName>(getPotentialViewInterfaces(beanClass));
// check super class(es) of the bean
DotName superClassDotName = beanClass.superName();
while (interfaces.isEmpty() && superClassDotName != null && !superClassDotName.toString().equals(Object.class.getName())) {
final ClassInfo superClass = compositeIndex.getClassByName(superClassDotName);
if (superClass == null) {
break;
}
interfaces.addAll(getPotentialViewInterfaces(superClass));
// move to next super class
superClassDotName = superClass.superName();
}
if (interfaces.size() != 1)
throw EjbLogger.ROOT_LOGGER.mdbDoesNotImplementNorSpecifyMessageListener(beanClass);
return interfaces.iterator().next().toString();
}
beanClass = org.warmdbtest.MyWarMDB
superClassDotName = org.mdbtest.MySuperListener
compositeIndexValues => {org.warmdbtest.MyWarMDB=org.warmdbtest.MyWarMDB}
So superClassDotName org.mdbtest.MySuperListener is not indexed,
This breaks anc the DeploymentUnitProcessingException is called
if (interfaces.size() != 1)
throw EjbLogger.ROOT_LOGGER.mdbDoesNotImplementNorSpecifyMessageListener(beanClass);
> WAR MDB cannot obtain superclass on module classpath
> ----------------------------------------------------
>
> Key: WFLY-4200
> URL: https://issues.jboss.org/browse/WFLY-4200
> Project: WildFly
> Issue Type: Bug
> Components: Class Loading, EJB
> Affects Versions: 8.2.0.Final
> Reporter: John Mazzitelli
> Priority: Minor
> Attachments: mdb-test.zip
>
>
> see the forum post for details:
> https://developer.jboss.org/message/914355
> but suffice it to say this is similar to https://issues.jboss.org/browse/AS7-2638 which appears to have come back again.
> In my WAR, I have an MDB which extends a class (in which that superclass implements MessageListener) and that superclass is in a module that my WAR depends on; the MDB fails to deploy. I have to explicitly add an annotation attribute to workaround the problem.
> Again, see the forum for the very easy steps to replicate with a small zip file that contains the replication code.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list