on 05-29-2006 11:21 AM
hi,
i have two ejb projects(ProjectOne ane ProjectTwo)
In ProjectOne i have given JNDI name as "General"
(in ejb_j2ee_engine.xml).
While lookup this JNDI name in ProjectTwo it is giving Exception like below.
javax.ejb.<i><b>ObjectNotFoundException:</b></i> com.sap.engine.services.ejb.exceptions.BaseObjectNotFoundException: The requested object does not exist.
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at SoapServlet.doPost(SoapServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:391)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:265)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:345)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:323)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:865)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
<u><b>code</b></u>
Object o= ctx.lookup("General");
MaterialGeneralDataEntityHome objMaterialGeneralDataEntityHome=(MaterialGeneralDataEntityHome)o;
regards
Guru
Hi Guru,
Object o= ctx.lookup("General");
MaterialGeneralDataEntityHome objMaterialGeneralDataEntityHome=(MaterialGeneralDataEntityHome)o;
is not able to throw ObjectNotFoundException, because according to <a href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/ejb/ObjectNotFoundException.html">ObjectNotFoundException</a> <i>The ObjectNotFoundException exception is thrown by a finder method to indicate that the specified EJB object does not exist.</i>. Could you please post a code which causes this exception and the whole stacktrace.
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
this is code;
Object o= ctx.lookup("General");
MaterialGeneralDataEntityHome objMaterialGeneralDataEntityHome=(MaterialGeneralDataEntityHome)o;
<u><i><b>MaterialGeneralDataEntity objMaterialGeneralDataEntity = objMaterialGeneralDataEntityHome.findDivisionBymat</b></i></u>(strMat);
String strmaterialDesc = objMaterialGeneralDataEntity.getStrMaterialDesc();
Are you working with CMP entity bean? Seems like you just don`t have an entity in your DB matching your conditions ( findDivisionBymat(strMat) ). You are trying to load non-existing entity. So, you can create MaterialGeneralDataEntity or report exception to the user, that entity for given search criteria doesnt exist.
Is your application ProjectOne deployed correctly?
Have you checked if the EJB you are trying to bind with the name <b>"General"</b> has been correctly deployed on the WebAS? If you have access to JNDI Registry / Visual administrator you can check this.
HTH,
Rgds,
Amol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.