Announcement Announcement Module
Collapse
No announcement yet.
org.springframework.aop.framework.AopConfigExcepti on Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • org.springframework.aop.framework.AopConfigExcepti on

    In my application i got this kind of exception already CGLIB 2 is in classpath, my working environment JDK 1.4.2 and spring 2
    ------------------------------
    INFO [main] (DefaultSingletonBeanRegistry.java:282) - Destroying singletons in
    org.springframework.beans.factory.support.DefaultL istableBeanFactory@19da967: de
    fining beans [scopedTarget.businessDelegate,businessDelegate,fro ntPageController
    ,urlMapping,viewResolver]; root of factory hierarchy
    ERROR [main] (ContextLoader.java:204) - Context initialization failed
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean wit
    h name 'businessDelegate': Initialization of bean failed; nested exception is or
    g.springframework.aop.framework.AopConfigException : Cannot proxy target class be
    cause CGLIB2 is not available. Add CGLIB to the class path or specify proxy inte
    rfaces.
    Caused by:
    org.springframework.aop.framework.AopConfigExcepti on: Cannot proxy target class
    because CGLIB2 is not available. Add CGLIB to the class path or specify proxy in
    terfaces.
    at org.springframework.aop.framework.DefaultAopProxyF actory.createAopPro
    xy(DefaultAopProxyFactory.java:65)
    at org.springframework.aop.framework.ProxyCreatorSupp ort.createAopProxy(
    ProxyCreatorSupport.java:106)
    at org.springframework.aop.framework.ProxyFactory.get Proxy(ProxyFactory.
    java:110)
    at org.springframework.aop.scope.ScopedProxyFactoryBe an.setBeanFactory(S
    copedProxyFactoryBean.java:109)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBean
    Factory.initializeBean(AbstractAutowireCapableBean Factory.java:1158)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBean
    Factory.createBean(AbstractAutowireCapableBeanFact ory.java:427)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getOb
    ject(AbstractBeanFactory.java:249)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistr
    y.getSingleton(DefaultSingletonBeanRegistry.java:1 55)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean
    (AbstractBeanFactory.java:246)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean
    (AbstractBeanFactory.java:160)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.
    preInstantiateSingletons(DefaultListableBeanFactor y.java:285)
    at org.springframework.context.support.AbstractApplic ationContext.refres
    h(AbstractApplicationContext.java:352)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationCon
    text(ContextLoader.java:245)
    at org.springframework.web.context.ContextLoader.init WebApplicationConte
    xt(ContextLoader.java:188)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitiali
    zed(ContextLoaderListener.java:49)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContex
    t.java:3637)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4
    073)
    at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase
    .java:759)
    at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:73
    9)
    at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:524)

    at org.apache.catalina.startup.HostConfig.deployDirec tory(HostConfig.jav
    a:909)
    at org.apache.catalina.startup.HostConfig.deployDirec tories(HostConfig.j
    ava:872)
    at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:474
    )
    at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:1106)
    at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java
    :310)
    at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(Lifecycl
    eSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1019)

    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:718)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1011)

    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:440
    )
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:4
    50)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:683
    )
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:537)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:271)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:409)
    ERROR [main] (ApplicationContext.java:662) - Exception sending context initializ
    ed event to listener instance of class org.springframework.web.context.ContextLo
    aderListener
    ----------------------------
    applicationContext.xml is
    <?xml version="1.0" encoding="UTF-8"?>

    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-2.0.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">

    <bean id="businessDelegate"
    class="com.tdc.ssp.web.delegate.BusinessDelegate" scope="session">
    <aop:scoped-proxy/>
    </bean>
    <bean id="frontPageController" class="com.tdc.ssp.web.SearchServices.controller.F rontPageControler">
    <property name="businessDelegate" ref="businessDelegate"/>
    </bean>
    <bean id="urlMapping"
    class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    <property name="mappings">
    <props>
    <prop key="/jsp/FrontPage.htm">frontPageController</prop>
    </props>
    </property>
    </bean>

    <bean id="viewResolver"
    class="org.springframework.web.servlet.view.Resour ceBundleViewResolver">
    <property name="basename"><value>views</value></property>
    </bean>
    </beans>
    ------------------------
    help me

  • #2
    Please use [ code][/code ] tags when posting.

    In my application i got this kind of exception already CGLIB 2 is in classpath, my working environment JDK 1.4.2 and spring 2
    Judging by the exception you either don't have CGLIB in your classpath (at least not available for Spring) or you have a wrong version of CGLIB.

    Comment


    • #3
      hi mdeinum,
      I have cglib-nodep-2.1_3.jar,spring-aspects.jar,spring.jar(2.0.7) in my classpath. And my Tomcat version is 5.5.7.
      My web.xml is
      Code:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
      <web-app>
      	<listener>
              <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
          </listener>
          <listener>
          <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
        </listener>
      	
      	<servlet>
      		<servlet-name>springapp</servlet-name>
      		<servlet-class>
      			org.springframework.web.servlet.DispatcherServlet
      		</servlet-class>
      		<load-on-startup>1</load-on-startup>
      	</servlet>
      		
      	<servlet-mapping>
      		<servlet-name>springapp</servlet-name>
      		<url-pattern>*.htm</url-pattern>
      	</servlet-mapping>
      
      </web-app>
      and applicationContext.xml is
      Code:
      <?xml version="1.0" encoding="UTF-8"?>
      
      <beans xmlns="http://www.springframework.org/schema/beans"
      	     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      	     xmlns:aop="http://www.springframework.org/schema/aop"
      	     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                 http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
      
      
      	
      	<!-- The Actual Implementation of Prepaid Application Starts HERE -->
      	
      	<bean id="businessDelegate"
      		class="com.tdc.ssp.web.delegate.BusinessDelegate" scope="session">
      		<aop:scoped-proxy/>
      	</bean>
      
      
      	 <bean id="frontPageController" class="com.tdc.ssp.web.SearchServices.controller.FrontPageControler">
      	 <property name="businessDelegate" ref="businessDelegate"/>
      	 </bean>			
             
      	<bean id="urlMapping"
      		class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
      		<property name="mappings">
      			<props>
      				<prop key="/jsp/FrontPage.htm">frontPageController</prop>				
      			</props>
      		</property>
      	</bean>
      
      	<bean id="viewResolver"
      		class="org.springframework.web.servlet.view.ResourceBundleViewResolver">
      		<property name="basename"><value>views</value></property>
      	</bean>
      
      	
      </beans>
      Thank you..

      Comment

      Working...
      X