struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Nenning <Christoph.Nenn...@lex-com.net>
Subject Re: spring struts 2: Unexpected Exception caught setting 'lang' on 'class com.sun.proxy.$Proxy164
Date Mon, 31 Jul 2017 07:49:47 GMT
Hi,

seems to me like a issue with spring setup. Can you share that?


Regards,
Christoph



> From: Rubens Gomes <rubens_gomes@hotmail.com>
> To: "user@struts.apache.org" <user@struts.apache.org>, 
> Date: 30.07.2017 22:54
> Subject: spring struts 2:  Unexpected Exception caught setting 
> 'lang' on 'class com.sun.proxy.$Proxy164
> 
> I am using the Spring + Struts 2 Plugin, and I am getting an error 
> from the Struts2 ParameterInteceptor (see below) when setting 
> request parameters sent on the URL.  My Actions are being created by
> the Spring factory.  And I *do* have the proper properties setters 
> in my class (see below).
> 
> In the URL below, the "lang" and "redirectURL" , both lang/
> redirectURL are not being set.
> 
> http://localhost:8080/locale/change-locale.do?lang=en&redirectURL=%
> 2Fsecurity%2Fview-login.do
> 
> 
> 07-30 13:49:05.187 DEBUG [http-nio-8080-exec-5] 
> c.o.x.i.ParametersInterceptor - Setting params lang => enredirectURL => 
> 07-30 13:49:05.188 DEBUG [http-nio-8080-exec-5] 
> c.o.x.i.ParametersInterceptor - Parameter [lang] was accepted and 
> will be appended to action!
> 07-30 13:49:05.188 DEBUG [http-nio-8080-exec-5] 
> c.o.x.i.ParametersInterceptor - Parameter [redirectURL] was accepted
> and will be appended to action!
> ...
> 07-30 13:49:05.235 ERROR [http-nio-8080-exec-5] 
> c.o.x.i.ParametersInterceptor - Developer Notification (set 
> struts.devMode to false to disable this message):
> Unexpected Exception caught setting 'lang' on 'class com.sun.proxy.
> $Proxy164: Error setting expression 'lang' with value ['en', ]
> 07-30 13:49:05.236 DEBUG [http-nio-8080-exec-5] 
> c.o.x.c.i.InstantiatingNullHandler - Entering nullPropertyValue 
> [target=[com.ezlista.web.struts2.action.ChangeLocaleAction@4bfd8bce,
> com.opensymphony.xwork2.DefaultTextProvider@18e0976d], property=devmode]
> 07-30 13:49:05.245 ERROR [http-nio-8080-exec-5] 
> c.o.x.i.ParametersInterceptor - Developer Notification (set 
> struts.devMode to false to disable this message):
> Unexpected Exception caught setting 'redirectURL' on 'class 
> com.sun.proxy.$Proxy164: Error setting expression 'redirectURL' with
> value ['', ]
> 
> 
> 
> @Scope("request")
> @Controller
> @SuppressWarnings("serial")
> @Namespace("/locale")
> @Results( {
>   @Result(name=Action.INPUT,
>           location="/error.do",
>           type="dispatcher"),
>   @Result(name=Action.SUCCESS,
>           location="${redirectURL}",
>           type="dispatcher")
> } )
> public class ChangeLocaleAction extends BaseAction
> {
>     private String lang;
>     private String redirectURL;
> 
> 
>     public ChangeLocaleAction()
>     {
>         super();
>     }
> 
> 
>    @Override
>     public String execute()
>     {
> //  code not displayed....
>     }
> 
> 
>     /**
>      * @return the redirectURL
>      */
>     public String getRedirectURL()
>     {
>         return redirectURL;
>     }
> 
> 
> 
>     /**
>      * @param url the redirectURL to set
>      */
>     public void setRedirectURL(String url)
>     {
>   //  _--------->>>>>> NOT BEING CALLED <<<< --------
>         this.redirectURL = url;
>     }
> 
> 
>     /**
>      * @return the lang
>      */
>     public String getLang()
>     {
>         return lang;
>     }
> 
> 
>     /**
>      * @param lang the lang to set
>      */
>     public void setLang(String lang)
>     {
>   //  _--------->>>>>> NOT BEING CALLED <<<< --------
>         this.lang = lang;
>     }
> 
> }
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

This Email was scanned by Sophos Anti Virus

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message