[
https://issues.jboss.org/browse/JBMDR-73?page=com.atlassian.jira.plugin.s...
]
Richard Kennard commented on JBMDR-73:
--------------------------------------
Ales,
Many thanks for attaching the JAR. I'm afraid it does not seem to work for me? I still
get...
Caused by: java.lang.IllegalStateException: No original methods found: Caused by:
java.lang.IllegalStateException: No original methods found: public
com.kennardconsulting.core.ejb.entity.NamedEntity
com.myapp.EventBean.loadByExample(java.lan
g.Class,com.kennardconsulting.core.ejb.entity.BaseEntity)
at
org.jboss.metadata.plugins.loader.reflection.AnnotatedElementMetaDataLoader.searchForRealBridgeMethodSignature(AnnotatedElementMetaDataLoader.java:379)
[jboss-mdr.jar:2.2.1-SNAPSHOT]
at
org.jboss.metadata.plugins.loader.reflection.AnnotatedElementMetaDataLoader.getComponentMetaDataRetrieval(AnnotatedElementMetaDataLoader.java:193)
[jboss-mdr.jar:2.2.1-SNAPSHOT]
at
org.jboss.metadata.plugins.context.AbstractMetaDataContext.getComponentMetaDataRetrieval(AbstractMetaDataContext.java:287)
[jboss-mdr.jar:2.2.1-SNAPSHOT]
at
org.jboss.metadata.plugins.context.AbstractMetaDataContext.getComponentMetaDataRetrieval(AbstractMetaDataContext.java:298)
[jboss-mdr.jar:2.2.1-SNAPSHOT]
at
org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge.getComponentMetaData(MetaDataRetrievalToMetaDataBridge.java:168)
[jboss-mdr.jar:2.2.1-SNAPSHOT]
at
org.jboss.ejb3.metadata.annotation.AnnotationRepositoryToMetaData.resolveAnnotation(AnnotationRepositoryToMetaData.java:379)
[:1.0.0]
at
org.jboss.ejb3.aop.annotation.CachingAnnotationRepository.resolveAnnotation(CachingAnnotationRepository.java:276)
[:1.7.17]
The error is in 'EventBean'. The method referred to is in a base class 3 levels
deep and is defined using generics...
public class EventBean
extends SpecificNamedEntityBean<Event>
implements IEventBean {
...loadByExample not overridden...
}
public abstract class SpecificNamedEntityBean<NE extends NamedEntity>
extends NamedEntityBean<NE> {
...loadByExample not overridden...
}
public class NamedEntityBean<NE extends NamedEntity>
extends PersistentEntityBean<NE>
implements INamedEntityBean<NE> {
...loadByExample not overridden...
}
public class PersistentEntityBean<PE extends PersistentEntity>
extends BaseSessionBean
implements IPersistentEntityBean<PE> {
public PE loadByExample( Class<PE> entity, BaseEntity example ) {
}
Note that the method quoted in the error appears to be getting the generics wrong. It
should be referring to 'Event loadByName( Class, name )' not 'NamedEntity
loadByName( Class, BaseEntity )'. Is that significant?
Richard.
"No original methods found" error when deploying EJBs that
extend base classes
------------------------------------------------------------------------------
Key: JBMDR-73
URL:
https://issues.jboss.org/browse/JBMDR-73
Project: JBoss MetaData Repository
Issue Type: Bug
Components: Loader, MetaData
Reporter: Richard Kennard
Assignee: Ales Justin
Priority: Critical
Attachments: JBAS-8780.patch, jboss-mdr.jar
An error, new to JBoss 6 (works okay in JBoss 5.1.0)...
"java.lang.IllegalStateException: No original methods found"
...halts deployment when you try to deploy an EJB that subclasses a base class with
public methods.
For example, if you have a base class 'PersistentEntityBean' that has a bunch of
methods related to loading/saving/deleting, and then you extend that base class with
'EmployerBean' simply to override loading/saving (but without adding any extra
methods), it will fail to deploy.
A workaround (from the forum) appears to be to override *every* subclassed method and
just call 'super'. However this error even occurs for public final methods, which
clearly cannot be overridden.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira