Results 1 to 5 of 5

Thread: CGLIB error when using spring-flex in Spring dm

  1. #1

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

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

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

    <bean id="newsService" class="net.fractech.blazeds.news.NewsService" />

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


    services-config
    -----------------------------------------------
    <services>
    <default-channels>
    <channel ref="news"/>
    </default-channels>
    </services>

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

  2. #2

    Default 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?

    Thanks,
    Marshall

  3. #3
    Join Date
    May 2009
    Posts
    4

    Default cglib optional in pom

    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

  4. #4
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    1,224

    Default

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

    Staff Engineer, Web Products Team
    SpringSource

  5. #5
    Join Date
    May 2009
    Posts
    2

    Default

    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

    Raśl

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •