RE: ClassCastException com.dev.model.Form cannot be cast to java.lang.String

2009-03-24 Thread Martin Gainty
. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided. > Date: Tue, 24 Mar 2009 16:50:54 +0100 > Subject: Re: ClassCastExc

Re: ClassCastException com.dev.model.Form cannot be cast to java.lang.String

2009-03-24 Thread Lukasz Lenart
2009/3/24 foward : > the method getForm() return a object Form where before with the respective > id is obtained and returned. You put method getForm() in s:form as a action, which means such method will be called by Struts 2 and the framework will expect a String - result name, which you have to

Re: ClassCastException com.dev.model.Form cannot be cast to java.lang.String

2009-03-24 Thread Jim Kiley
view: > > > > Survey : ${form.name} > Introduction : ${form.introduction} > Close Date: ${form.close_date} > > > > to show information about one Form. > > Please if you can guide me to solve this, Thanks in advance! > > Best Regards > > &

Re: ClassCastException com.dev.model.Form cannot be cast to java.lang.String

2009-03-24 Thread foward
- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/ClassCastException-com.dev.model.Form-cannot-be-cast-to-j

Re: ClassCastException com.dev.model.Form cannot be cast to java.lang.String

2009-03-24 Thread Lukasz Lenart
2009/3/24 foward : > Method getForm() return object Form or String? Struts is expecting that action will return a String not an object. I think you should read some tutorial how to use Struts 2. Regards -- Lukasz http://www.lenart.org.pl/ --

ClassCastException com.dev.model.Form cannot be cast to java.lang.String

2009-03-24 Thread foward
troduction : ${form.introduction} Close Date: ${form.close_date} to show information about one Form. Please if you can guide me to solve this, Thanks in advance! Best Regards -- View this message in context: http://www.nabble.com/ClassCastException-com.dev.model.Form-cannot-be-cast-to-java.l

Re: OGNL ClassCastException

2009-02-16 Thread Musachy Barroso
to deal with Collections that are Lists, because it >> extends ognl.SetPropertyAccessor which casts the Collection to a Set, >> causing a ClassCastException when acting on a List. >> >> In fact there is no ognl.CollectionPropertyAccessor so I created one and >> for now I&#

Re: OGNL ClassCastException

2009-02-16 Thread Adam Hardy
-named. It is unable to deal with Collections that are Lists, because it extends ognl.SetPropertyAccessor which casts the Collection to a Set, causing a ClassCastException when acting on a List. In fact there is no ognl.CollectionPropertyAccessor so I created one and for now I'm

Re: OGNL ClassCastException

2009-02-16 Thread Adam Hardy
t extends ognl.SetPropertyAccessor which casts the Collection to a Set, causing a ClassCastException when acting on a List. In fact there is no ognl.CollectionPropertyAccessor so I created one and for now I'm going to override struts-default.xml to set OGNL to use my own XWorkCollectionProper

Re: OGNL ClassCastException

2009-02-15 Thread Musachy Barroso
rty to java.util.Set > with the resulting ClassCastException. > > I noticed in an xwork jira that this seems to have happened before: > > http://jira.opensymphony.com/browse/XW-310 > > but that's fixed - unfortunately not helping me though. > > I can work around this by co

Re: OGNL ClassCastException

2009-02-15 Thread Adam Hardy
h the resulting ClassCastException. I noticed in an xwork jira that this seems to have happened before: http://jira.opensymphony.com/browse/XW-310 but that's fixed - unfortunately not helping me though. I can work around this by copying XWorkCollectionPropertyAccessor and writing a meth

Re: OGNL ClassCastException

2009-02-14 Thread Adam Hardy
Yes, it is a JPA entity bean proxied by OpenJPA. It has a list property - the bean is a parent in a parent-child relationship and this property is the list of children. This is the incoming HTTP parameter: portfolio.weightings[0]=123 Despite debugging it I am still not sure what has happened

Re: OGNL ClassCastException

2009-02-13 Thread Musachy Barroso
It seems like it is not a list but a proxy to it "org.apache.openjpa.util.java$util$ArrayList$proxy" which could be the root of the problem. musachy On Fri, Feb 13, 2009 at 12:00 PM, Adam Hardy wrote: > I have a situation where OGNL seems to be misinterpreting the class of the > HTTP parameter p

OGNL ClassCastException

2009-02-13 Thread Adam Hardy
I have a situation where OGNL seems to be misinterpreting the class of the HTTP parameter property it is setting during the ParameterInterceptor call. As you can see from the exception message, the object is an ArrayList and certainly not a Set which OGNL thinks it is. I have double, triple and

ClassCastException: org.apache.struts.taglib.html.MessagesTei

2009-02-03 Thread Ken Bowen
Hi, I have an old app which was developed under struts 1.2.8 using struts- tiles, and has undergone steady development. However, /AS FAR AS I KNOW/, no changes to the tags library files have been made for a long time. Yet today, after rebuilding the project (using Project > Clean in Eclipse

Re: Random ClassCastException : I'm expecting Long, Struts gives me String on some servers...

2009-01-30 Thread Ralf Fischer
is :-) Cheers, -Ralf [1] https://issues.apache.org/struts/browse/WW-2107 > > Thanks for your help. > -- > View this message in context: > http://www.nabble.com/Random-ClassCastException-%3A-I%27m-expecting-Long%2C-Struts-gives-me-Strin

Re: Random ClassCastException : I'm expecting Long, Struts gives me String on some servers...

2009-01-30 Thread mleneveut
ime to do it) Thanks for your help. -- View this message in context: http://www.nabble.com/Random-ClassCastException-%3A-I%27m-expecting-Long%2C-Struts-gives-me-String-on-some-servers...-tp21722894p21743689.html Sent from the Struts - User

Re: Random ClassCastException : I'm expecting Long, Struts gives me String on some servers...

2009-01-29 Thread Dale Newfield
mleneveut wrote: What I can't understand is why it works in some environments, and no others. The war is the same. Probably because there were known bugs in 2.1.0 (both struts and xwork). As such, it was never intended for general use. The first GA (General Availability) 2.1.x was 2.1.6. U

Re: Random ClassCastException : I'm expecting Long, Struts gives me String on some servers...

2009-01-29 Thread mleneveut
2.1.0 > > You should think about upgrading to 2.1.6, as it became GA recently. > > Cheers, > -Ralf > > [1] http://struts.apache.org/2.0.14/docs/type-conversion.html > > > -- View this message in context: http://www.nabble.com/Random-ClassCastException-%3A-I%27

Re: Random ClassCastException : I'm expecting Long, Struts gives me String on some servers...

2009-01-29 Thread Ralf Fischer
size="10"> > > > Action : >private List idsCommerciaux; >public List getIdsCommerciaux() { >return idsCommerciaux; >} >public void setIdsCommerciaux(List idsCommerciaux) { >

Random ClassCastException : I'm expecting Long, Struts gives me String on some servers...

2009-01-29 Thread mleneveut
(List idsCommerciaux) { this.idsCommerciaux = idsCommerciaux; } for (Long unCommercial : idsCommerciaux) { //ClassCastException here Struts2 version : 2.1.0 -- View this message in context: http://www.nabble.com/Random-ClassCastException-%3A-I%27m-expecting-Long%2C-S

Re: ClassCastException

2007-11-16 Thread slideharmony
gt; > >> > What line's the Exception being thrown on? >> > >> > -Original Message- >> > From: slideharmony [mailto:[EMAIL PROTECTED] >> > Sent: Friday, November 16, 2007 9:35 AM >> > To: user@struts.apache.org >> > Subjec

[OT] Re: ClassCastException

2007-11-16 Thread Dave Newton
> Utente newuser = null; > begin(); > newuser = (User)getSession().save(user); > commit(); > close(); > return newuser; > } > > this code throws a ClassCastException: > java.lang.Long > I have mapped all correctly, i have the same code > that works perfec

RE: ClassCastException

2007-11-16 Thread slideharmony
r@struts.apache.org > Subject: ClassCastException > > > Hello, > I have a problem saving a bean User. I use the following code: > > UserDao dao = new UserDao(); > User user = new User(); > Service.populate(user); > dao.save(utente); > if(user != null){ > return S

Re: ClassCastException

2007-11-16 Thread Nils-Helge Garli Hegvik
lto:[EMAIL PROTECTED] > > Sent: Friday, November 16, 2007 9:35 AM > > To: user@struts.apache.org > > Subject: ClassCastException > > > > > > Hello, > > I have a problem saving a bean User. I use the following code: > > > > UserDao dao = new UserDao(); > &

RE: ClassCastException

2007-11-16 Thread Hernandez, David
What line's the Exception being thrown on? -Original Message- From: slideharmony [mailto:[EMAIL PROTECTED] Sent: Friday, November 16, 2007 9:35 AM To: user@struts.apache.org Subject: ClassCastException Hello, I have a problem saving a bean User. I use the following code: UserDa

ClassCastException

2007-11-16 Thread slideharmony
(); newuser = (User)getSession().save(user); commit(); close(); return newuser; } this code throws a ClassCastException: java.lang.Long I have mapped all correctly, i have the same code that works perfectly in struts, but I get that exception with struts2. Can anybody help me? -- View this message in

Re: [S2] ClassCastException on getParameters

2007-08-04 Thread Zarar Siddiqi
Why can't you access the HttpServletRequest object using ServletActionContext.getRequest() and then just use the getParameter() method to get the request parameters? If you're getting a ClassCastException it's because you're casting something that isn't a String to a S

Re: [S2] ClassCastException on getParameters

2007-08-04 Thread Ravi Kumar
tion.getInvocationContext().getSession(); > Map parameters = > invocation.getInvocationContext().getParameters(); > String loginAttempt = > (String)parameters.get(Constants.LOGIN_ATTEMPT_KEY); > > > return invocation.invoke (); >

[S2] ClassCastException on getParameters

2007-08-02 Thread meissa . sakho
getSession(); Map parameters = invocation.getInvocationContext().getParameters(); String loginAttempt = (String)parameters.get(Constants.LOGIN_ATTEMPT_KEY); return invocation.invoke (); } When the line in bold is reached, I' getting a ClassCastExce

RE: Tomcat 5.5.9 with Struts 1.2.7 -> ClassCastException - looks like a Tomcat bug

2005-08-18 Thread stewart.cambridge
redundant and it can safely be removed. By removing it, it resolves the ClassCastException with org.apache.struts.taglib.html.MessagesTei But why should this double presence of jsp-api.jar be a problem for Tomcat 5.5.9 but not for 5.0.28? Thank you, Stewart -Original Message- From

RE: Tomcat 5.5.9 with Struts 1.2.7 -> ClassCastException - looks like a Tomcat bug

2005-08-17 Thread Christian Dionne
(they were not used) solved the problem. Thanks, Christian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: August 17, 2005 6:24 AM To: [EMAIL PROTECTED]; user@struts.apache.org Subject: Tomcat 5.5.9 with Struts 1.2.7 -> ClassCastException - looks like a Tomcat

Tomcat 5.5.9 with Struts 1.2.7 -> ClassCastException - looks like a Tomcat bug

2005-08-17 Thread stewart.cambridge
Using Struts 1.2.7 with the latest Tomcat 5.5.9 I get the following in localhost..log when I first try to access my web application: 17-Aug-2005 11:02:02 org.apache.catalina.core.Stand-ardHostValve custom SEVERE: Exception Processing ErrorPage[exceptionType=java.l-ang.Exception, location=/erro

ClassCastException

2005-07-25 Thread Nick Heudecker
I'm using Tomcat 5.5, JDK 1.5, Struts 1.2.7 and Tiles. I'm getting the following exception when I navigate to a Tiles page, I'm getting the following: java.lang.ClassCastException: org.apache.struts.taglib.tiles.UseAttributeTei at org.apache.jasper.compiler.TagLibraryInfoImpl.createTagIn

RE: What Are the Causes For Validation to Throw ClassCastException?

2004-09-22 Thread David G. Friedman
formset. Regards, David -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 4:16 PM To: Struts Users Mailing List Subject: Re: What Are the Causes For Validation to Throw ClassCastException? I have changed the property from 'page

Re: What Are the Causes For Validation to Throw ClassCastException?

2004-09-22 Thread Matt Bathje
sort. Matt Caroline Jen wrote: I have changed the property from 'page' to 'pg'. The ClassCastException problem is gone. However, the validation.xml that I put in the AppName/WEB-INF is not doing anything. In my action mapping (struts-config.xml), I did set

Re: What Are the Causes For Validation to Throw ClassCastException?

2004-09-22 Thread Caroline Jen
I have changed the property from 'page' to 'pg'. The ClassCastException problem is gone. However, the validation.xml that I put in the AppName/WEB-INF is not doing anything. In my action mapping (struts-config.xml), I did set validate="true" and in my va

Re: What Are the Causes For Validation to Throw ClassCastException?

2004-09-22 Thread Matt Bathje
title" depends="required"> It appears as though the problem is with your use of a form-property called "page" - based on what I am seeing around line 141 of the DynaValidatorForm code, if you have a property nam

What Are the Causes For Validation to Throw ClassCastException?

2004-09-22 Thread Caroline Jen
Do not understand the 'HTTP Status 500 - java.lang.ClassCastException org.apache.struts.validator.DynaValidatorForm.validate(DynaValidatorForm.java:141)' 1. I have this plug-in by the very end of the struts-config.xml file: 2. I have this action mapping in the struts-config.xml file:

RE: ClassCastException when usig multiple web applications

2004-07-06 Thread McCormack, Chris
ssage- From: Mathew Joseph [mailto:[EMAIL PROTECTED] Sent: 06 July 2004 06:42 To: Struts Users Mailing List Subject: RE: ClassCastException when usig multiple web applications Hi The context name of my application is "am" . Here is the sample code of action class, struts-config, tile

RE: ClassCastException when usig multiple web applications

2004-07-05 Thread Mathew Joseph
- From: McCormack, Chris [mailto:[EMAIL PROTECTED] Sent: Monday, July 05, 2004 7:38 PM To: Struts Users Mailing List Subject: RE: ClassCastException when usig multiple web applications Please paste in a sample action and a sample tile-def. The more info the easier it is to help you out

RE: ClassCastException when usig multiple web applications

2004-07-05 Thread McCormack, Chris
] Subject: ClassCastException when usig multiple web applications Hi, We have deployed a ROOT application and another application called 'AM' in Tomcat 4.1.30. Both applications use struts. In struts config file as well as tiles definition files we have given all paths relative to context.

ClassCastException when usig multiple web applications

2004-07-05 Thread Mathew Joseph
Hi, We have deployed a ROOT application and another application called 'AM' in Tomcat 4.1.30. Both applications use struts. In struts config file as well as tiles definition files we have given all paths relative to context. Following exception is thrown, when action class is accessed. java.l

struts ClassCastException

2004-05-19 Thread ksitron
My web-app runs great when first starting JBoss. After making src changes to my web-app, I build, and redeploy using ant. I then attempt to test my changes by going down the exact same html:link navigation as before, only to receive a ClassCastException from

Re: Problem of ClassCastException .No doubt ArrayList has some size

2004-04-22 Thread JavaSoft
> Here is a problem with Typecasting,throws > ClassCastException. > I'm not able get why it's getting.Bcoz i spent on > this problem around > 2weeks. > i'm very thankful to u for ur solution. > > Problem of Area is as Follows: > > i've myown

Problem of ClassCastException .No doubt ArrayList has some size

2004-04-22 Thread ganesh g
Hi Friends, ThanQ very much 4ur non-stop help towards me. Here is a problem with Typecasting,throws ClassCastException. I'm not able get why it's getting.Bcoz i spent on this problem around 2weeks. i'm very thankful to u for ur solution. Problem of Area is as Follows: i'v

Re: Problem of ClassCastException when ArrayList to My own Class

2004-04-22 Thread JavaSoft
declare or set it to null, so you will get exception when it return null. --- ganesh g <[EMAIL PROTECTED]> wrote: > Hi Friends, > ThanQ very much 4ur non-stop help towards me. > Here is a problem with Typecasting,throws > ClassCastException. > I'm not able get why it's

Problem of ClassCastException when ArrayList to My own Class

2004-04-22 Thread ganesh g
Hi Friends, ThanQ very much 4ur non-stop help towards me. Here is a problem with Typecasting,throws ClassCastException. I'm not able get why it's getting.Bcoz i spent on this problem around 2weeks. i'm very thankful to u for ur solution. Problem of Area is as Follows: i'v