Siddharth_4 0 Newbie Poster

I have just upgraded my web application from spring version 3.0 to spring 3.2.6.

I am using Maven, DWR 2.0.2 and Spring AOP in this web application.

All my configuration is XML based, I am not using annotations.

When I upgraded my configuration files to spring version 3.2.6. I faced the following exception:-

2014-01-21 15:20:29,534 [TP-Processor3] WARN org.directwebremoting.impl.DefaultRemoter::warn - Method execution failed: java.lang.IllegalArgumentException: object is not an instance of declaring class at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.directwebremoting.impl.ExecuteAjaxFilter.doFil ter(ExecuteAjaxFilter.java:34) at org.directwebremoting.impl.DefaultRemoter$1.doFilt er(DefaultRemoter.java:428) at org.directwebremoting.impl.DefaultRemoter.execute( DefaultRemoter.java:431) at org.directwebremoting.impl.DefaultRemoter.execute( DefaultRemoter.java:283) at org.directwebremoting.servlet.PlainCallHandler.han dle(PlainCallHandler.java:52) at org.directwebremoting.servlet.UrlProcessor.handle( UrlProcessor.java:101) at org.directwebremoting.spring.DwrController.handleR equestInternal(DwrController.java:234) at org.springframework.web.servlet.mvc.AbstractContro ller.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter.handle(SimpleControllerHandlerAda pter.java:48) at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:925) at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:856)

This exception was getting resolved when I changed AOP configuration from aop:scoped-proxy proxy-target-class="false" to aop:scoped-proxy proxy-target-class="true"

Now as per my knowledge, it got resolved because now the application was using CGLIB proxy instead of JDK Dynamic proxy.

Now the problem is that I don't want to use CGLIB. Is there any constraint in using JDK dynamic proxy with Spring 3.2.6?? Is there any solution to this problem?

Note - I am already using Interfaces, so that doesn't seems to be the issue here.

Thanks in advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.