Thanks to all who replied. After much toiling, I got the example working
under weblogic. As Anshum indicated, SP6 was necessary. However, SP5 may
have worked as well, according to an article that I read.
I also used the weblogic classloader "hack" descibed at:
http://archive.covalent.net/jakarta/struts-user/2000/10/0009.xml
Thanks again,
Jeff
-----Original Message-----
From: Sharda, Anshum [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 29, 2000 5:39 PM
To: [EMAIL PROTECTED]
Subject: RE: struts in weblogic?
Download and install Service Pack for WL5.1. That should get rid of this
problem.
- Anshum
> -----Original Message-----
> From: Jeff Klein [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 29, 2000 2:24 PM
> To: '[EMAIL PROTECTED]'
> Subject: struts in weblogic?
>
>
> Hi All,
>
> I am trying to get Struts up and running inside of a version
> 5.1 weblogic
> container. It seems that I am close, because some of the
> tags work (like
> the link tag). However, any tag that depends on the presence
> of a resource
> bundle (such as the message tag) fails with the following stack trace:
>
> Wed Nov 29 10:54:07 PST 2000:<E>
> <ServletContext-struts-example> Servlet
> failed
> with Exception
> javax.servlet.ServletException: runtime failure in custom tag
> 'message'
> at jsp_servlet._index._jspService(_index.java:89)
> at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java
> :105)
> at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java
> :123)
> at
> weblogic.servlet.internal.ServletContextImpl.invokeServlet(Ser
> vletContextImp
> l.java:742)
> at
> weblogic.servlet.internal.ServletContextImpl.invokeServlet(Ser
> vletContextImp
> l.java:686)
> at
> weblogic.servlet.internal.ServletContextManager.invokeServlet(
> ServletContext
> Manager.java:247)
> at
> weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketH
> TTP.java:361)
> at
> weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
>
> at
> weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
> Code)
>
> Wed Nov 29 10:54:08 PST 2000:<E>
> <ServletContext-struts-example> root cause
> of ServletException
> java.lang.NullPointerException:
> at
> weblogic.servlet.jsp.PageContextImpl.getAttribute(PageContextI
> mpl.java:156)
> at
> org.apache.struts.taglib.MessageTag.doStartTag(MessageTag.java:358)
> at jsp_servlet._index._jspService(_index.java:81)
> at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java
> :105)
> at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java
> :123)
> at
> weblogic.servlet.internal.ServletContextImpl.invokeServlet(Ser
> vletContextImp
> l.java:742)
> at
> weblogic.servlet.internal.ServletContextImpl.invokeServlet(Ser
> vletContextImp
> l.java:686)
> at
> weblogic.servlet.internal.ServletContextManager.invokeServlet(
> ServletContext
> Manager.java:247)
> at
> weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketH
> TTP.java:361)
> at
> weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
>
> at
> weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
> Code)
>
> I looked at the source code for MessageTag.java and it fails
> at the point
> where it is trying to get a "bundle" object (instance of
> MessageResources)
> out of the PageContext application scope.
>
>
> // Acquire the resources object containing our messages
> MessageResources resources = (MessageResources)
> pageContext.getAttribute(bundle,
> PageContext.APPLICATION_SCOPE);
>
>
> If I'm not mistaken, the MessageResources object should
> contain name/value
> pairs from ApplicationResources.properties. I have that file
> in its default
> location
> (/WEB-INF/classes/org/apache/struts/example/ApplicationResourc
> es.properties)
> . I have not seen any FileNotFoundException's so I think it
> is finding it
> OK. However, the MessageResources object is either not
> getting created, or
> is not making it into the application scope. Is there
> something I need to
> configure in weblogic.properties to insure that the application is
> initializing properly?
>
> By the way, this is the "struts-example" application that
> came with the
> struts binary distribution. It works fine under my tomcat
> installation but
> we use weblogic in production.
>
> Any suggestions would be helpful.
>
> Thanks,
> Jeff
>
> PS does anyone know if there are any other lists/websites
> that may have
> searchable FAQ's about struts?
>