-
1. Re: EJB2 Client calling EJB3 Bean
jaikiran Nov 5, 2008 5:37 AM (in response to tom.iten)"tom.iten@gmx.net" wrote:
java.lang.IllegalStateException: EJB 3.0 Core Specification Violation (4.6.7):The session bean remote interface interface ... must extend the javax.ejb.EJBObject interface.
As noted in the error message, the 4.6.7 section of the spec mentions that the EJB2.x remote interface should extend from javax.ejb.EJBObject. So you will have to change it to:
Remote Interface:@Remote public interface EJB3Remote extends javax.ejb.EJBObject { public String echo(String message); }
-
2. Re: EJB2 Client calling EJB3 Bean
tom.iten Nov 5, 2008 7:38 AM (in response to tom.iten)Hi jaikiran
- I changed the remote interface according the Error Message
- Removed the "implements EJB3Remote" clause from the Bean
(so i do not have to implement all the callbacks in EJB2.x manner)
After this changes i got a Exception during the deploy:
13:13:33,564 ERROR [AbstractKernelController] Error installing to Start: name=jboss.j2ee:ear=ejb2clienttoejb3.ear,jar=ejb2clienttoejb3-ejb.jar,name=EJB3Bean,ser
vice=EJB3 state=Create
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase.createJndiReferenceBindingSet(JndiSessionRegistrarBase.java:222)
at org.jboss.ejb3.proxy.jndiregistrar.JndiSessionRegistrarBase.bindEjb(JndiSessionRegistrarBase.java:162)
By delivering a jboss.xml descriptor file with the jndi home interface name
i could run the sample. Thanks!
best regards
Tom -
3. Re: EJB2 Client calling EJB3 Bean
alrubinger Nov 5, 2008 11:52 AM (in response to tom.iten)Because @Remote denotes a "Business Remote" interface, ie. an EJB3 view.
This is confusing because the XML element "remote" is a "Remote Component" interface ie. an EJB2.x view.
So while using annotations, you don't specify the remote component interface at all; we'll read it in from the return types of "create" methods in EJB2.x Home.
S,
ALR -
4. Re: EJB2 Client calling EJB3 Bean
alrubinger Nov 5, 2008 4:09 PM (in response to tom.iten)Actually, in this case you could use some help with the error message.
If you provide the failing case in a JIRA for JBMETA project and assign to me, I'll make sure you get back a clear indication of what's wrong via the new ValidationChain we've put in place.
S,
ALR -
5. Re: EJB2 Client calling EJB3 Bean
tom.iten Nov 10, 2008 5:01 AM (in response to tom.iten)
Hello Andrew
The case is provided as JIRA : EJBTHREE-1574
Best Regards
Tom