• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NullPointer at create()

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, thanks to all you guys I have the servlet calling out to the ejb from the servlet. The ejb lookup and method calls are in a processRequest method that is called from the doGet method.
Tracing it i find that it gets past the InitialContex and the lookup, It gets to the ejb.home.create() and gives a NullPointer Exception. Like this:
getting ready to create()
<Nov 14, 2001 5:16:43 PM EST> <Error> <HTTP> <[WebAppServletContext(392716,DDMWebApp)] Servlet faile
d with Exception
java.lang.NullPointerException
at com.document.DocServlet.processRequest(DocServlet.java:181)
at com.document.DocServlet.doGet(DocServlet.java:280)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:12
65)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1631)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
Not sure why. I can hit the ejb from my java client and it works ok.
Any suggestions where to look or how to pin point it more?
Steve
 
steve dowdall
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found the error.
It was a due to a bad try/catch block that was not allowing the remote interface to be created. After a little house keeping it works great. This is my first attempt at connecting a jsp/servlet/ejb and fully implemting the MVC architecture.
Thanks to all those who encouraged me the past week. Now on to those enhancments........
Steve
 
reply
    Bookmark Topic Watch Topic
  • New Topic