-
1. Re: No remote interface exception within an ear
ppetit Nov 20, 2003 5:22 AM (in response to ppetit)Hi Forum,
Still stuck with a class trying to use an EJB.
All are packaged in the same JAR.
The EJB declares only local interfaces :
<ejb-name>Title</ejb-name>
<local-home>com.foo.ejb.TitleHome</local-home>
com.foo.ejb.Title
<ejb-class>com.foo.ejb.TitleBeanBMP</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.math.BigDecimal</prim-key-class>
False
The jboss.xml declares JNDI like this :
<ejb-name>Title</ejb-name>
<local-jndi-name>ejb/foo/local/Title</local-jndi-name>
<resource-ref>
<res-ref-name>jdbc/MSSQLDS</res-ref-name>
<jndi-name>java:/MSSQLDS</jndi-name>
</resource-ref>
I access like this :
InitialContext iniCtx = new InitialContext();
TitleHome home = (TitleHome ) iniCtx.lookup("ejb/foo/local/Title");
Title title= home.findByPrimaryKey(new BigDecimal(cookie));
BigDecimal statut = title.getStsId();
All get fine until the invocation of title.getStsId();
I get here a :
javax.ejb.EJBException: null; CausedByException is:
No remote interface defined.
at org.jboss.ejb.plugins.BMPPersistenceManager.loadEntity(BMPPersistenceManager.java:433)
I don't understand what's happening. I haven't defined any JNDI properties as we are in same VM...
Where could I be wrong ?
Please Help...