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 at sun.reflect.DelegatingMethodAccessorImpl.invoke(De at java.lang.reflect.Method.invoke( at org.directwebremoting.impl.ExecuteAjaxFilter.doFil ter( at org.directwebremoting.impl.DefaultRemoter$1.doFilt er( at org.directwebremoting.impl.DefaultRemoter.execute( at org.directwebremoting.impl.DefaultRemoter.execute( at org.directwebremoting.servlet.PlainCallHandler.han dle( at org.directwebremoting.servlet.UrlProcessor.handle( at org.directwebremoting.spring.DwrController.handleR equestInternal( at org.springframework.web.servlet.mvc.AbstractContro ller.handleRequest( at org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter.handle(SimpleControllerHandlerAda at org.springframework.web.servlet.DispatcherServlet. doDispatch( at org.springframework.web.servlet.DispatcherServlet. doService(

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 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.