Bug 1081715 - EJBException thrown when public method calls default method
Summary: EJBException thrown when public method calls default method
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EJB
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Stuart Douglas
QA Contact: Jan Martiska
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-27 19:34 UTC by Joshua Wilson
Modified: 2014-04-24 04:28 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-04-24 04:28:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
example war that has demonstraits the error (24.29 KB, application/zip)
2014-03-27 19:34 UTC, Joshua Wilson
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1060734 0 unspecified CLOSED JBAS014356 exception not thrown for @Asyncronous EJB methods 2021-02-22 00:41:40 UTC

Internal Links: 1060734

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.


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