You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rubens Gomes <ru...@hotmail.com> on 2017/07/30 19:00:28 UTC

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


Re: spring struts 2: Unexpected Exception caught setting 'lang' on 'class com.sun.proxy.$Proxy164

Posted by Rubens Gomes <ru...@hotmail.com>.
I am back to *no* longer using the spring+struts plugin.  I chose to have actions be created by the struts framework instaead to avoid issues.

Sent from Outlook
________________________________________
From: Christoph Nenning <Ch...@lex-com.net>
Sent: Monday, July 31, 2017 3:49 AM
To: Struts Users Mailing List
Subject: Re: spring struts 2:  Unexpected Exception caught setting 'lang' on 'class com.sun.proxy.$Proxy164

Hi,

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


Regards,
Christoph



> From: Rubens Gomes <ru...@hotmail.com>
> To: "user@struts.apache.org" <us...@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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: spring struts 2: Unexpected Exception caught setting 'lang' on 'class com.sun.proxy.$Proxy164

Posted by Christoph Nenning <Ch...@lex-com.net>.
Hi,

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


Regards,
Christoph



> From: Rubens Gomes <ru...@hotmail.com>
> To: "user@struts.apache.org" <us...@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