我用spring2.5+Hibernate3.2做自动装配的一个例子,在applicationContext.xml中添加了<context:component-scan base-package="com.demo.mini.service" />后配置文件报错:
Unexpected exception parsing XML document from file [D:/JavaWork/workspace/mini/src/applicationContext.xml]; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassReader.accept(Lorg/objectweb/asm/ClassVisitor;Z)Vasm2.2.3.jar已经删除了,程序可以正常运行.因为配置文件报错,没法生成Hibernate3.2提供的具有注解功能的POJO。Add Hibernate mapping annotations to POJO (Hibernate3.2 only) 这一项是没法选的,
如果把spring配置文件applicationContext.xml中的<context:component-scan base-package="com.demo.mini.service" />这段代码取掉,就不会出现上面的问题,请问如何解决这个问题呢?
Unexpected exception parsing XML document from file [D:/JavaWork/workspace/mini/src/applicationContext.xml]; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassReader.accept(Lorg/objectweb/asm/ClassVisitor;Z)Vasm2.2.3.jar已经删除了,程序可以正常运行.因为配置文件报错,没法生成Hibernate3.2提供的具有注解功能的POJO。Add Hibernate mapping annotations to POJO (Hibernate3.2 only) 这一项是没法选的,
如果把spring配置文件applicationContext.xml中的<context:component-scan base-package="com.demo.mini.service" />这段代码取掉,就不会出现上面的问题,请问如何解决这个问题呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货