疯了!
org.springframework.beans.factory.BeanCreationException搞了一下午!都说是包的问题。但是我找了一下包发现没有重复的包。
我还有一个项目也是一样的配置但可以运行。
这个项目我是用别人已有的项目再把我的 类 与配置文件 拷贝进去,已经修改的跟我原有项目一摸一样了。
配置文件都在。
我去配置文件中把 ‘dddService'的配置 注释就不会报异常了.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dddService' defined in file [E:\Tomcat 6.0\webapps\iteflat\WEB-INF\classes\springconfig\applicationContext-ddd.xml]: Invocation of init method failed;
nested exception is org.aopalliance.aop.AspectException: null
java.lang.IllegalArgumentException: Cannot subclass final class class $Proxy2
at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:442)
at net.sf.cglib.transform.TransformingClassGenerator.generateClass(TransformingClassGenerator.java:33)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:215)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:373)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:281)
at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:199)
at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:156)
at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:70)
at org.springframework.transaction.interceptor.TransactionProxyFactoryBean.getProxy(TransactionProxyFactoryBean.java:338)
at org.springframework.transaction.interceptor.TransactionProxyFactoryBean.afterPropertiesSet(TransactionProxyFactoryBean.java:310)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:810)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:779)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:360)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:256)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:331)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:150)
at org.springframework.web.struts.ContextLoaderPlugIn.createWebApplicationContext(ContextLoaderPlugIn.java:353)
at org.springframework.web.struts.ContextLoaderPlugIn.initWebApplicationContext(ContextLoaderPlugIn.java:296)
at org.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn.java:225)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4044)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)