Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/13.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_Aop_Spring Integration_Spring Aop_Cglib - Fatal编程技术网

Spring集成:部署期间出现CGLIB错误

Spring集成:部署期间出现CGLIB错误,spring,aop,spring-integration,spring-aop,cglib,Spring,Aop,Spring Integration,Spring Aop,Cglib,我正在尝试实现一个非常简单的集成流,但不明白为什么在部署过程中会出现错误。非常感谢您的帮助 Xml配置: <gateway id="eventGateway" service-interface="com.acme.EventGateway"/> <publish-subscribe-channel id="eventChannel"/> <service-activator input-channel="eventChanne

我正在尝试实现一个非常简单的集成流,但不明白为什么在部署过程中会出现错误。非常感谢您的帮助

Xml配置:

<gateway id="eventGateway"
         service-interface="com.acme.EventGateway"/>

<publish-subscribe-channel id="eventChannel"/>

<service-activator
        input-channel="eventChannel"
        ref="eventService"
        method="saveEvent"/>
public interface EventGateway {
@Gateway(requestChannel = "eventChannel")
    public void saveEvent(Event event);
}
Error creating bean with name 'eventGateway': Post-processing of FactoryBean's singleton object failed; nested exception is org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class com.sun.proxy.$Proxy130]: Common causes of this problem include using a final class or a non-visible class; nested exception is java.lang.IllegalArgumentException: Cannot subclass final class class com.sun.proxy.$Proxy130
例外情况:

<gateway id="eventGateway"
         service-interface="com.acme.EventGateway"/>

<publish-subscribe-channel id="eventChannel"/>

<service-activator
        input-channel="eventChannel"
        ref="eventService"
        method="saveEvent"/>
public interface EventGateway {
@Gateway(requestChannel = "eventChannel")
    public void saveEvent(Event event);
}
Error creating bean with name 'eventGateway': Post-processing of FactoryBean's singleton object failed; nested exception is org.springframework.aop.framework.AopConfigException: Could not generate CGLIB subclass of class [class com.sun.proxy.$Proxy130]: Common causes of this problem include using a final class or a non-visible class; nested exception is java.lang.IllegalArgumentException: Cannot subclass final class class com.sun.proxy.$Proxy130
编辑: 我还有一个带有
@enableAspectProxy
注释的Java配置类。 当我删除
@enableAspectProxy
注释时,错误消失了

EDIT2: 我已尝试使用以下内容注释界面:
@Scope(proxyMode=ScopedProxyMode.INTERFACES)
但它没有任何区别。

奇怪-我不能用一个简单的例子重现它;你能分享更多关于用
@enableSpectJautoproxy
注释的类的信息吗?如何将其拉入上下文等。您有很多代理(至少130个),但该注释应该只影响用
@Aspect
注释的类。我猜是另一个BPP在代理网关。第一步是获取org.springframework的调试日志(假设它是代理的框架BPP)。如果这没有帮助,试着将其缩减为一个简单的测试用例,并使用调试器来解决它。如果您有一个小测试用例,我可以提供帮助。我为org.springframework启用了调试级别,但没有找到任何其他信息。