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.memory.archive=true com.evermind.server.OC4JServer -config C:\JDeveloper903\jdev\system9.0.3.1035\oc4j-config\server.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\mywork\1304Release3.0\EJB\classes/META-INF/orion-ejb-jar.xml to deployment directory C:\JDeveloper903\jdev\system9.0.3.1035\oc4j-config\application-deployments\current-workspace-app\classes...

Auto-deploying file:/C:/JDeveloper903/jdev/mywork/1304Release3.0/EJB/classes/ (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\mywork\1304Release3.0\EJB\classes: Syntax error in source

 Log4j Properties file Initialized  with Path = C:\JDeveloper903\jdev\mywork\1304Release3.0\etrans\WEB-INF\log4j.properties

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.NameNotFoundException: AccessControlSessionBean not found

      at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:130)

      at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:195)

      at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:66)

      at javax.naming.InitialContext.lookup(InitialContext.java:347)

      at _ESACLoginController._jspService(ESACLoginController.jsp:89)

      at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)

      at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)

      at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)

      at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:721)

      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)

      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)

      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)

      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)

      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)

      at java.lang.Thread.run(Thread.java:534)
wing in jdeveloper console;


LVL 20
chaitu chaituAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

chaitu chaituAuthor Commented:
recently we upgraded jdk1.3 to jdk1.4;


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.exe -client -classpath C:\JDeveloper903\j2ee\home\oc4j.jar -Xverify:none -Doracle.j2ee.dont.use.memory.archive=true com.evermind.server.OC4JServer -config C:\JDeveloper903\jdev\system9.0.3.1035\oc4j-config\server.xml
[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\mywork\Chaitanya\EJB\classes/META-INF/orion-ejb-jar.xml to deployment directory C:\JDeveloper903\jdev\system9.0.3.1035\oc4j-config\application-deployments\current-workspace-app\classes...

Auto-deploying file:/C:/JDeveloper903/jdev/mywork/Chaitanya/EJB/classes/ (No previous deployment found)... Error compiling C:\JDeveloper903\jdev\mywork\Chaitanya\EJB\classes: Syntax error in source

UserSession_StatelessSessionBeanWrapper0.java:6: cannot access java.rmi.NoSuchObjectException
bad class file: C:\j2sdk1.4.2_06\jre\lib\rt.jar(java/rmi/NoSuchObjectException.class)
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.NoSuchObjectException;
                ^
1 error
Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized

javax.naming.NameNotFoundException: UserSessionBean not found

      at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:130)

      at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:195)

      at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:66)

      at javax.naming.InitialContext.lookup(InitialContext.java:347)

      at mypackage3.Servlet1.doGet(Servlet1.java:39)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:721)

      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)

      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)

      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)

      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)

      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)

      at java.lang.Thread.run(Thread.java:534)

0
petmagdyCommented:
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/UserSessionBean</ejb-ref-name>
            <ejb-ref-type>Session</ejb-ref-type>
            <local-home>urfullpakage.UserSessionLocalHome</local-home>
            <local>urfullpakage.UserSessionLocal</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/UserSessionBean");
            UserSessionLocalHome userSessionLocalHome= (UserSessionLocalHome ) userObject ;
            
            UserSessionLocal userSessionLocal = userSessionLocalHome.create();

please try this and tell me
 
0
chaitu chaituAuthor Commented:
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\applications\ETEAGL3170020041102\etrans\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??
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

petmagdyCommented:
I never saw this, on my machine I am using the following enviroment:

JDK1.4.2
OC4J10g 9.0.4
Jdeveloper 9.0.5.2

Every thing is working as expected

this may be a bug in Oc4J 9.0.3 and Jdeveloper 9.0.3, do u have an account at metalink.oracle.com? if soo it may be reported
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chaitu chaituAuthor Commented:
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
0
chaitu chaituAuthor Commented:
sometimes debug options r disabling except pause ,Terminate buttons;;;;;;;;;;
0
petmagdyCommented:
yes correct
if erratic cases happens just restart the Jdeveloper and OC4J

frankly i feel Jdeveloper and Oc4J 10g are more reliable

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.