Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
spring即使在类实现接口时也使用CGLIB代理_Spring_Gwt Rpc_Spring Aop - Fatal编程技术网

spring即使在类实现接口时也使用CGLIB代理

spring即使在类实现接口时也使用CGLIB代理,spring,gwt-rpc,spring-aop,Spring,Gwt Rpc,Spring Aop,我正在尝试使用SpringAOP截取GWT-RPC应用程序的方法(使用GWT服务器库,所以RPC服务不扩展RemoteServiceServlet)。当我将war部署到tomcat并启动应用程序时,CGLIB由于某种原因失败。但我不明白为什么CGLIB一开始就被用于代理。既然我的RPC类实现了接口,它不应该使用JDK动态代理吗 我需要做些什么来调试这个问题吗?请告知 注意:仅供参考,Spring遇到了这个异常,但我认为这是另一个问题,我无法理解为什么会出现CGLIB代理 Caused by: n

我正在尝试使用SpringAOP截取GWT-RPC应用程序的方法(使用GWT服务器库,所以RPC服务不扩展RemoteServiceServlet)。当我将war部署到tomcat并启动应用程序时,CGLIB由于某种原因失败。但我不明白为什么CGLIB一开始就被用于代理。既然我的RPC类实现了接口,它不应该使用JDK动态代理吗

我需要做些什么来调试这个问题吗?请告知

注意:仅供参考,Spring遇到了这个异常,但我认为这是另一个问题,我无法理解为什么会出现CGLIB代理

Caused by: net.sf.cglib.core.CodeGenerationException: net.sf.ehcache.CacheException-->Another unnamed CacheManager already exists 
in the same VM. Please provide unique names for each CacheManager in the config 
or do one of following:
1. Use one of the CacheManager.create() static factory methods to reuse same    CacheManager with same name or create one if necessary
2. Shutdown the earlier cacheManager before creating new one with same name.

为了可能犯同样错误的其他(很少)人而回答


spring AOP的方面设置不正确,事实上,它试图以上下文中几乎所有的类为目标,这就是为什么EhCache开始出现问题,因为有多个CacheManager实例(因为CacheManager没有实现接口的CGLIB代理)

它是如何失败的?你能显示完整的堆栈跟踪吗?