spring配置事物,放在weblogic启动报错,急急急!
以下是部分报错信息org.springframework.beans.factory.CannotLoadBeanClassException:Errorloadingc...
以下是部分报错信息
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator] for bean with name 'org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator#0' defined in class path resource [applicationContext.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/config/InstantiationAwareBeanPostProcessor
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1253)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)
spring中配置:<beans default-autowire="byName"></beans>
<bean id="autoProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
在jboss服务器下启动不报错
Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/factory/config/InstantiationAwareBeanPostProcessor
下面这个错说没找到类,
Caused By: java.lang.ClassNotFoundException: org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor
但是我在org.springframework.beans-3.0.5.RELEASE.jar中找到这个类了 展开
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator] for bean with name 'org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator#0' defined in class path resource [applicationContext.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/config/InstantiationAwareBeanPostProcessor
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1253)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)
spring中配置:<beans default-autowire="byName"></beans>
<bean id="autoProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
在jboss服务器下启动不报错
Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/factory/config/InstantiationAwareBeanPostProcessor
下面这个错说没找到类,
Caused By: java.lang.ClassNotFoundException: org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor
但是我在org.springframework.beans-3.0.5.RELEASE.jar中找到这个类了 展开
1个回答
展开全部
<beans default-autowire="byName"></beans>之间必须存在有<bean>标签,所以,配置文件应该是这样的
<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.5.xsd"
default-autowire="byName">
<bean id="autoProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"/>
</beans>
<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.5.xsd"
default-autowire="byName">
<bean id="autoProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"/>
</beans>
追问
applicationContext.xml中配置了很多东西,问题中我只是给出2个比较重要的地方,
追答
提供的配置文件代码太少了,没办法找
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询