This problem occurs when you start spring:
Exception in thread "main" Org.springframework.beans.factory.BeanCreationException:Error creating beans with Name ' Helloworldbean ' defined in file [C:/wl/spring04-08/src/applicationcontext.xml]: Initialization of Bean failed; Nested exception is org.springframework.aop.framework.AopConfigException:Couldn ' t generate CGLIB subclass of class [ Class Com.spring.aop.HelloWorld]: 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
caused By:org.springframework.aop.framework.AopConfigException:Couldn ' t generate CGLIB subclass of class [Class Com.spring.aop.HelloWorld]: 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
caused By:net.sf.cglib.core.codegenerationexception:java.lang.reflect.invocationtargetexception-->null
At Net.sf.cglib.core.AbstractClassGenerator.create (abstractclassgenerator.java:237)
At Net.sf.cglib.proxy.Enhancer.createHelper (enhancer.java:377)
At Net.sf.cglib.proxy.Enhancer.create (enhancer.java:285)
At Org.springframework.aop.framework.Cglib2AopProxy.getProxy (cglib2aopproxy.java:196)
At Org.springframework.aop.framework.ProxyFactory.getProxy (proxyfactory.java:110)
At Org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy ( abstractautoproxycreator.java:429)
At Org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization ( abstractautoproxycreator.java:299)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization (abstractautowirecapablebeanfactory.java:315)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean ( abstractautowirecapablebeanfactory.java:1181)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean ( abstractautowirecapablebeanfactory.java:428)
At Org.springframework.beans.factory.support.abstractbeanfactory$1.getobject (abstractbeanfactory.java:251)
At Org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( defaultsingletonbeanregistry.java:156)
At Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:248)
At Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:160)
At Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( defaultlistablebeanfactory.java:287)
At Org.springframework.context.support.AbstractApplicationContext.refresh (abstractapplicationcontext.java:352)
At Org.springframework.context.support.filesystemxmlapplicationcontext.<init> ( filesystemxmlapplicationcontext.java:93)
At Org.springframework.context.support.filesystemxmlapplicationcontext.<init> ( filesystemxmlapplicationcontext.java:77)
At Org.springframework.context.support.filesystemxmlapplicationcontext.<init> ( FILESYSTEMXMLAPPLICATIONCONTEXT.JAVA:67)
At Com.spring.aop.ProxyFactoryBeanTest.main (proxyfactorybeantest.java:6)
caused by:java.lang.reflect.InvocationTargetException
At Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
At Sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
At Java.lang.reflect.Method.invoke (Unknown Source)
At Net.sf.cglib.core.ReflectUtils.defineClass (reflectutils.java:384)
At Net.sf.cglib.core.AbstractClassGenerator.create (abstractclassgenerator.java:219)
... More
caused By:java.lang.SecurityException:class "com.spring.aop.helloworld$ $EnhancerByCGLIB $ $b 4b90129" ' s signer Information does not match signer information of other classes in the same package
At Java.lang.ClassLoader.checkCerts (Unknown Source)
At Java.lang.ClassLoader.preDefineClass (Unknown Source)
At Java.lang.ClassLoader.defineClass (Unknown Source)
... More
<?xml version= "1.0" encoding= "UTF-8"?>
<beans
Xmlns= "Http://www.springframework.org/schema/beans"
Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"
xsi:schemalocation= "Http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/ Spring-beans-2.0.xsd ">
<bean id= "Beannameproxycreator"
class= "Org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator" >
<property name= "Beannames" >
<list>
<value>*</value>
<!--often have problems here, so solve this problem .... helloworldbean,hellobean,helloworld-->
</list>
</property>
<property name= "Interceptornames" >
<list>
<value>advice</value>
</list>
</property>
<property name= "Proxytargetclass" >
<value>true</value>
</property>
</bean>
<bean id= "Helloworldbean" class= "Com.spring.aop.HelloWorld" ></bean>
<bean id= "Hellobean" class= "Com.spring.aop.HelloWorld" ></bean>
<bean id= "HelloWorld" class= "Com.spring.aop.HelloWorld" ></bean>
<bean id= "Advice" class= "Com.spring.aop.SimpleBeforeAdvice" ></bean>
</beans>