For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 9 replies, 4 voices, and was last updated 19 years, 5 months ago by
jafarr1.
-
AuthorPosts
-
DavidMemberUsing => Struts 1.1, JDK 1.4.2, Webshere 5.0, Windows Server 2003, myEclipse 4.1.1 GA, Eclipse 3.1
I am getting this error message and I cannot find out if it is the code, websphere or what. There are no stack traces or other messages to help debug this. I have deployed the code to similar environments and it does the same thing.
[ServletException in:/content/contract/monthlyFeeEntry.jsp] No getter method for property monthlyFeeBean of bean monthlyFeeForm’
I believe the error is thrown here in the JSP:
<bean:size id=”count” name=”monthlyFeeForm” property=”<%=MonthlyFeeForm.MONTHLY_FEE_BEAN %>”/>
Here is the form, which clearly has the getter method:
public class MonthlyFeeForm extends ValidatorForm {
…
public final static String MONTHLY_FEE_BEAN = “monthlyFeeBean”;private List monthlyFeeBean = new ArrayList();
…
public List getMonthlyFeeBean() {
return monthlyFeeBean;
}
public void setMonthlyFeeBean(List list) {
monthlyFeeBean = list;
}
}
For the life of me I cannot see the issue. If anyone has any ideas, please let me know – this is driving me mental (ok, thats a short drive)! Not sure if this is place to post this, so apologies if not.
March 30, 2006 at 11:31 am #249576
Riyad KallaMemberMoving to OT > Soft Dev
What happens if instead of the scriptlet, you type “monthlyFeeBean” in the property value?
March 30, 2006 at 11:45 am #249583
DavidMemberI tried replacing
<bean:size id=”count” name=”monthlyFeeForm” property=”<%=MonthlyFeeForm.MONTHLY_FEE_BEAN %>”/>with
<bean:size id=”count” name=”monthlyFeeForm” property=”monthlyFeeBean”/>
and nothing changed. Is it possible this is an application server or struts versioning issue? I believe this application has always been struts 1.1 but perhaps something else got introduced somewhere. By the way, I get similar errors in various places and this behavior is fairly new to this existing behavior. I am unaware of any changes that would have caused this.
March 30, 2006 at 11:55 am #249585
Riyad KallaMemberCan you print out the instance of monthlyFeeForm on this page to confirm you have an instance?
<%= monthlyFeeForm.toString() %>
March 30, 2006 at 12:16 pm #249587
DavidMemberI added that line and got this error:
[ServletException in:/content/contract/monthlyFeeEntry.jsp] Unable to compile class for JSP An error occurred at line: 47 in the jsp file: /content/contract/monthlyFeeEntry.jsp Generated servlet error: D:\WebSphere\AppServer\temp\vlbapp01\server1\ValueLinkBilling\vlb.war\content\contract\_monthlyFeeEntry.java:565: cannot resolve symbol symbol : variable monthlyFeeForm location: class org.apache.jsp._monthlyFeeEntry out.print( monthlyFeeForm.toString() ); ^ 1 error ‘
Does that mean the syntax is wrong or it doesn’t know about the monthlyFeeForm? I have that imported as:
<%@ page language=”java”
import=”com.vlb.ui.form.contract.MonthlyFeeForm,
com.vlb.ui.form.contract.MonthlyFeeBean,
… %>March 30, 2006 at 1:27 pm #249591
Riyad KallaMemberCheck your system PATH environment variable and make sure you have your JDK’s bin directory in there (so you can drop to a console and type javac and get a usage message). Then you should see compile errors in your left margin while editing and saving JSPs.
What was the EXACT line of code you added? The weird part of the message is “cannot resolve symbol symbol ;”, did you add a semicolon in there or something?
March 30, 2006 at 2:08 pm #249597
DavidMemberHere is the code that I added after
<bean:size id=”count” name=”monthlyFeeForm” property=”monthlyFeeBean”/><bean:message key=”<%=monthlyFeeForm.toString()%>”/>
I am deploying the JSP to a remote server and cannot see any error messages in the Websphere logs.
March 30, 2006 at 4:14 pm #249602
Riyad KallaMemberThat all looks fine to me, just try and debug the errors one at a time and see if you can figure out what is going on. Double check your name attribute for this action mapping and see if it’s right.
March 31, 2006 at 5:59 am #249613
rateotyMemberHello,
is there really a Bean of that type in your page context? Does the error occur while precompiling the page or at runtime? If you are precompiling the jsp and the error doesn’t occur, your struts-config.xml might be wrong.Regards Jürgen
April 13, 2006 at 11:54 am #250439
jafarr1MemberI took over solving this problem, and found this thread during my research. I thought people might want to know what caused this.
The OP was correct that he was working in Java 1.4.2; the problem is that the project was supposed to run in Java 1.3.1. (Low priority app that hadn’t migrated out of Java 1.3 yet.) This project was moved to a new server, one with Java 1.4.2 installed.
The problem arose because some of the getter/setter methods in the Form objects were overloaded. For example, for variable List foo, there was both a public List getFoo() and a public Object getFoo(int index).
It turns out that at some point during the 1.4.2 releases, the Java introspection methodology was changed. For whatever reason, when Struts does its introspection, the overloaded methods confuse it, causing the Servlet to throw its hands in the air and say “I can’t find it.”
Cheers,
Jeff -
AuthorPosts