Hi fellow struts users,

I have been toiling with the following problem, and have not been able to
solve it even after looking at the Struts source and thoroughly checking the
mail archive. I wonder if it is a bug with Struts (?). The reason I dare say
that the problem may lie with Struts is that my code works the first few
times, but then fails. Here's a description:

I have an Action class that creates a couple of javabeans and places them on
the request. The JSP then displays them. The FIRST time I put my URL in the
browser, I see the results of the JSP correctly. Now, if I modify the JSP
(say, add a space and then delete it) and use the same URL, the whole thing
gets recompiled, and again I see the JSP output correctly. OK so far.

Then, when I use the same URL again, I get the following message:

<May 4, 2001 10:46:59 AM CDT> <Error> <HTTP>
<[WebAppServletContext(3068837,InfoportalJava)] Root cause of
ServletException
javax.servlet.jsp.JspException: Exception accessing property ichannelType
for bean anICLEntryBean: java.lang.IllegalArgumentException:
object is not an instance of declaring class
        at
org.apache.struts.taglib.logic.CompareTagBase.condition(CompareTagBase.java:
239)
        at
org.apache.struts.taglib.logic.EqualTag.condition(EqualTag.java:90)
        at
org.apache.struts.taglib.logic.ConditionalTagBase.doStartTag(ConditionalTagB
ase.java:218)
        at
jsp_servlet._jsp._ichannel._displayiclist._jspService(_displayiclist.java:13
5)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
        at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
l.java:149)
        at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1697)
        at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1540)
        at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
        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
:208)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1127)
        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1529)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

This is caused by the compiled code that corresponds to the following Struts
tag:

<logic:equal name="anICLEntryBean" property="ichannelType"
                        value="<%=
java.lang.Integer.toString(com.covia.jcore.CVICLEntry.TYPE_ICHANNEL) %>">
...

(the 'value' attribute evaluates to a String such as "2".)

Now, my javabean certainly has a property called 'ichannelType'; in fact, I
wrote some code that tests that this bean property exists when the javabean
gets placed on the request. So I don't see why that works for a few times at
first and then fails.

Any ideas on the subject will be greatly appreciated. In case this is
necessary, I am using BEA Weblogic as a JSP container.

thanks,
Iraklis

Reply via email to