On Jul 9, 2008, at 2:34 AM, chawax wrote:


Yes, that was the problem ! I replaced <local> with <business-local> and
everything works perfect now !
Thanks a lot David.

Looks like we did have some validation logic in there for checking usage of the <remote> and <local> elements, but it only kicked in if you also specify the related <home> or <local-home> interface.

I've fixed that and also made the code check for this very specific mistake and issue an appropriate message. We now have about 44 different error messages we're prepared to issue in regards to misuse of either the <home>, <remote>, <local-home>, <local>, <business- local> and <business-remote> elements. That should be enough :)

-David

David Blevins wrote:


The issue is <local> must refer to interfaces that extend
javax.ejb.EJBLocalObject, i.e. the old style EJB 2.x interfaces.  You
just need to update your descriptor to use the <business-local>
element instead as in:

  <session>
     <ejb-name>EmployeeServiceBean</ejb-name>
     <business-local>t4.core.employee.EmployeeServiceLocal</business-
local>
     <ejb-class>t4.core.employee.EmployeeServiceBean</ejb-class>
     <session-type>Stateless</session-type>
     <transaction-type>Container</transaction-type>
  </session>

That should fix the issue.  Alternatively, you can let the annotation
do the work and leave EmployeeServiceLocal out of your ejb-jar.xml
entirely.



--
View this message in context: 
http://www.nabble.com/ClassCastException-on-JNDI-lookup-tp18342366p18357709.html
Sent from the OpenEJB User mailing list archive at Nabble.com.



Reply via email to