You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tim Kuntz <ti...@hotmail.com> on 2000/12/30 07:43:18 UTC
WebLogic NullPointer from PageContextImpl.getAttribute
I have been using WebLogic for a while but am new to Struts and am having
a problem running Struts as an explicit WebLogic Web application
(weblogic.httpd.webApp.myapp) due to a problem with WebLogic class loaders.
The problem is misleading because the error message is a
NullPointerException from the pageContext.getAttribute() call when
retrieving the MessageResource (MR) instance. But, if you modify the code
slightly to retrieve the MR instance directly from the ServletContext you
get a ClassCastException. To my knowledge, this occurs because the MR is
being created/stored by the ActionServlet but is retrieved as part of the
JSP servlet. WebLogic uses 2 different class loaders for these so a
ClassCast occurs.
The only way I can eliminate the error is to move the Struts classes and
my application classes to the WebLogic classpath versus the dynamic
classpath (WEB-INF/classes). Has anyone else found a workaround for this
problem?
Thanks,
Tim Kuntz
timkuntz@hotmail.com
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com