Craig, (/Colin) ok... firstly, I'm an idiot! (o: when I said ejb-jar.xml, I of course meant web.xml - but you realised that and included it (o:
secondly, I haven't got local interfaces running on jboss myself yet, so take this with a grain of salt, and feel free to correct/inform me where appropriate. we're talking about a .war in a .ear I assume, with the .jar in the same .ear? ok - from the servlet 2.3 spec: <!-- The ejb-link element is used in the ejb-ref or ejb-local-ref elements to specify that an EJB reference is linked to an enterprise bean. The name in the ejb-link element is composed of a path name specifying the ejb-jar containing the referenced enterprise bean with the ejb-name of the target bean appended and separated from the path name by "#". The path name is relative to the war file containing the web application that is referencing the enterprise bean. This allows multiple enterprise beans with the same ejb-name to be uniquely identified. Used in: ejb-local-ref, ejb-ref Examples: <ejb-link>EmployeeRecord</ejb-link> <ejb-link>../products/product.jar#ProductEJB</ejb-link> --> <!ELEMENT ejb-link (#PCDATA)> note that this is different from the ejb-link in the ejb-jar.xml DTD. I'm not sure if I'm mis-interpreting that, but I'm thinking perhaps that the ejb-link _must_ include the jar file name. Which kinda makes sense now that I think about it. so... _if_ what I'm thinking is right, then the tag for the servlet should be: * @web:ejb-local-ref * name="ejb/PartyOrderEJBLocal" * home="au.com.ucw.cop.interfaces.PartyOrderEJBLocalHome" * local="au.com.ucw.cop.interfaces.PartyOrderEJBLocal" * type="Entity" * link="party.jar#PartyOrderEJB" big disclaimer tho - I could be way off here. Its an area I've been meaning to look at more for a while. I might try and do so tonight - let me know how this goes though. (also of course I'm assuming that your jars are in a jar named party.jar). htm dim ----- Original Message ----- From: "Craig O'Shannessy" <[EMAIL PROTECTED]> To: "Dmitri Colebatch" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: "Colin Daly" <[EMAIL PROTECTED]> Sent: Monday, February 04, 2002 5:07 PM Subject: Re: [Xdoclet-user] jndi problems with webdoclet local ref > Hi Dimitri, > > We are using JBoss-2.4.4_Tomcat-4.0.1-beta > > The beans are coded to the 2.0 spec (with xdoclet), then converted to 1.1 > BMP using the MVCSoft engine. > > I am trying to get a ref (local) from a servlet (embedded tomcat), using > the util class generated by xdoclet > > PartyOrderEJBLocal partyOrder = PartyOrderEJBUtil. > getLocalHome().findByPartyOrderNumber(partyNumber) > > Below are the details you requested. > > Thanks > > Craig O'Shannessy > > ---- Here is the beans partial descriptor, from ejb-jar.xml > <entity> > <ejb-name>PartyOrderEJB</ejb-name> > <local-home>au.com.ucw.cop.interfaces.PartyOrderEJBLocalHome</local-home> > <local>au.com.ucw.cop.interfaces.PartyOrderEJBLocal</local> > <ejb-class>au.com.ucw.cop.PartyOrderEJB1012790945636</ejb-class> > <persistence-type>Bean</persistence-type> > > ---- Here is a working local ref from a session bean, from ejb-jar.xml > <ejb-local-ref> > <ejb-ref-name>ejb/PartyOrderEJBLocal</ejb-ref-name> > <ejb-ref-type>Entity</ejb-ref-type> > <local-home>au.com.ucw.cop.interfaces.PartyOrderEJBLocalHome</local-home> > <local>au.com.ucw.cop.interfaces.PartyOrderEJBLocal</local> > <ejb-link>PartyOrderEJB</ejb-link> > </ejb-local-ref> > > ---- Here is the failing local ref from the servlet, from web.xml > <ejb-local-ref> > <ejb-ref-name>ejb/PartyOrderEJBLocal</ejb-ref-name> > <ejb-ref-type>Entity</ejb-ref-type> > <local-home>au.com.ucw.cop.interfaces.PartyOrderEJBLocalHome</local-home> > <local>au.com.ucw.cop.interfaces.PartyOrderEJBLocal</local> > <ejb-link>PartyOrderEJB</ejb-link> > </ejb-local-ref> > > Here is the stacktrace : > javax.naming.NameNotFoundException: ejb not bound > at org.jnp.server.NamingServer.getBinding(NamingServer.java:495) > at org.jnp.server.NamingServer.getBinding(NamingServer.java:503) > at org.jnp.server.NamingServer.getObject(NamingServer.java:509) > at org.jnp.server.NamingServer.lookup(NamingServer.java:253) > at org.jnp.server.NamingServer.lookup(NamingServer.java:256) > at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349) > at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:457) > at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333) > at javax.naming.InitialContext.lookup(InitialContext.java:350) > at >au.com.ucw.cop.interfaces.PartyOrderEJBUtil.getLocalHome(PartyOrderEJBUtil.java:73) > at au.com.ucw.cop.servlet.ReportServlet.handle(ReportServlet.java:96) > at org.webmacro.servlet.WMServlet.doRequest(WMServlet.java:269) > at org.webmacro.servlet.WMServlet.doGet(WMServlet.java:202) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) > at >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) > at >org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) > at >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at >org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at >org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201) > at >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at >org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) > at >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at >org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) > at >org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) > at >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at >org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) > at >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at >org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) > at >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at >org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at >org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) > at >org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at >org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at >org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011) > at >org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106) > at java.lang.Thread.run(Thread.java:539) > > > Subject: Re: [Xdoclet-user] jndi problems with webdoclet local ref > > Date: Mon, 4 Feb 2002 15:21:05 +1100 > > From: "Dmitri Colebatch" <[EMAIL PROTECTED]> > > To: "Colin Daly" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> > > > > > > > here is the ref to the bean which is taken > > > from a servlet - this gives me ejb not bound > > > messages to the web page - i've tried a load > > > of combinations and I can't get it right. Any > > > advice would be greatly appreciated. > > > > > > * @web:ejb-local-ref > > > * name="ejb/PartyOrderEJBLocal" > > > * home="au.com.ucw.cop.interfaces.PartyOrderEJBLocalHome" > > > * local="au.com.ucw.cop.interfaces.PartyOrderEJBLocal" > > > * type="Entity" > > > * link="PartyOrderEJB" > > > > The problem could be in a number of places. Could you tell us what app > > server you're using, and maybe show us the last part of the ejb-jar.xml file > > (the bit with the ejb-refs). ANd also the code that is getting the > > exception, and stack trace? (o: not too much hey! hehe (and... and...) > > > > cheers > > dim > > > > > > _______________________________________________ > > Xdoclet-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/xdoclet-user > > > > ------------------------------------------------------- > > > > _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
