Bug 1193119 - EJBs Can't Inherit a Java 8 Default Method
Summary: EJBs Can't Inherit a Java 8 Default Method
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB
Version: 6.3.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: One-off release
Assignee: David M. Lloyd
QA Contact: Jan Martiska
URL:
Whiteboard:
Depends On: 1193109
Blocks: 1195283
TreeView+ depends on / blocked
 
Reported: 2015-02-16 15:34 UTC by Jan Martiska
Modified: 2015-03-10 18:15 UTC (History)
4 users (show)

Fixed In Version:
Clone Of: 1193109
Environment:
Last Closed: 2015-03-10 18:15:33 UTC
Type: Support Patch
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1195283 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Issue Tracker WFLY-4354 0 Major Closed EJBs can't inherit a JDK8 default method 2019-03-27 12:25:54 UTC
Red Hat Product Errata RHBA-2015:0673 0 normal SHIPPED_LIVE Red Hat JBoss Enterprise Application Platform 6.3.3 bug fix update 2015-03-10 22:14:55 UTC

Internal Links: 1195283

Description Jan Martiska 2015-02-16 15:34:43 UTC
+++ This bug was initially created as a clone of Bug #1193109 +++

Have Local interface:

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

and an implementation:

@Stateless
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.

--- Additional comment from David M. Lloyd on 2015-02-16 10:20:11 EST ---

This is a real bug and definitely will require an upstream JIRA.

Comment 7 Jan Martiska 2015-03-06 09:11:55 UTC
This is fixed via individual patch in BZ 1195283. For details see that bugzilla.

Comment 9 errata-xmlrpc 2015-03-10 18:15:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0673.html


Note You need to log in before you can comment on or make changes to this bug.