geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lasantha Ranaweera <lasan...@opensource.lk>
Subject Re: NameNotFoundException -Reg
Date Fri, 05 Jan 2007 10:46:07 GMT
Hi Kamal,

Looks like your EJB's are remotely referred ones. So better way to do it 
is adding tags in to the web.xml file and geronimo-web.xml as given below.

web.xml
<ejb-ref>
<ejb-ref-name>ejb/LoanManager</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>
org.apache.geronimo.samples.loan.ejb.LoanManagerHome
</home>
<remote>
org.apache.geronimo.samples.loan.ejb.LoanManager
</remote>
<ejb-link>LoanManager</ejb-link>
</ejb-ref>

geronimo-web.xml

<naming:ejb-ref>
<naming:ref-name>ejb/LoanManager</naming:ref-name>
<naming:ejb-link>LoanManager</naming:ejb-link>
</naming:ejb-ref>

For more information please refer
http://cwiki.apache.org/GMOxDOC11/ejb-sample-application.html

Hope this help.

Lasantha Ranaweera

Kamalanathan Raman wrote:
>
> Kevan ,
>
> Thanks kevan , now my application is running , the jars inside the 
> Web-inf/lib was corrupt , got it rectified . But now iam getting this 
> error
>
> 19:35:23,546 ERROR [ServiceLocator] Fail to find EJB home for 
> java:comp/env/ejb/TransactionSession
>
> _javax.naming.NameNotFoundException_: Could not resolve abstract name 
> query 
> [Deploy_Lockbox/wlbxbiz/rc/?name=TransactionSessionEJB#org.openejb.EJBContainer] 
> in configuration default/wlbxapp.ear/1167919492953/ear
>
> at 
> org.openejb.proxy.EJBProxyReference.getEJBProxyFactory(_EJBProxyReference.java:111_)
>
> at 
> org.openejb.proxy.EJBProxyReference.getContent(_EJBProxyReference.java:90_)
>
> at 
> org.apache.geronimo.naming.enc.CachingReference.resolveReference(_CachingReference.java:55_)
>
> at 
> org.apache.geronimo.naming.enc.CachingReference.get(_CachingReference.java:45_)
>
> at 
> org.apache.geronimo.naming.enc.AbstractReadOnlyContext.lookup(_AbstractReadOnlyContext.java:86_)
>
> at 
> org.apache.geronimo.naming.java.RootContext.lookup(_RootContext.java:51_)
>
> at javax.naming.InitialContext.lookup(Unknown Source)
>
> at com.symcor.wlbx.util.ServiceLocator.getHome(_ServiceLocator.java:163_)
>
> at 
> com.symcor.wlbx.web.servlet.ReportServlet.initializeResourceLookups(_ReportServlet.java:907_)
>
> at 
> com.symcor.wlbx.web.servlet.ReportServlet.init(_ReportServlet.java:668_)
>
> at 
> org.apache.catalina.core.StandardWrapper.loadServlet(_StandardWrapper.java:1105_)
>
> at 
> org.apache.catalina.core.StandardWrapper.load(_StandardWrapper.java:932_)
>
> at 
> org.apache.catalina.core.StandardContext.loadOnStartup(_StandardContext.java:3915_)
>
> at 
> org.apache.catalina.core.StandardContext.start(_StandardContext.java:4176_)
>
> at 
> org.apache.geronimo.tomcat.GeronimoStandardContext.access$201(_GeronimoStandardContext.java:67_)
>
> at 
> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(_GeronimoStandardContext.java:337_)
>
> at 
> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(_GeronimoBeforeAfterValve.java:31_)
>
> at 
> org.apache.geronimo.tomcat.GeronimoStandardContext.start(_GeronimoStandardContext.java:192_)
>
> at 
> org.apache.catalina.core.ContainerBase.addChildInternal(_ContainerBase.java:759_)
>
> I have one query , like iam using home and remote interface to refer 
> to another EJB . So how shud I put the references in geronimo-web.xml. 
> I have attached web.xml
>
> <ejb-ref id="EjbRef_3">
>
> <ejb-ref-name>ejb/TransactionSession</ejb-ref-name>
>
> <ejb-ref-type>Session</ejb-ref-type>
>
> <home>com.symcor.wlbx.biz.ejb.transaction.TransactionSessionHome</home>
>
> <remote>com.symcor.wlbx.biz.ejb.transaction.TransactionSession</remote>
>
> </ejb-ref>
>
> How should I add the references in Geronimo-web.xml . Currently iam 
> adding the EJB jars in the repository and referring to it by this way
>
> <ejb-ref>
>
> <ref-name>ejb/TransactionSession</ref-name>
>
> <pattern>
>
> <groupId>Deploy_Lockbox</groupId>
>
> <artifactId>wlbxbiz</artifactId>
>
> <version>rc</version>
>
> <name>TransactionSessionEJB</name>
>
> </pattern>
>
> </ejb-ref>
>
> What is the correct way to go about it. If I don`t do this iam getting 
> “ Could not find EJB for reference ejb/AuthenticateSession having home 
> interface …and remote interface….”
>
> Can u help me out in this regard.
>
> Thanks and Regards,
>
> Kamal
>
> **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended 
> solely for the use of the addressee(s). If you are not the intended 
> recipient, please notify the sender by e-mail and delete the original 
> message. Further, you are not to copy, disclose, or distribute this 
> e-mail or its contents to any other person and any such actions are 
> unlawful. This e-mail may contain viruses. Infosys has taken every 
> reasonable precaution to minimize this risk, but is not liable for any 
> damage you may sustain as a result of any virus in this e-mail. You 
> should carry out your own virus checks before opening the e-mail or 
> attachment. Infosys reserves the right to monitor and review the 
> content of all messages sent to or from this e-mail address. Messages 
> sent to or from this e-mail address may be stored on the Infosys 
> e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
>


Mime
View raw message