Hello. If somebody has a minute, I think I am having trouble getting a handle on a session bean via jndi. This is the session portion of a session-facade that I'm tinkering with (this began with a session bean example I found on the web, but instead of using the servlet and a direct entity bean call, I went for jsp and a session facade). The call to the session facade is located within a javabean that is loaded by jsp...
I kept receivng a null pointer exception and after putting in these print statements, I am finding that the obj is null, pretty much right at the start of the call, it fails (OBJ IS NULL is printed to the console).
Is there something I am missing that should go into the web.xml for this application? I've been looking all over and can't get a definitive picture so far. Here is my web.xml...
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
thank you again for reading this. I'll keep plugging at this and if I can get this going, I'll post what I did. Thank you for any help...
Valentin Tanase
Ranch Hand
Joined: Feb 17, 2005
Posts: 704
posted
0
Hi Tom,
There are several things that I could suggest to you:
Make sure that your session bean was deployed properly.
Make sure the bean binds to the JNDI tree within the right context name (your server might have useful tools that can help you doing these two).
Make sure that you actually are not declaring ejb references because in that case you might lookup your bean like this:
Without being a resin user I�m littele bit intrigued by this declaration:
Which looks to me like a resin specific tag. Could this change the naming context for your beans? If the answer is yes then you might need to look up your bean like this:
Which is a similar technique to using ejb references. Again having a snapshot of your server�s JNDI tree will help you run out this theory.