struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dionis Argiri <dionis.arg...@gmail.com>
Subject Upgrading spring 3.0.7 to spring 3.2.3 caused "INPUT" instead of "SUCCESS" result
Date Sat, 24 Aug 2013 11:06:50 GMT
Hi.

I'm using struts 2 & struts-spring plugin.
Both are of version 2.3.15.1.

The problem is that after upgrading spring from 3.0.7 to spring 3.2.3 I
started to get "INPUT" instead of "SUCCESS" result.
After debugging for some time I've figured out, that method
"setFieldErrors(Map<String, List<String>> errorMap)" is called (All my
actions are extending ActionSupport class).

Following argument is passed to method:


   - errorMap = {java.util.LinkedHashMap@8375} size = 1
   - [0] = {java.util.LinkedHashMap$Entry@8385}"org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry"
   -> size = 0
   - key: java.lang.String =
{java.lang.String@8386}"org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry"

   - value:
   org.springframework.context.annotation.ConfigurationClassParser$ImportStack
   =
   {org.springframework.context.annotation.ConfigurationClassParser$ImportStack@8387}
   size = 0

Don't know why this is happening.

Configurations related to spring plugin:

<constant name="struts.objectFactory.spring.autoWire" value="auto"/>

Same happends when I'm changing it to:

<constant name="struts.objectFactory.spring.autoWire" value="type"/>

Property that got injected wrongly is "fieldErrors" (captain obvious ;) ).

Any ideas guys?
P.S. Currently I added ugly hack that's workarounding my issue:
@Override
    public void setFieldErrors(Map<String, List<String>> errorMap) {

if(errorMap.containsKey("org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry")){

errorMap.remove("org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry");
        }

        super.setFieldErrors(errorMap);
    }

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