chaitu chaitu
asked on
NameNotFoundException in session bean while running application from jdeveloper
hi
i am getting NameNotFoundException while connection to session bean when i run from Jdeveloper;
i put ejb.jar.xml and orion-ejb-jar.xml put in classes/META-INF folder;
in my application index.jsp connects to sessionbean;
when i run index.jsp i am getting the follo
[Starting OC4J using the following ports: HTTP=9000, RMI=23891, JMS=9227.]
C:\j2sdk1.4.2_06\bin\javaw .exe -client -classpath C:\JDeveloper903\j2ee\home \oc4j.jar -Xverify:none -Doracle.j2ee.dont.use.mem ory.archiv e=true com.evermind.server.OC4JSe rver -config C:\JDeveloper903\jdev\syst em9.0.3.10 35\oc4j-co nfig\serve r.xml
[waiting for the server to complete its initialization...]
Embedded OC4J startup time: 4640 ms.
Target URL -- http://192.168.68.214:9000/1304Release3-etrans-context-root/index.jsp
Copying default deployment descriptor from archive at C:\JDeveloper903\jdev\mywo rk\1304Rel ease3.0\EJ B\classes/ META-INF/o rion-ejb-j ar.xml to deployment directory C:\JDeveloper903\jdev\syst em9.0.3.10 35\oc4j-co nfig\appli cation-dep loyments\c urrent-wor kspace-app \classes.. .
Auto-deploying file:/C:/JDeveloper903/jde v/mywork/1 304Release 3.0/EJB/cl asses/ (New server version detected)...
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError
Error compiling C:\JDeveloper903\jdev\mywo rk\1304Rel ease3.0\EJ B\classes: Syntax error in source
Log4j Properties file Initialized with Path = C:\JDeveloper903\jdev\mywo rk\1304Rel ease3.0\et rans\WEB-I NF\log4j.p roperties
Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized
No of Hits to this page : 1
[ERROR ] ESACLoginController.jsp -- Un Authorised User Not Enough Credentials : ANIL
[ERROR ] ESACLoginController.jsp -- Un Authorised User Not Enough Credentials : ANIL
[ERROR ] ESACLoginController.jsp -- Un Authorised User Not Enough Credentials : ANIL
javax.naming.NameNotFoundE xception: AccessControlSessionBean not found
at com.evermind.server.rmi.RM IContext.l ookup(RMIC ontext.jav a:130)
at com.evermind.server.Applic ationConte xt.lookup( Applicatio nContext.j ava:195)
at com.evermind.server.Applic ationConte xt.lookup( Applicatio nContext.j ava:66)
at javax.naming.InitialContex t.lookup(I nitialCont ext.java:3 47)
at _ESACLoginController._jspS ervice(ESA CLoginCont roller.jsp :89)
at com.orionserver.http.Orion HttpJspPag e.service( OrionHttpJ spPage.jav a:56)
at oracle.jsp.runtimev2.JspPa geTable.se rvice(JspP ageTable.j ava:317)
at oracle.jsp.runtimev2.JspSe rvlet.inte rnalServic e(JspServl et.java:46 5)
at oracle.jsp.runtimev2.JspSe rvlet.serv ice(JspSer vlet.java: 379)
at javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 853)
at com.evermind.server.http.S ervletRequ estDispatc her.invoke (ServletRe questDispa tcher.java :721)
at com.evermind.server.http.S ervletRequ estDispatc her.forwar dInternal( ServletReq uestDispat cher.java: 306)
at com.evermind.server.http.H ttpRequest Handler.pr ocessReque st(HttpReq uestHandle r.java:767 )
at com.evermind.server.http.H ttpRequest Handler.ru n(HttpRequ estHandler .java:259)
at com.evermind.server.http.H ttpRequest Handler.ru n(HttpRequ estHandler .java:106)
at EDU.oswego.cs.dl.util.conc urrent.Poo ledExecuto r$Worker.r un(PooledE xecutor.ja va:803)
at java.lang.Thread.run(Threa d.java:534 )
wing in jdeveloper console;
i am getting NameNotFoundException while connection to session bean when i run from Jdeveloper;
i put ejb.jar.xml and orion-ejb-jar.xml put in classes/META-INF folder;
in my application index.jsp connects to sessionbean;
when i run index.jsp i am getting the follo
[Starting OC4J using the following ports: HTTP=9000, RMI=23891, JMS=9227.]
C:\j2sdk1.4.2_06\bin\javaw
[waiting for the server to complete its initialization...]
Embedded OC4J startup time: 4640 ms.
Target URL -- http://192.168.68.214:9000/1304Release3-etrans-context-root/index.jsp
Copying default deployment descriptor from archive at C:\JDeveloper903\jdev\mywo
Auto-deploying file:/C:/JDeveloper903/jde
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError
Error compiling C:\JDeveloper903\jdev\mywo
Log4j Properties file Initialized with Path = C:\JDeveloper903\jdev\mywo
Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized
No of Hits to this page : 1
[ERROR ] ESACLoginController.jsp -- Un Authorised User Not Enough Credentials : ANIL
[ERROR ] ESACLoginController.jsp -- Un Authorised User Not Enough Credentials : ANIL
[ERROR ] ESACLoginController.jsp -- Un Authorised User Not Enough Credentials : ANIL
javax.naming.NameNotFoundE
at com.evermind.server.rmi.RM
at com.evermind.server.Applic
at com.evermind.server.Applic
at javax.naming.InitialContex
at _ESACLoginController._jspS
at com.orionserver.http.Orion
at oracle.jsp.runtimev2.JspPa
at oracle.jsp.runtimev2.JspSe
at oracle.jsp.runtimev2.JspSe
at javax.servlet.http.HttpSer
at com.evermind.server.http.S
at com.evermind.server.http.S
at com.evermind.server.http.H
at com.evermind.server.http.H
at com.evermind.server.http.H
at EDU.oswego.cs.dl.util.conc
at java.lang.Thread.run(Threa
wing in jdeveloper console;
I think u r assembling ur application and referencing ur EJb wrongly, and here is some guidelines:
1- preferably from ur servlet call ur ejb using local interface
2-put a local ejb reference into ur webmodule, web.xml like this:
<ejb-local-ref>
<ejb-ref-name>ejb/UserSess ionBean</e jb-ref-nam e>
<ejb-ref-type>Session</ejb -ref-type>
<local-home>urfullpakage.U serSession LocalHome< /local-hom e>
<local>urfullpakage.UserSe ssionLocal </local>
<ejb-link>UserSessionBean< /ejb-link>
</ejb-local-ref>
3- ur call inside the servlet should look like this:
Object userObject = initCtx.lookup("java:comp/ env/ejb/Us erSessionB ean");
UserSessionLocalHome userSessionLocalHome= (UserSessionLocalHome ) userObject ;
UserSessionLocal userSessionLocal = userSessionLocalHome.creat e();
please try this and tell me
1- preferably from ur servlet call ur ejb using local interface
2-put a local ejb reference into ur webmodule, web.xml like this:
<ejb-local-ref>
<ejb-ref-name>ejb/UserSess
<ejb-ref-type>Session</ejb
<local-home>urfullpakage.U
<local>urfullpakage.UserSe
<ejb-link>UserSessionBean<
</ejb-local-ref>
3- ur call inside the servlet should look like this:
Object userObject = initCtx.lookup("java:comp/
UserSessionLocalHome userSessionLocalHome= (UserSessionLocalHome ) userObject ;
UserSessionLocal userSessionLocal = userSessionLocalHome.creat
please try this and tell me
ASKER
i solved the problem;actually that is conflict of jdk version and in the java options of Jdeveloper , i increased the memory size;
hi petmagdy lets continue our discussion remote debugging today i wrote a simple servlet and EJB;
i put break point in servlet;
i compiled the servlet copied class file
C:\OC4J\j2ee\home\applicat ions\ETEAG L317002004 1102\etran s\WEB-INF\ classes
when i run servlet it stopped at breakpoint ;
but i deployed ear file in the same container and put breakpoint in one of the servlet its not recognizing why??
hi petmagdy lets continue our discussion remote debugging today i wrote a simple servlet and EJB;
i put break point in servlet;
i compiled the servlet copied class file
C:\OC4J\j2ee\home\applicat
when i run servlet it stopped at breakpoint ;
but i deployed ear file in the same container and put breakpoint in one of the servlet its not recognizing why??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok;
if set breakpoint in servlet file or EJB
sometimes i previously told u one pop window comes up and asking that unable to find source file
its giving 3 options ;;
1.generate a stub class
2.Lets me find Source file
3.Dont ask me file again
which option should i take
usally i am taking 3rd option and clicking ok button;
Is it correct? then i am pressing Resume button;
after that i am pressing F7,F8;
some times if press F7 ,F8... code is not moving to other lines or becoming stand-still ;why is happening like that
if set breakpoint in servlet file or EJB
sometimes i previously told u one pop window comes up and asking that unable to find source file
its giving 3 options ;;
1.generate a stub class
2.Lets me find Source file
3.Dont ask me file again
which option should i take
usally i am taking 3rd option and clicking ok button;
Is it correct? then i am pressing Resume button;
after that i am pressing F7,F8;
some times if press F7 ,F8... code is not moving to other lines or becoming stand-still ;why is happening like that
ASKER
sometimes debug options r disabling except pause ,Terminate buttons;;;;;;;;;;
yes correct
if erratic cases happens just restart the Jdeveloper and OC4J
frankly i feel Jdeveloper and Oc4J 10g are more reliable
if erratic cases happens just restart the Jdeveloper and OC4J
frankly i feel Jdeveloper and Oc4J 10g are more reliable
ASKER
i write a simple a servlet and it is conenction ejb;
when i run the servlet i am getting this error;
[Starting OC4J using the following ports: HTTP=9000, RMI=23891, JMS=9227.]
C:\j2sdk1.4.2_06\bin\javaw
[waiting for the server to complete its initialization...]
Embedded OC4J startup time: 2344 ms.
Target URL -- http://192.168.68.214:9000/Chaitanya-Web-context-root/servlet/Servlet1
Copying default deployment descriptor from archive at C:\JDeveloper903\jdev\mywo
Auto-deploying file:/C:/JDeveloper903/jde
UserSession_StatelessSessi
bad class file: C:\j2sdk1.4.2_06\jre\lib\r
class file has wrong version 48.0, should be 47.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
import java.rmi.NoSuchObjectExcep
^
1 error
Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized
javax.naming.NameNotFoundE
at com.evermind.server.rmi.RM
at com.evermind.server.Applic
at com.evermind.server.Applic
at javax.naming.InitialContex
at mypackage3.Servlet1.doGet(
at javax.servlet.http.HttpSer
at javax.servlet.http.HttpSer
at com.evermind.server.http.S
at com.evermind.server.http.S
at com.evermind.server.http.H
at com.evermind.server.http.H
at com.evermind.server.http.H
at EDU.oswego.cs.dl.util.conc
at java.lang.Thread.run(Threa