Exception in thread "main" org. springframework. Beans. Factory. beancreationexpiration t in spring

Source: Internet
Author: User

This problem occurs when spring is started:

Exception in thread "Main" org. springframework. beans. factory. beancreationexception: Error creating bean 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)
... 19 more
Caused by: Java. lang. securityexception: Class "com. spring. AOP. helloworld $ enhancerbycglib $ b4b90129 "'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)
... 25 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>
<! -- Problems are often encountered here, so we can solve these problems... 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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.