Bug 1081715

Summary: EJBException thrown when public method calls default method
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Joshua Wilson <jowilson>
Component: EJBAssignee: Stuart Douglas <sdouglas>
Status: CLOSED NOTABUG QA Contact: Jan Martiska <jmartisk>
Severity: unspecified Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-24 04:28:47 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:
Embargoed:
Attachments:
Description Flags
example war that has demonstraits the error none

Description Joshua Wilson 2014-03-27 19:34:48 UTC
Created attachment 879596 [details]
example war that has demonstraits the error

Description of problem:

I have a REST endpoing app that has the REST service class and the DAO class in the same package.  This should allow me to keep the DAO methods scoped to 'default'.  The service endpoints are public.  It builds fine but it will not deploy. 

I get the following error:

ERROR [org.jboss.as.ejb3.invocation] (http-/127.0.0.1:8080-1) JBAS014134: EJB Invocation failed on component ContactService for method public java.util.List org.jboss.quickstarts.wfk.contact.ContactService.listAllContacts(): javax.ejb.EJBException: JBAS014356: Not a business method java.util.List org.jboss.quickstarts.wfk.contact.ContactDAO.findAllOrderedByName(). Do not call non-public methods on EJB's

If I change the DAO method to public then it works, but I do not think that is how it is supposed to work. 


Version-Release number of selected component (if applicable):

I'm running it on EAP 6.3 DR 05


How reproducible:
very

Steps to Reproduce:
1. deploy the attached war
2. go to the website
3. click on the JSON link

Actual results:
error

Expected results:
to get back JSON

Additional info:

Comment 1 David M. Lloyd 2014-03-27 19:40:14 UTC
No sources is not super useful, but either way, EJB methods have to be public by spec AFAIK.

Comment 2 Joshua Wilson 2014-03-27 20:04:22 UTC
I plan on linking the source as soon as I get it pushed (hopefully tonight). 

The DAO is marked @Stateless, I didn't realize that it force the methods to be public.

Let me test a few things and once confirmed I will cancel the bug.