Advertisement

09.18.2008 at 01:51PM PDT, ID: 23743978 | Points: 125
[x]
Attachment Details

At wits end to resolve EJB not found error message.

Asked by akuttan in Jboss Application Server, Enterprise Java Beans (EJB), Java Servlets

Tags: ,

I'm new to java, jboss environment. So i wanted to write a simple code to develop something using jboss and java. The objective of the code are following
1. Write java code to extract an employee detail from Oracle database
2. Deploy this code in JBoss appserver
3. Execute the code (using jsp, webbrowser, whatever methods) to display the employee details.

Its so simple, but im having hard time getting this to work. I managed to write 4 java codes and on my servlet i have the following code which errors out

                         InitialContext context = new InitialContext();
          Object objref = context.lookup("java:comp/env/ejb/test/MyTestSessionBean");
                        testSessionBean = (MyTestSessionHome)PortableRemoteObject.narrow
                                                                                                         (objref,MyTestSessionHome.class);

 when i compile using ant utility, no errors, but when i deploy in JBoss it errors out
                  javax.naming.NameNotFoundException: ejb not bound. It errors out on the context.lookup. There was another thread with this question and i was hopeful that i will find answer, but in vain.

I have attached all the java code and also the xml files that i created. Any help is greatly appreciated as im about to pull all my hair which is left (im almost bald).

I have attached the 4 java files and the 3 xml files that i used for this project. I had to name them as .txt because of extension restrictions to attach.Start Free Trial
Attachments:
 
 
 
 
 
Remote file
 
 
Main file
 
 
web.xml
 
 
jboss-web.xml
 
 
jboss.xml
 
 
Keywords: At wits end to resolve EJB not found e…
 
Loading Advertisement...
 
[+][-]09.18.2008 at 03:34PM PDT, ID: 22516190

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.18.2008 at 07:17PM PDT, ID: 22517360

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.18.2008 at 08:11PM PDT, ID: 22517586

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.19.2008 at 10:41AM PDT, ID: 22523556

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628