ejb@glassfish.java.net

Re: Returning a List from a Stateless EJB throws a StackOverflowError

From: Kenneth Saks <Kenneth.Saks_at_Sun.COM>
Date: Fri, 02 Mar 2007 12:45:56 -0500

Todd Patrick wrote:

>Sun Java System Application Server Platform Edition 9.0_01 (build b14)
>Java(TM) SE Runtime Environment (build 1.6.0-b105)
>JSF 1.2_03
>
>I have a method in my EJB defined as:
>
>public List<TransactRow> doFreeFormSearch(String _currentTransType, Date
>_transStartDate, String _currentTransStartTime, Date _transEndDate,
>String _currentTransEndTime, String _currentClientID, String _tbFilter)
>throws PetroException {
>
>In my JSF Backing Bean, I call the method as:
>
>@EJB private TransactionBrowserSessionRemote
>transactionBrowserSessionRemote;
>
>....
>
>try {
>List<TransactRow> results =
>transactionBrowserSessionRemote.doFreeFormSearch(this.getCurrentTransTyp
>e(), this.getTransStartDate(), this.getCurrentTransStartTime(),
>this.getTransEndDate(), this.getCurrentTransEndTime(),
>this.getCurrentClientID(), this.getTbFilter());
>
>When I return more than 500 objects in the list I receive the following
>exception:
>
>Caused by: javax.ejb.EJBException: nested exception is:
>java.rmi.ServerError: Error occurred in server thread; nested exception
>is: java.lang.StackOverflowError
>
>Is there a limit on the number of objects that I can have in my List
>when returning the List from an EJB method?
>
>
Hi Todd,

No, that shouldn't have anything to do with a StackOverflowError. Is
there any
recursion in your code ? Also, is there any additional stack
information in
the server.log? If not, try turning on FINE level logging for the
ejb-container.

 --ken


>Thanks,
>
>--Todd
>-----------------------------------------
>NOTICE: This email message is for the sole use of the intended
>recipient(s)
>and may contain confidential and privileged information. Any
>unauthorized
>use, disclosure or distribution is prohibited. If you are not the
>intended
>recipient, please contact the sender by reply email and destroy all
>copies
>of the original message.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
>
>
>