This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

Newbie question about configuration of a ProxyFactoryBeanPage Title Module

Newbie question about configuration of a ProxyFactoryBean

Oct 11th, 2004, 11:08 PM

I want to know how to get access to methods in an implementation class via her interface with the utilisation of a ProxyFactoryBean.

I have an interface - BusinessDelegate - an her implementation class - BusinessdelegateImpl -. An Action class - BaseAction - from the web layer (using Struts) want to have access to a specific method from the interface - BusinessDelegate.

Will try to investigate more later, but I can say now that there doesn't seem to be anything wrong with your proxy beans and config. I pretty much cut and paste to a small Spring 1.0.2 application test which called the Proxy just fine. It must have something to do with your particular usage or environment.

Comment

From javadocs for java.lang.reflect.Method we've got IllegalArgumentException if:
1) the method is an instance method and the specified object argument is not an instance of the class or interface declaring the underlying method (or of a subclass or implementor thereof)
2) if the number of actual and formal parameters differ
3) if an unwrapping conversion for primitive arguments fails
3) after possible unwrapping, a parameter value cannot be converted to the corresponding formal parameter type by a method invocation conversion

None of these seem to be the case. Can you isolate the code and post just the minimal code that exhibits the behaviour?