Announcement Announcement Module
No announcement yet.
Problem while loading ConnectController Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem while loading ConnectController


    I am getting the following error when i declare ConnectController as a bean in my application-context xml file.
    <bean class=" ectController">
    <property name="applicationUrl" value="${application.url}" />

    22:33:30.261 [[ERROR] DispatcherServlet] Context initialization failed
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.De faultAnnotationHandlerMapping#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name ' troller#0' defined in ServletContext resource [/WEB-INF/spring-context/application-context.xml]: Initialization of bean failed; nested exception is org.springframework.aop.framework.AopConfigExcepti on: Could not generate CGLIB subclass of class [class roller]: Common causes of this problem include using a final class or a non-visible class; nested exception is java.lang.IllegalArgumentException: Superclass has no null constructors but no arguments were given

    I am using Spring core 3.0.5 and Spring social 1.0 RC1

    Would really appreciate if someone can help me out regarding this.

    Thanks and regards

  • #2
    For some reason cglib is trying to subclass ConnectController in your application, presumably to proxy it. Why is this?



    • #3
      Hi Keith,

      I found the root cause of the issue. Actually in order to enable tracing at controller and service layers, we have enabled an intercepter using BeanNameAutoProxyCreator. The entry in the dispatcher context XML is as below:
      class="org.springframework.aop.framework.autoproxy .BeanNameAutoProxyCreator">
      <property name="beanNames" value="*Controller,*Service" />
      <property name="proxyTargetClass" value="true" />
      <property name="interceptorNames">
      <property name="order" value="2" />
      This entry was trying to create a proxy for the connectcontroller as well (using CLIB) and hence the issue. Now we need to find a way to differentiate our application controllers versus the spring social controllers so that the proxying happens only for our applicatin controllers.

      Thanks and regards
      Last edited by rajdeeplahkar; Jul 16th, 2011, 05:10 AM.