RE: javax.servlet.ServletException: BeanUtils.populate

2003-09-28 Thread krishnamohan
Hi Gaurav,

It's me.   Are you working on Struts?

Thanks,
Krishna

-Original Message-
From: Gaurav Gupta [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 27, 2003 4:18 PM
To: 'Struts Users Mailing List'
Subject: RE: javax.servlet.ServletException: BeanUtils.populate


Is it Krishna Mohan , previously with MTC India ??

sorry for botheration



-Original Message-
From: krishnamohan [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 27, 2003 3:56 PM
To: [EMAIL PROTECTED]
Subject: javax.servlet.ServletException: BeanUtils.populate


Hi,
I am writing a small page based on struts guidelines for creating map-backed
forms. I am using struts 1.1. I have a jsp in which I have some dynamic
fields. I used a for loop for these,currently. In the ActionForm, I have
declared a HashMap for collecting values of these fields. However, when I
submit the page, I am getting the error- javax.servlet.ServletException:
BeanUtils.populate Root cause: java.lang.IllegalArgumentException: No bean
specified. Pl. help me understand what went wrong.


The following is the jsp page
%@ page language=java session=true%
!-- Imports--
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
html:html locale=true
!--Apply Stylesheet-- head
link href=./layouts/PrimeCss.css type=text/css rel=stylesheet
/head
body norepeat bottommargin=0 leftmargin=0 rightmargin=0 topmargin=0
bgproperties=fixed
html:form action=/createQuestion focus=questionName
name=createQuestionForm
type=com.trx.kms.questionbank.CreateQuestionForm
bean:message key=questionbank.createquestion.pagetitle/

bean:message key=questionbank.createquestion.name/ html:text
property=questionName style=width:195px maxlength=100/
bean:message key=questionbank.createquestion.description/ html:textarea
property=questionDesc cols=65 rows=12/
% for (int i=0; i =2; i++) { String name = value(foo- + i + ); %
bean:message key=questionbank.createquestion.option/ html:text
property=%= name % /

%} % html:image page=/layouts/submit.jpg property=submit
onclick=onSubmitClick();/ html:image page=/layouts/cancel.jpg
property=reset /
/html:form /body /html:html

The following is the ActionForm class

package com.trx.kms.questionbank; import
javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import java.util.HashMap;
import java.util.Map;
import java.util.Iterator;


public final class CreateQuestionForm extends ActionForm{
private String questionName=null;
private String questionDesc=null;
private String submit=null;
private String reset=null;
private final Map values = new HashMap();


public void setValue(String key, Object value) {
values.put(key, value); }
public Object getValue(String key) {
return values.get(key); }
public String getQuestionDesc() {
return questionDesc; }
public String getQuestionName() {
return questionName; }
public void setQuestionDesc(String string) {
questionDesc = string; }
public void setQuestionName(String string) {
questionName = string; }
public String getReset() {
return reset; }
public String getSubmit() {
return submit; }
public void setReset(String string) {
reset = string; }
public void setSubmit(String string) {
submit = string; }


public String getQuestions()
{
StringBuffer sb = new StringBuffer();
if ((values!=null  !values.isEmpty())) {
Iterator it = values.keySet().iterator();
while (it.hasNext()) {
String paramName = (String)it.next();
String paramValue = (String)values.get(paramName);
sb.append(paramName);
sb.append(paramValue);
} } return sb.toString();
}


public void reset(ActionMapping mapping, HttpServletRequest request) {
this.questionName=null;
this.questionDesc=null;
}


public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
ActionErrors errors = new ActionErrors();
return errors; } }


The following is the action class


package com.trx.kms.questionbank;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.*;
import javax.servlet.*;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Iterator;

public final class CreateQuestionAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws
IOException, ServletException {
String questions=((CreateQuestionForm)form).getQuestions();
ActionErrors errors = new ActionErrors();
if (!errors.isEmpty()) {
saveErrors(request, errors);
return (new ActionForward(mapping.getInput())); }
return (mapping.findForward(success)); }
}



-
To unsubscribe

RE: javax.servlet.ServletException: BeanUtils.populate

2003-09-27 Thread Gaurav Gupta
Is it Krishna Mohan , previously with MTC India ??

sorry for botheration



-Original Message-
From: krishnamohan [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 27, 2003 3:56 PM
To: [EMAIL PROTECTED]
Subject: javax.servlet.ServletException: BeanUtils.populate


Hi,
I am writing a small page based on struts guidelines for creating map-backed
forms. I am using struts 1.1. I have a jsp in which I have some dynamic
fields. I used a for loop for these,currently. In the ActionForm, I have
declared a HashMap for collecting values of these fields. However, when I
submit the page, I am getting the error- javax.servlet.ServletException:
BeanUtils.populate Root cause: java.lang.IllegalArgumentException: No bean
specified. Pl. help me understand what went wrong.


The following is the jsp page
%@ page language=java session=true%
!-- Imports--
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
html:html locale=true
!--Apply Stylesheet-- head
link href=./layouts/PrimeCss.css type=text/css rel=stylesheet
/head
body norepeat bottommargin=0 leftmargin=0 rightmargin=0 topmargin=0
bgproperties=fixed
html:form action=/createQuestion focus=questionName
name=createQuestionForm
type=com.trx.kms.questionbank.CreateQuestionForm
bean:message key=questionbank.createquestion.pagetitle/

bean:message key=questionbank.createquestion.name/ html:text
property=questionName style=width:195px maxlength=100/
bean:message key=questionbank.createquestion.description/ html:textarea
property=questionDesc cols=65 rows=12/
% for (int i=0; i =2; i++) { String name = value(foo- + i + ); %
bean:message key=questionbank.createquestion.option/ html:text
property=%= name % /

%} % html:image page=/layouts/submit.jpg property=submit
onclick=onSubmitClick();/ html:image page=/layouts/cancel.jpg
property=reset /
/html:form /body /html:html

The following is the ActionForm class

package com.trx.kms.questionbank; import
javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import java.util.HashMap;
import java.util.Map;
import java.util.Iterator;


public final class CreateQuestionForm extends ActionForm{
private String questionName=null;
private String questionDesc=null;
private String submit=null;
private String reset=null;
private final Map values = new HashMap();


public void setValue(String key, Object value) {
values.put(key, value); }
public Object getValue(String key) {
return values.get(key); }
public String getQuestionDesc() {
return questionDesc; }
public String getQuestionName() {
return questionName; }
public void setQuestionDesc(String string) {
questionDesc = string; }
public void setQuestionName(String string) {
questionName = string; }
public String getReset() {
return reset; }
public String getSubmit() {
return submit; }
public void setReset(String string) {
reset = string; }
public void setSubmit(String string) {
submit = string; }


public String getQuestions()
{
StringBuffer sb = new StringBuffer();
if ((values!=null  !values.isEmpty())) {
Iterator it = values.keySet().iterator();
while (it.hasNext()) {
String paramName = (String)it.next();
String paramValue = (String)values.get(paramName);
sb.append(paramName);
sb.append(paramValue);
} } return sb.toString();
}


public void reset(ActionMapping mapping, HttpServletRequest request) {
this.questionName=null;
this.questionDesc=null;
}


public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {
ActionErrors errors = new ActionErrors();
return errors; } }


The following is the action class


package com.trx.kms.questionbank;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.*;
import javax.servlet.*;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Iterator;

public final class CreateQuestionAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws
IOException, ServletException {
String questions=((CreateQuestionForm)form).getQuestions();
ActionErrors errors = new ActionErrors();
if (!errors.isEmpty()) {
saveErrors(request, errors);
return (new ActionForward(mapping.getInput())); }
return (mapping.findForward(success)); }
}



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: javax.servlet.ServletException: BeanUtils.populate

2003-05-30 Thread Mick Knutson
Sorry, but this is urgent to me, and am very sorry to imply anything toward, 
or against anyone else.

I am having this error when I submit the form. I can display the form 
seemingly fine. I have about 19 forms that are fairly similiar currently, 
and they all submit just fine.
I have gone through this with a fine tooth comb, but am not seeing any 
differences in the Husted.com examples for LookupDispatchAction. I also see 
other people that have the error, but seem to have much more stack trace, 
and I have no idea what the cause would/should actually be.
So, I have started to remove items from the form, like the multi-select, but 
that did not seem to help.


From: David Graham [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: URGENT: javax.servlet.ServletException: BeanUtils.populate
Date: Thu, 29 May 2003 12:34:23 -0600
FYI, marking posts as URGENT is generally considered rude as it implies 
your question is more important than everyone elses.  The error message 
indicates a problem populating your form bean from the request parameters.  
Are having the problem when submitting the form or displaying it?  Is your 
form control named correctly?

David

I have an error that I have been working on for 3 solid days. i have 
searched the archives, but can't find my issue resolved anywhere.
I have an array of objects (ContactDto[]) that I need to display. I 
actually have the full list I send in (userContacts), and the list of 
objects selected in the alertForm (alertContacts).
I can display the form for an initial addAlert() just fine. I have not 
gotten any further.
I do not seem t even get to my add() method ever. And even if I turn the 
log level to debug, I do not seem to get any more information on the 
stacktrace.

Please help me on this as I am very frustrated and confused.

StackTrace for alertForm Load, and then submission:
==
10:59:25,965 INFO  [AlertActions] userContacts[] length: 3
10:59:25,975 INFO  [AlertActions] 
==
10:59:25,975 INFO  [AlertActions] Must be a new alert then
10:59:25,985 INFO  [AlertActions] 
==
10:59:25,985 INFO  [AlertActions] alertDto: {alertId= userId=1 subject= 
startDate=null reoccurring= gracePeriodDays= gracePeriodHours=
endingDate=Thu May 29 10:59:24 CEST 2003 startingLocation=null 
endingLocation=null status= safeConfirm= details= noteToContactees=}
10:59:25,995 INFO  [AlertActions] 
==
10:59:45,944 INFO  [PropertyMessageResources] Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,944 INFO  [PropertyMessageResources] Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,954 INFO  [PropertyMessageResources] Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,954 INFO  [PropertyMessageResources] Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,984 INFO  [PropertyMessageResources] Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
11:00:55,504 INFO  [SecurityContextFilter] processing request /alert.do
11:00:55,544 ERROR [SecurityContextFilter] Exception
javax.servlet.ServletException: BeanUtils.populate
   at 
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1098)
   at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:816)
   at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
   at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
   at 
com.baselogic.yoursos.struts.ExtendedActionServlet.process(ExtendedActionServlet.java:53)
   at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
   at 
org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
   at 
com.baselogic.yoursos.security.SecurityContextFilter.doFilter(SecurityContextFilter.java:102)
   at 
org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
   at 
com.baselogic.yoursos.user.UserPreferenceFilter.doFilter(UserPreferenceFilter.java:46)
   at 
org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
   at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:286)
   at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
   at 

Re: javax.servlet.ServletException: BeanUtils.populate

2003-05-30 Thread David Graham
I couldn't find any HTML field called alertContacts in your JSP.  If you 
want alertContacts to hold the selected values, you need to have a form 
control called alertContacts.

I normally populate the list from a collection I store in the session or 
request and use a form bean property to save what the user submitted.

David

Sorry, but this is urgent to me, and am very sorry to imply anything 
toward, or against anyone else.

I am having this error when I submit the form. I can display the form 
seemingly fine. I have about 19 forms that are fairly similiar currently, 
and they all submit just fine.
I have gone through this with a fine tooth comb, but am not seeing any 
differences in the Husted.com examples for LookupDispatchAction. I also see 
other people that have the error, but seem to have much more stack trace, 
and I have no idea what the cause would/should actually be.
So, I have started to remove items from the form, like the multi-select, 
but that did not seem to help.


From: David Graham [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: URGENT: javax.servlet.ServletException: BeanUtils.populate
Date: Thu, 29 May 2003 12:34:23 -0600
FYI, marking posts as URGENT is generally considered rude as it implies 
your question is more important than everyone elses.  The error message 
indicates a problem populating your form bean from the request parameters. 
 Are having the problem when submitting the form or displaying it?  Is 
your form control named correctly?

David

I have an error that I have been working on for 3 solid days. i have 
searched the archives, but can't find my issue resolved anywhere.
I have an array of objects (ContactDto[]) that I need to display. I 
actually have the full list I send in (userContacts), and the list of 
objects selected in the alertForm (alertContacts).
I can display the form for an initial addAlert() just fine. I have not 
gotten any further.
I do not seem t even get to my add() method ever. And even if I turn the 
log level to debug, I do not seem to get any more information on the 
stacktrace.

Please help me on this as I am very frustrated and confused.

StackTrace for alertForm Load, and then submission:
==
10:59:25,965 INFO  [AlertActions] userContacts[] length: 3
10:59:25,975 INFO  [AlertActions] 
==
10:59:25,975 INFO  [AlertActions] Must be a new alert then
10:59:25,985 INFO  [AlertActions] 
==
10:59:25,985 INFO  [AlertActions] alertDto: {alertId= userId=1 subject= 
startDate=null reoccurring= gracePeriodDays= gracePeriodHours=
endingDate=Thu May 29 10:59:24 CEST 2003 startingLocation=null 
endingLocation=null status= safeConfirm= details= noteToContactees=}
10:59:25,995 INFO  [AlertActions] 
==
10:59:45,944 INFO  [PropertyMessageResources] Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,944 INFO  [PropertyMessageResources] Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,954 INFO  [PropertyMessageResources] Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,954 INFO  [PropertyMessageResources] Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,984 INFO  [PropertyMessageResources] Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
11:00:55,504 INFO  [SecurityContextFilter] processing request /alert.do
11:00:55,544 ERROR [SecurityContextFilter] Exception
javax.servlet.ServletException: BeanUtils.populate
   at 
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1098)
   at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:816)
   at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
   at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
   at 
com.baselogic.yoursos.struts.ExtendedActionServlet.process(ExtendedActionServlet.java:53)
   at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
   at 
org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:342)
   at 
com.baselogic.yoursos.security.SecurityContextFilter.doFilter(SecurityContextFilter.java:102)
   at 
org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicationHandler.java:334)
   at 
com.baselogic.yoursos.user.UserPreferenceFilter.doFilter(UserPreferenceFilter.java:46)
  

Re: javax.servlet.ServletException: BeanUtils.populate

2003-05-30 Thread Mick Knutson
I tried ommitting that global forward, but then /alert was not found and I 
got a 404 error.
What should I have done/do?


From: James Mitchell [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: URGENT: javax.servlet.ServletException: BeanUtils.populate
Date: Thu, 29 May 2003 14:43:08 -0400
One other thing I noticed, you've got a potential circular reference in
/alert by specifying the input as /alert.do.
--
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org


- Original Message -
From: Mick Knutson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 29, 2003 2:26 PM
Subject: URGENT: javax.servlet.ServletException: BeanUtils.populate
 I have an error that I have been working on for 3 solid days. i have
 searched the archives, but can't find my issue resolved anywhere.
 I have an array of objects (ContactDto[]) that I need to display. I
actually
 have the full list I send in (userContacts), and the list of objects
 selected in the alertForm (alertContacts).
 I can display the form for an initial addAlert() just fine. I have not
 gotten any further.
 I do not seem t even get to my add() method ever. And even if I turn the
log
 level to debug, I do not seem to get any more information on the
stacktrace.

 Please help me on this as I am very frustrated and confused.


 StackTrace for alertForm Load, and then submission:
 ==
 10:59:25,965 INFO  [AlertActions] userContacts[] length: 3
 10:59:25,975 INFO  [AlertActions]
 ==
 10:59:25,975 INFO  [AlertActions] Must be a new alert then
 10:59:25,985 INFO  [AlertActions]
 ==
 10:59:25,985 INFO  [AlertActions] alertDto: {alertId= userId=1 subject=
 startDate=null reoccurring= gracePeriodDays= gracePeriodHours=
 endingDate=Thu May 29 10:59:24 CEST 2003 startingLocation=null
 endingLocation=null status= safeConfirm= details= noteToContactees=}
 10:59:25,995 INFO  [AlertActions]
 ==
 10:59:45,944 INFO  [PropertyMessageResources] Initializing,
 config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
 10:59:45,944 INFO  [PropertyMessageResources] Initializing,
 config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
 10:59:45,954 INFO  [PropertyMessageResources] Initializing,
 config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
 10:59:45,954 INFO  [PropertyMessageResources] Initializing,
 config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
 10:59:45,984 INFO  [PropertyMessageResources] Initializing,
 config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
 11:00:55,504 INFO  [SecurityContextFilter] processing request /alert.do
 11:00:55,544 ERROR [SecurityContextFilter] Exception
 javax.servlet.ServletException: BeanUtils.populate
 at
 org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1098)
 at

org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
ava:816)
 at

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
 at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
 at

com.baselogic.yoursos.struts.ExtendedActionServlet.process(ExtendedActionSer
vlet.java:53)
 at
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
 at

org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicatio
nHandler.java:342)
 at

com.baselogic.yoursos.security.SecurityContextFilter.doFilter(SecurityContex
tFilter.java:102)
 at

org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicatio
nHandler.java:334)
 at

com.baselogic.yoursos.user.UserPreferenceFilter.doFilter(UserPreferenceFilte
r.java:46)
 at

org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(WebApplicatio
nHandler.java:334)
 at

org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl
er.java:286)
 at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
 at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
 at

org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext
.java:507)
 at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
 at org.mortbay.http.HttpServer.service(HttpServer.java:863)
 at org.jboss.jetty.Jetty.service(Jetty.java:460)
 at

Re: javax.servlet.ServletException: BeanUtils.populate

2003-05-30 Thread Mick Knutson
I actually have:

td colspan=2
  html:select property=userContacts multiple=true 
  html:optionsCollection property=userContacts
  value=contactId
  label=firstName /
  /html:select
in the JSP, and I also tried using alertContacts as well as the name.



From: David Graham [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: javax.servlet.ServletException: BeanUtils.populate
Date: Thu, 29 May 2003 12:57:32 -0600
I couldn't find any HTML field called alertContacts in your JSP.  If you 
want alertContacts to hold the selected values, you need to have a form 
control called alertContacts.

I normally populate the list from a collection I store in the session or 
request and use a form bean property to save what the user submitted.

David

Sorry, but this is urgent to me, and am very sorry to imply anything 
toward, or against anyone else.

I am having this error when I submit the form. I can display the form 
seemingly fine. I have about 19 forms that are fairly similiar currently, 
and they all submit just fine.
I have gone through this with a fine tooth comb, but am not seeing any 
differences in the Husted.com examples for LookupDispatchAction. I also 
see other people that have the error, but seem to have much more stack 
trace, and I have no idea what the cause would/should actually be.
So, I have started to remove items from the form, like the multi-select, 
but that did not seem to help.


From: David Graham [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: URGENT: javax.servlet.ServletException: BeanUtils.populate
Date: Thu, 29 May 2003 12:34:23 -0600
FYI, marking posts as URGENT is generally considered rude as it implies 
your question is more important than everyone elses.  The error message 
indicates a problem populating your form bean from the request 
parameters.  Are having the problem when submitting the form or 
displaying it?  Is your form control named correctly?

David

I have an error that I have been working on for 3 solid days. i have 
searched the archives, but can't find my issue resolved anywhere.
I have an array of objects (ContactDto[]) that I need to display. I 
actually have the full list I send in (userContacts), and the list of 
objects selected in the alertForm (alertContacts).
I can display the form for an initial addAlert() just fine. I have not 
gotten any further.
I do not seem t even get to my add() method ever. And even if I turn the 
log level to debug, I do not seem to get any more information on the 
stacktrace.

Please help me on this as I am very frustrated and confused.

StackTrace for alertForm Load, and then submission:
==
10:59:25,965 INFO  [AlertActions] userContacts[] length: 3
10:59:25,975 INFO  [AlertActions] 
==
10:59:25,975 INFO  [AlertActions] Must be a new alert then
10:59:25,985 INFO  [AlertActions] 
==
10:59:25,985 INFO  [AlertActions] alertDto: {alertId= userId=1 subject= 
startDate=null reoccurring= gracePeriodDays= gracePeriodHours=
endingDate=Thu May 29 10:59:24 CEST 2003 startingLocation=null 
endingLocation=null status= safeConfirm= details= noteToContactees=}
10:59:25,995 INFO  [AlertActions] 
==
10:59:45,944 INFO  [PropertyMessageResources] Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,944 INFO  [PropertyMessageResources] Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,954 INFO  [PropertyMessageResources] Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,954 INFO  [PropertyMessageResources] Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
10:59:45,984 INFO  [PropertyMessageResources] Initializing, 
config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
11:00:55,504 INFO  [SecurityContextFilter] processing request /alert.do
11:00:55,544 ERROR [SecurityContextFilter] Exception
javax.servlet.ServletException: BeanUtils.populate
   at 
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1098)
   at 
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:816)
   at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
   at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
   at 
com.baselogic.yoursos.struts.ExtendedActionServlet.process(ExtendedActionServlet.java:53)
   at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:520)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:760

RE: javax.servlet.ServletException: BeanUtils.populate

2003-05-30 Thread Mick Knutson
OK, it seems that when I removed the dates all together, then the submit 
works.
It did not work when I changed them to java.sql.Date objects.

So I am very confused now, as java.util.Date works on all my other forms. 
What am I suppose to use and why does java.util.Date _not_ work on this 
form, but does on 15 others?



---
Thanks...
Mick Knutson
---




From: Steve Raeburn [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: URGENT: javax.servlet.ServletException: BeanUtils.populate
Date: Thu, 29 May 2003 12:20:56 -0700
I think it's your dates that might be the problem.

BeanUtils does not have a supplied converter for java.util.Date. Try using
java.sql.Date
You may need a helper method on your form that returns a correctly 
formatted
SQL date (-mm-dd).

Steve

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]