Announcement Announcement Module
No announcement yet.
CGLIB error when using spring-flex in Spring dm Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • CGLIB error when using spring-flex in Spring dm

    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.


    --------------------------------------- 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...

    web-context (spring app context)
    <flex:mapping pattern="/messagebroker/*" />
    <flex:remoting-service default-channels="news" />

    <bean id="newsService" class="" />

    <flex:remoting-destination ref="newsService" />

    <channel ref="news"/>

    <channel-definition id="news" class="mx.messaging.channels.AMFChannel">
    <endpoint url="http://{}:{server.port}/{context.root}/blazeds/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>

  • #2
    Fixed by importing CGLIB library into my web bundle -- why?

    This error was fixed by importing the CGLIB library into my web bundle. I do not understand why this should be necessary.

    Any ideas?



    • #3
      cglib optional in pom

      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:
      And maybe


      • #4
        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.


        • #5
          Maybe it would be better to have it as required and if is not needed exclude it in your own pom. I know is not allways required but almost.

          I also have got this problem :P