求救啊!!struts+spring+hibernate初学者的一个问题
我在做小例子过程中老出现,
tomcat一启动就出现,如下错误
org.apache.catalina.core.ApplicationContext log
严重: action: null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory ' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is
java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
Caused by: java.lang.
NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
请问为什么,当我把spring中 <property name= "mappingResources "> ..... </property> 删除时候,启动tomcat就不会出错,但是我看了*.hbm.xml文件,绝对不会出错的,而且我就算用别人可以运行的原代码也不行,出是同样错误,请帮帮忙
User.hbm.xml文件
<?xml version= "1.0 "?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN "
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd ">
<!--
Mapping file autogenerated by MyEclipse - Hibernate Tools
-->
<hibernate-mapping>
<class name= "org.tie.vo.User " table= "user " catalog= "tie ">
<id name= "id " type= "java.lang.Integer ">
<column name= "id " />
<generator class= "native " />
</id>
<property name= "username " type= "java.lang.String ">
<column name= "username " length= "10 " not-null= "true " />
</property>
<property name= "password " type= "java.lang.String ">
<column name= "password " length= "10 " not-null= "true " />
</property>
<property name= "email " type= "java.lang.String ">
<column name= "email " length= "50 " not-null= "true " />
</property>
</class>
</hibernate-mapping>
因为在我什么功能都没做,所以applicationContext.xml文件中没有什么内容
如下
<bean id= "dataSource "
class= "org.apache.commons.dbcp.BasicDataSource ">
<property name= "driverClassName "
value= "com.mysql.jdbc.Driver ">
</property>
<property name= "url "
value= "jdbc:mysql://localhost:3306/mydata ">
</property>
<property name= "username " value= "root "> </property>
<propert