Bug 1193109

Summary: [QE] (6.4.0) EJBs can't inherit a JDK8 default method
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jan Martiska <jmartisk>
Component: EJBAssignee: David M. Lloyd <david.lloyd>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Martiska <jmartisk>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.4.0CC: kkhan, myarboro
Target Milestone: ER3   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1193119 (view as bug list) Environment:
Last Closed: 2019-08-19 12:44:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1104190, 1193119    

Description Jan Martiska 2015-02-16 15:12:55 UTC
Have Local interface:

public interface DogeEJBLocal {
    default public String sayWow() {
        return "wow";

and an implementation:

public class DogeEJBImpl implements DogeEJBLocal {


get an instance of the bean through the local interface and try to call sayWow. It will fail with:
org.jboss.invocation.CannotProceedException: INV000002: Invocation cannot proceed (end of interceptor chain has been hit)
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:293)
	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
	at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)
	at com.redhat.qe.jdkspecifics.jdk8.defaultmethods.direct.DogeEJBLocal$$$view2.sayWow(Unknown Source)
	at com.redhat.qe.jdkspecifics.jdk8.defaultmethods.DefaultMethodTest.testEJB(DefaultMethodTest.java:52)

It doesn't work either if the EJB inherits the method through an intermediary interface which is not marked as an EJB interface.
This is quite obviously not discussed in the 3.1 spec, but if it does work when inheriting from superclasses, I think it should work with interfaces as well.
Also, I tried this on GlassFish and it works there.

Comment 1 David M. Lloyd 2015-02-16 15:20:11 UTC
This is a real bug and definitely will require an upstream JIRA.

Comment 2 David M. Lloyd 2015-02-17 12:17:14 UTC
We have an upstream fix underway.

Comment 7 Jan Martiska 2015-02-26 13:31:51 UTC
Verified in EAP 6.4.0.ER3.