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.

CGLIB error when using spring-flex in Spring dm

May 11th, 2009, 04:16 PM

I am attempting to setup a flex remoting destination in a Spring dm Web bundle. The error is displayed during PAR deployment. It appears that the spring-flex integration is trying to create a bean and proxy an amf channel class instance. Has anybody else seen this. For reference, I've included the relevant parts of my web context and services-config files below.

BTW, I'm using the Spring Enterprise Repository bundles for BlazeDS. I manually copied the org.springframework.flex RC1 jar into the usr repository in Spring dm server.

Thanks,
Marshall

Error
---------------------------------------
...org.springframework.beans.factory.BeanCreationE xception: Error creating bean with name '_messageBrokerDefaultHandlerMapping': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '_messageBroker': Invocation of init method failed; nested exception is org.springframework.aop.framework.AopConfigExcepti on: Could not generate CGLIB subclass of class [class flex.messaging.endpoints.AMFEndpoint]: Common causes of this problem include using a final class or a non-visible class; nested exception is net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null...

Comment

Hi,
I was having the same problem (even with latest RC2 from Blaze DS) and was fixed adding the cglib as dependency in my pom.xml.
I have realized that this library is marked as optional in blaze pom.xml... I could imagina is related with this fixed already in RC2:http://jira.springframework.org/browse/FLEX-47
And maybe

Comment

Right, CGLIB is still marked as optional because it's not technically always required depending on what features you are using. In practice though, I would imagine just about everyone is using the features that require it, so we'll consider going ahead and making it required for 1.0 final.