dev@glassfish.java.net

NPE when accessing a Web service using taglib

From: Arun Gupta <Arun.Gupta_at_Sun.COM>
Date: Wed, 19 Apr 2006 15:05:25 -0700

I've created a taglib that invokes a Java SE client from a JSP page. The
Java SE client is bundled as a jar file in WEB-INF/lib. This Java SE
client in turn invokes a Web service (deployed in the same WAR) and the
intention is to display the results back on JSP page. Note, this client
is not using WebServiceRef and is a Java SE client.

The WAR gets deployed in b42 but when I try to access index.jsp from the
browser, I get the following exception:

java.lang.NullPointerException
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:585)
        com.sun.el.parser.AstFunction.getValue(AstFunction.java:114)
        com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
        org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:982)
        org.apache.jsp.index_jsp._jspService(index_jsp.java:86)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:409)

Any idea ?

I'm not on the alias so please include me in the replies.

-Arun
-- 
got Web Services ?
Download Java Web Services Developer Pack from
http://java.sun.com/webservices