Hi Dave,

I do not think this is a Sprin issue, I stated in my last mail that I 
though this was an issue 
with the pluing for Spring for Struts2. 

However it looks like this was not the case, after further investigation, 
it looks like it
is the InstantiatingNullHandler that is causing the problem.

When a property returns null, it seems that this tries to generate a new 
instance by calling:
        ObjectFactory.getObjectFactory().buildBean(clazz, context);

And since I am using Spring as my ObjectFactory, I get the error reported.

Regards
Ian

CSC Solutions Norge AS
Registered Office: SandsliƄsen 57, 5254 Sandsli, Norway 
Registered in Norway No: 958 958 455

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. 
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to 
any order or other contract unless pursuant to explicit written agreement 
or government initiative expressly permitting the use of e-mail for such 
purpose.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------




Dave Newton <[EMAIL PROTECTED]> 
20.05.2008 17:06
Please respond to
"Struts Users Mailing List" <user@struts.apache.org>


To
Struts Users Mailing List <user@struts.apache.org>
cc

Subject
Re: Spring autowiring null values






--- Ian Meikle <[EMAIL PROTECTED]> wrote:
> Yes I have tried, but as I previously said, this is the STRUTS2
> Spring plugin that is causing this behaviour NOT Spring.
> 
> More details:
> 
> I have a ModelDrive action.
> In my JSP, I have the tag:
>         <s:textfield name="person.name" />
> 
> In some situations when we call the action we create a new model,
> which does not have a person. In this case, the plugin tries to
create
> a new person so that it can set the name.
> 
> I do not want it to do this.

What, specifically, leads you to believe this is a Spring issue?

Do you have a bean defined with the "person" (or "model", I suppose?)
name such that Spring is aware of it and would try to instantiate it
and inject it into your action?

Dave


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


Reply via email to